anandpawara / Real_Time_Image_Animation

The Project is real time application in opencv using first order model
GNU General Public License v3.0
3.23k stars 521 forks source link

issue AssertionError: Torch not compiled with CUDA enabled #10

Open borodaalex opened 4 years ago

borodaalex commented 4 years ago

I've faced this in OSx - System Version: macOS 10.14.6 (18G103)

File "/Users//projects/Real_Time_Image_Animation/env/lib/python3.7/site-packages/torch/cuda/init.py", line 161, in _lazy_init _check_driver() File "/Users//projects/Real_Time_Image_Animation/env/lib/python3.7/site-packages/torch/cuda/init.py", line 75, in _check_driver raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

Is the any ability to use CPU, instead of trying to use my non-existent GPUs ???

AshwinRaikar88 commented 4 years ago

Yes you can use it, on cpu (But the output will be very slow)

Now here's how to do it, ( you'll need to change two files)

In line 40 of image_animation.py, set cpu = True

In line 24 of demo.py, set def load_checkpoints(config_path, checkpoint_path, cpu = True)

Serafim-End commented 4 years ago

and firstly use right torch version for mac it is pip install torch torchvision

borodaalex commented 4 years ago

I believe this should be done by

pip install torch===1.0.0 torchvision===0.2.1 -f https://download.pytorch.org/whl/cu100/torch_stable.html

from instructions of project

anandpawara commented 4 years ago

and firstly use right torch version for mac it is pip install torch torchvision

please do install given torch version as latest version for torch and torchvision does is by this project

pardhu-mallela commented 11 months ago

Yes. With cpu, output is very slow. I am unable to run this code in google colab because colab is not supporting webcam directly. Is there any alternative to get the output quicky?