sergeywong / cp-vton

Reimplemented code for "Toward Characteristic-Preserving Image-based Virtual Try-On Network"
MIT License
474 stars 182 forks source link

running without GPU #1

Closed ofirDubi closed 5 years ago

ofirDubi commented 5 years ago

Hi, I was trying to run the Try-on-module test, and I got the following error:

  File "test.py", line 163, in <module>
    main()
  File "test.py", line 156, in main
    test_tom(opt, train_loader, model, board)
  File "test.py", line 89, in test_tom
    model.cuda()
 ...
  File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 258, in <lambda>
    return self._apply(lambda t: t.cuda(device))
RuntimeError: Cannot initialize CUDA without ATen_cuda library.

I think this error accord because I am using a VM with no GPU support, and I installed the CPU version of Pytorch.

Is there a way to run your project without GPU support?

sergeywong commented 5 years ago

You can replace all xxx = yyy.cuda() into xxx = yyy and remove xxx.cuda().