genmoai / mochi

The best OSS video generation models
Apache License 2.0
2.13k stars 213 forks source link

Torch not compiled with cuda enabled... #57

Open bbecausereasonss opened 3 weeks ago

bbecausereasonss commented 3 weeks ago

Tried man different versions now... conda install pytorch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 pytorch-cuda=11.8 -c pytorch -c nvidia

This installation is very frustrating. Win 11.

piradata commented 3 weeks ago

try this

image

piradata commented 3 weeks ago

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

https://web.archive.org/web/20241010054802/https://pytorch.org/get-started/locally/

pyautoml commented 2 weeks ago

This one did not help. I'm having the same error:
File "D:\repository\external\models\venv\lib\site-packages\torch\cuda__init__.py", line 310, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

piradata commented 2 weeks ago

maybe you are not using the correct lib? try uninstalling torch completely until it gives torch not found and then add it as is on the print. maybe uv is not using the venv, got a problem with that

aesethtics-git commented 2 weeks ago

Tried man different versions now... conda install pytorch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 pytorch-cuda=11.8 -c pytorch -c nvidia

This installation is very frustrating. Win 11.

To piggyback on piradata's reply, try this... (from within your venv):

uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

(adding uv to the beginning.)

FYI you can also see which version of torch is installed by using:

uv pip list

arcinin1 commented 2 weeks ago

I have the same problem on Win 11.

in my venv, pip list says: torch 2.5.1+cu124 torchaudio 2.5.1+cu124 torchvision 0.20.1+cu124

But it still says AssertionError: Torch not compiled with CUDA enabled

aesethtics-git commented 2 weeks ago

I have the same problem on Win 11.

in my venv, pip list says: torch 2.5.1+cu124 torchaudio 2.5.1+cu124 torchvision 0.20.1+cu124

But it still says AssertionError: Torch not compiled with CUDA enabled

try "uv pip list" (different from "pip list")

arcinin1 commented 2 weeks ago

Hey, you were right, it works now. I though that uv is just a pip replacement written in Rust.

piradata commented 2 weeks ago

Hey, you were right, it works now. I though that uv is just a pip replacement written in Rust.

it is, but it also saves the libs in a different place than pip, so one does not see the libs the other installed from what i got