Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run on CPU #2

Open
yig opened this issue Oct 10, 2019 · 0 comments
Open

Can't run on CPU #2

yig opened this issue Oct 10, 2019 · 0 comments

Comments

@yig
Copy link

yig commented Oct 10, 2019

On my mac laptop (no CUDA), I installed all the dependencies and downloaded all the pre-trained models.

git clone https://github.com/arnabgho/iSketchNFill
cd iSketchNFill
pip3 install -r requirements.txt
bash scripts/download_pretrained_scribble_dataset.sh

I then ran the example line, with --gpu_ids -1 to use the CPU version:

python3 main_gui_shadow_draw_color.py --name wgangp_sparse_label_channel_pix2pix_autocomplete_multiscale_nz_256_nc_1_nf_32_gp_0_multigpu --model sparse_wgangp_pix2pix  --checkpoints_dir checkpoints_sparse --gpu_ids -1 --nz 256 --sparseSize 4 --fineSize 128 --ngf 32 --ndf 32 --num_interpolate 8 --input_nc 1 --output_nc 1

I then got AssertionError: Torch not compiled with CUDA enabled errors in models/sparse_wgangp_pix2pix_model.py lines 113 (z= z.cuda()) and 123 (self.label = self.label.cuda()), so I changed them to:

if torch.cuda.is_available(): z= z.cuda()

and

if torch.cuda.is_available(): self.label = self.label.cuda()

That gets me past those errors, but then line 76 calls self.netG.cuda(). A debugger shows that the if statement gating this line (if self.isTrain) is indeed False.

Any advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant