diffusers
diffusers copied to clipboard
RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions.
Describe the bug
RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.7 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install.
Reproduction
/usr/local/lib/python3.10/dist-packages/torchvision/extension.py:80 in β β _check_cuda_version β β β β 77 β β t_major = int(t_version[0]) β β 78 β β t_minor = int(t_version[1]) β β 79 β β if t_major != tv_major or t_minor != tv_minor: β β β± 80 β β β raise RuntimeError( β β 81 β β β β "Detected that PyTorch and torchvision were compiled w β β 82 β β β β f"PyTorch has CUDA Version={t_major}.{t_minor} and tor β β 83 β β β β f"CUDA Version={tv_major}.{tv_minor}. "
Logs
No response
System Info
Python 3.11.2
MacBookPro M2, mac OS ventura version 13.2.1
All I did was install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 and it worked fine.
Windows
Also have the same problem.
Same issue on Colab. Confirm the fix with running the following in the beginning.
%pip install torch==2.0.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Same issue on Colab. Confirm the fix with running the following in the beginning.
%pip install torch==2.0.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Added torchdata and torchtext and it worked fine.
%pip install torch==2.0.0 torchvision torchaudio torchdata torchtext --index-url https://download.pytorch.org/whl/cu118
This thead saved my day. Thanks guys!
@freddieb12345 I had the same issue. This resolved it:
%pip install torch==2.0.0+cu118 torchvision torchaudio torchdata torchtext --index-url https://download.pytorch.org/whl/cu118
can I get the colab notebook link please
Π‘ΡΠ°Π½Π΄Π°ΡΡΠ½Π°Ρ Π²Π΅ΡΡΠΈΡ Π³ΡΠ³Π» ΠΊΠΎΠ»Π°Π± ΡΠ½ΠΎΠ²Π° Π·Π°ΡΠ°Π±ΠΎΡΠ°Π»Π°.