first-order-model
first-order-model copied to clipboard
AssertionError: Torch not compiled with CUDA enabled
A few errors:
- demo.py:27: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe.
- "AssertionError: Torch not compiled with CUDA enabled"
My source video is an mp4 off youtube that's been processed by face-alignment and converted with ffmpeg. Using a 256x256 px source image.
I have a Radeon and not Nvidia GPU, so I want to run this without CUDA
(base) kyle@MacBook-Pro first-order-model % python demo.py --config config/vox-256.yaml --driving_video crop.mp4 --source_image Noe_crop.jpg --checkpoint vox-cpk.pth.tar --relative --adapt_scale
demo.py:27: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)
Traceback (most recent call last):
File "demo.py", line 144, in
Try to add --cpu
flag.
For non NVIDIA users: --cpu flag will fix this.
If you get this error with an NVIDIA gpu, you will need to install PyTorch with cuda enabled. You can do that by following the PyTorch install instructions on their GitHub found here.
For non NVIDIA users: --cpu flag will fix this.
If you get this error with an NVIDIA gpu, you will need to install PyTorch with cuda enabled. You can do that by following the PyTorch install instructions on their GitHub found here.
How to add --cpu flag?
For non NVIDIA users: --cpu flag will fix this. If you get this error with an NVIDIA gpu, you will need to install PyTorch with cuda enabled. You can do that by following the PyTorch install instructions on their GitHub found here.
How to add --cpu flag?
If you are using function such as
from demo import load_checkpoints
generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml',
checkpoint_path='../resources/model/vox-cpk.pth.tar')
Just pass a parameter cpu = True
from demo import load_checkpoints
generator, kp_detector = load_checkpoints(cpu=True, config_path='config/vox-256.yaml',
checkpoint_path='../resources/model/vox-cpk.pth.tar')
If you are using command line
python demo.py --config config/vox-256.yaml --driving_video crop.mp4 --source_image Noe_crop.jpg --checkpoint vox-cpk.pth.tar --relative --adapt_scale
Add --cpu like
python demo.py --config config/vox-256.yaml --cpu --driving_video crop.mp4 --source_image Noe_crop.jpg --checkpoint vox-cpk.pth.tar --relative --adapt_scale
It works for me.