Skip to content

Commit

Permalink
Modify cuda argument type
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyuliutw committed Mar 2, 2018
1 parent 22c0efb commit 208d4f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
parser.add_argument('--style_image_path', default='./images/style1.png')
parser.add_argument('--style_seg_path', default=[])
parser.add_argument('--output_image_path', default='./results/example1.png')
parser.add_argument('--cuda', type=bool, default=True, help='Enable CUDA.')
parser.add_argument('--cuda', type=int, default=1, help='Enable CUDA.')
args = parser.parse_args()

# Load model
Expand All @@ -30,7 +30,8 @@
print("Fail to load PhotoWCT models. PhotoWCT submodule not updated?")
exit()

p_wct.cuda(0)
if args.cuda:
p_wct.cuda(0)

process_stylization.stylization(
p_wct=p_wct,
Expand Down

0 comments on commit 208d4f6

Please sign in to comment.