shadowcz007 / comfyui-liveportrait

LivePortrait: Efficient Portrait Animation with Stitching and Retargeting Control
366 stars 30 forks source link

AssertionError: Torch not compiled with CUDA enabled #24

Open eizoxx opened 1 month ago

eizoxx commented 1 month ago

Traceback (most recent call last): File "E:\AI\ComfyUI_windows_portable\ComfyUI\main.py", line 80, in import execution File "E:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 11, in import nodes File "E:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 21, in import comfy.diffusers_load File "E:\AI\ComfyUI_windows_portable\ComfyUI\comfy\diffusers_load.py", line 3, in import comfy.sd File "E:\AI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 5, in from comfy import model_management File "E:\AI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 119, in total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) ^^^^^^^^^^^^^^^^^^ File "E:\AI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 88, in get_torch_device return torch.device(torch.cuda.current_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\torch\cuda__init__.py", line 778, in current_device _lazy_init() File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\torch\cuda__init__.py", line 284, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

Getting this error, when I try to install and restart LivePortrait

eizoxx commented 1 month ago

I got it to work!!! First I figured out that it had to something with (IMPORT FAILED) comfyui-liveportrait in the ComfyUI Custom Node Manager. I simply followed this guide: https://www.reddit.com/r/comfyui/comments/1b4u63e/import_failed/ I simplified it a bit with ChatGPT, but I followed leftclot's workaround