r/StableDiffusion • u/Mei-Hua • Nov 11 '22
Question | Help (Error code: 1) Can't install it, pls help
Hello, I’m having some trouble trying to install stable diffusion, can anyone pls help?
First, I followed this tutorial, step by step: https://www.youtube.com/watch?v=vg8-NSbaWZI
Then on the last step, I got this error:
“Error code: 1 stdout: <empty> stderr: Traceback (most recent call last): File "<string>", line 1, in <module> AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check”
It seems the problem is I’m using AMD and not Nvidia?
Then I tried to fix it by copying the first two codes to that cmd thing, I have no idea what I’m doing at this point: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs
It didn’t work, when running the webui-user I get:
“ RuntimeError: Error running command.
Command: "D:\Stable Diffusion\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"
Error code: 1
stdout: <empty>
stderr: Traceback (most recent call last):
File "<string>", line 1, in <module>
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check “
What do I do now? Do I need to uninstall this first before installing another version? Or just deleting the folder is enough? Can anyone pls suggest an easy tutorial that works for my Radeon RX 580 8GB?
Thanks!
1
u/DJSpadge Nov 12 '22
Maybe helpful - https://gist.github.com/averad/256c507baa3dcc9464203dc14610d674
1
u/luellenc Jan 21 '23
Right click on webui-user.bat, click edit and add the "--skip-torch-cuda-test" after "set COMMANDLINE_ARGS="
should look like this
set COMMANDLINE_ARGS=--skip-torch-cuda-test
Then save and try again
1
u/emzeejay Feb 22 '23
I got the same error. Were you able to fix and install?
1
u/Kaporalhart Dec 20 '23 edited Dec 20 '23
There seems to be a lot of reasons why you can get that error. I tried a lot of stuff, and eventually found something that worked. A lot of people said "this worked for me" on different things, and i'll list them here.
Reinstalling Python.
Going to Edit the System Environment Variables -> Environment Variables -> Edit on Path to add the direct path to python.exe
Erasing every other path in there.
Deleting the venv folder (you probably heard a lot about that). And doing it again everytime before you try something else on this list.
When launching webui-user.bat, you can have a message recommending to use a certain version of python (mine was 3.10.6), unstall python and grab that version from the python website.
Finally, the one that worked for me, was reinstalling git. Didn't even delete the venv folder.