An error

#6757
by RayaLoux - opened

I'm trying to run stable diffusion. I've followed all the guides, installed the modules, git and python, ect. But now when I open webui-user.bat, after it finished installing the "torch and torchlight" thing, it shows this error and I can't continue

venv "C:\Users\liamx\OneDrive\Desktop\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 828438b4a190759807f9054932cae3a8b880ddf1
Traceback (most recent call last):
File "C:\Users\liamx\OneDrive\Desktop\stable-diffusion-webui\launch.py", line 250, in
prepare_enviroment()
File "C:\Users\liamx\OneDrive\Desktop\stable-diffusion-webui\launch.py", line 174, in prepare_enviroment
run_python("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'")
File "C:\Users\liamx\OneDrive\Desktop\stable-diffusion-webui\launch.py", line 58, in run_python
return run(f'"{python}" -c "{code}"', desc, errdesc)
File "C:\Users\liamx\OneDrive\Desktop\stable-diffusion-webui\launch.py", line 34, in run
raise RuntimeError(message)
RuntimeError: Error running command.
Command: "C:\Users\liamx\OneDrive\Desktop\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:
stderr: Traceback (most recent call last):
File "", line 1, in
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

Press any key to continue . . .

How to fix this?

It seems this is related to the compatibility between the torch and GPU. I might google it.

The answer is in the AssertionError string.

Аfter the test I say it worked or not.

Gentlemen, this is working

same problem here.
set COMMANDLINE_ARGS= --skip-torch-cuda-test
editing "webui-user.bat" to add this flag & running webui.bat again did NOT solve problem.

Any suggestions?

Anybody found out yet why <--skip-torch-cuda-test> does not stop the test. My SD stopped working on the laptop with the same AssertionError

I'm trying to run stable diffusion. I've followed all the guides, installed the modules, git, and python, etc. But now when I open webui-user. bat after it finished installing the "torch and torchlight" thing, it shows this error and I can't continue.

Traceback (most recent call last):
File "C:\AI\stable-diffusion-webui\launch.py", line 294, in
prepare_environment()
File "C:\AI\stable-diffusion-webui\launch.py", line 209, in prepare_environment
run_python("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'")
File "C:\AI\stable-diffusion-webui\launch.py", line 73, in run_python
return run(f'"{python}" -c "{code}"', desc, errdesc)
File "C:\AI\stable-diffusion-webui\launch.py", line 49, in run
raise RuntimeError(message)
RuntimeError: Error running command.
Command: "C:\AI\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:
stderr: Traceback (most recent call last):
File "", line 1, in
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

what is the reason for this?

I have the same problem.
Firstly I updated a driver of AMD, but it didn't help.
Secondly I install PyTorch
but it didn't help

And it seems too me the reason why there is a error: AMD doesn't support CUDA

i got this error now , any fixes yet

venv "D:\StableDiffusionV2.1\venv\Scripts\Python.exe"
Traceback (most recent call last):
File "D:\StableDiffusionV2.1\launch.py", line 294, in
prepare_environment()
File "D:\StableDiffusionV2.1\launch.py", line 183, in prepare_environment
sys.argv += shlex.split(commandline_args)
File "C:\Users\satis\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 315, in split
return list(lex)
File "C:\Users\satis\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 300, in next
token = self.get_token()
File "C:\Users\satis\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 109, in get_token
raw = self.read_token()
File "C:\Users\satis\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 191, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation

Sign up or log in to comment