Can't enable CUDA on Windows
Closed this issue · 4 comments
Biniou on Windows 10 64bit. Hardware: Intel i5 9th gen, 16 GB, GeForce 560. Cuda 12.1
I go to global settings, switch to cuda, click on update. When I restart Biniou, the log says:
"c:\Users\User\biniou>.\env\Scripts\activate
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.1.0+cu121 with CUDA 1201 (you have 2.1.0+cpu)
Python 3.11.6 (you have 3.11.5)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
[biniou 🧠]: Up and running at https://192.168.100.235:7860/?__theme=dark
Running on local URL: https://0.0.0.0:7860
To create a public link, set share=True
in launch()
."
Does this mean my cuda version isn't correct or that my PyTorch version is not correct? How do I switch PyTorch manually?
Hello @deep470 ,
Thanks for your feedback.
It is unclear to me if GeForce 560 is usable with CUDA 12.1 as it doesn't appear on CUDA compatibility list, although 560Ti and 560m are.
In any case, it seems that the update to CUDA-enabled PyTorch has failed, as you seems to still be using the CPU-enabled version after update.
You can update manually to CUDA-enabled PyTorch by using the update_win_cuda.cmd script.
Can you try this and post the log sent back by this script ?
Hello again @deep470,
After further tests and investigations :
Does this mean my cuda version isn't correct or that my PyTorch version is not correct?
Your CUDA version is correct (12.1). After updating PyTorch to CUDA version, you should be using torch 2.1.0+cu121. A simple way to check it (without searching in the logs) is browsing to global settings and check if CUDA is selected instead of CPU (PyTorch version is detected at start).
I can't reproduce your issue using a virtual machine with Windows 10 which couldn't benefits CUDA, but I'm sure PyTorch-cu121 has neither CUDA nor GPU requirements at installation time.
So, it's narrow the scope of the issue to an update trouble and updating manually with update_win_cuda.cmd, will either solve the problem or throw a log giving us the reason of the failure.
However, successfully installing PyTorch CUDA version doesn't mean it could use your GPU (do not have too much expectations), but I'm really interested in knowing if your hardware is usable with biniou !
Thanks, @Woolverine94 - after running that script I saw "access denied" - errors (don't have the logs, I didn't uncomment the pause at the end). This wasn't a oermissions oroblem, as I initially guessed. The Windows event log showed disk read failed errors, so the harddisk I installed win10+biniou on was faulty. With a new ssd, the upgrade script runs smoothly.
Still no cuda, though. You're right, the standard 560 isn't on the compability list. Probably not enough vram? I will further investigate and then keep you informed.
Thanks for your feedback @deep470.
According to what I understand of CUDA requirements with the diffusers library, the strict minimal theoretical VRAM quantity is 3GB (4GB GPU at least). 2GB is not enough for most defaults models, but some "light" modules (R-ESRGAN, GFPGAN, ...) should works.
I close the issue as your update problem is solved, but don't hesitate to comment if you succeed in using your GPU with biniou.