stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: Cuda there but not usable?
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Using the Auto installer, it crashes out with the AssertionError: Torch is not able to use GPU; Running: python3 -c "import torch; print(torch.cuda.is_available())" True I seen this issue with the cuda on AMD Gpus, not sure whats up with the RTX 3060 though, The Auto installer says I dont have Cuda, and the Manual installer says I dont have stable.
So, I have Cuda, but it says I dont have cuda. Running Cuda 11.7, on Ubuntu 20.04, with a nVidia RTX 3060 12GB Gpu.
Steps to reproduce the problem
Step by Step in log for both manual and auto install linux
What should have happened?
Cuda seems to 'Work' when not triggered from Webui.sh maybe a typo or a issue since i have python3 command instead of python? The missing Stable Diffusion looks like the manual install instructions was mising a repositories?
Commit where the problem happens
0cc0ee1
What platforms do you use to access the UI ?
No response
What browsers do you use to access the UI ?
No response
Command Line Arguments
no
List of extensions
no
Console logs
https://pastebin.com/at875GR9 is the logs from console/terminal
Additional information
No response
I think I managed to figure it out. It seems cuda when it installed with the webui here is using a diffrent set of drivers. I was running the latest cuda from nvidia site and this old one dosent seem compatible with the drivers used in desktop. If goto settings - aditional drivers (Ubuntu 20.04) there is a list of nvidia proprietary drivers, have to do some googling but see what number works with your cuda and gpu, for mine was 470 instead of 520, this got the webui working, however also removed a monitor so my dual monitor is now single for some reason but isn't webui related. In windows I had a similar issue you can't use latest drivers from nvidia or they break the cuda toolkit
I think I've run into the same issue.
I have an AMD integrated GPU, and an NVidia RTX 4080 on the same computer.
the webui script detected the AMD GPU and installed that version of torch in the virtual environment.
my solution was to activate the virtual environment, uninstall torch and torchvision, and then reinstall the default versions.
cd stable-diffusion-webui
source venv/bin/activate
pip3 uninstall torch torchvision
pip3 install torch torchvision
deactivate
note: I am currently using nvidia driver 525. I did run into linux distro related issues though, where I could not get the linux headers, and had to downgrade the kernel. but that was entirely unrelated to the pytorch failing to find the RTX.
autodetection may not be the best way to handle this. it might be better to give the user an option in the webui startup?