stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: RuntimeError: Couldn't install torch
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Running webui.sh, I am getting:
################################################################
Python 3.10.6 (main, Oct 24 2022, 11:04:07) [Clang 12.0.0 ]
Commit hash: 737eb28faca8be2bb996ee0930ec77d1f7ebd939
Installing torch and torchvision
Traceback (most recent call last):
File "/Users/will/Code/stable-fusion-gui/stable-diffusion-webui/launch.py", line 205, in <module>
prepare_enviroment()
File "/Users/will/Code/stable-fusion-gui/stable-diffusion-webui/launch.py", line 148, in prepare_enviroment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "/Users/will/Code/stable-fusion-gui/stable-diffusion-webui/launch.py", line 33, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "/Users/will/Code/stable-fusion-gui/stable-diffusion-webui/venv/bin/python3" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu113
stderr: ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu113 (from versions: 1.11.0, 1.12.0, 1.12.1)
ERROR: No matching distribution found for torch==1.12.1+cu113
[notice] A new release of pip available: 22.2.1 -> 22.3
[notice] To update, run: pip install --upgrade pip
Steps to reproduce the problem
Run webui.sh
What should have happened?
Completed without errors?
Commit where the problem happens
f53ca51
What platforms do you use to access UI ?
MacOS
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
No response
Additional information, context and logs
No response
You need set webui-user.sh file. line 13 for example:
export COMMANDLINE_ARGS="--lowvram --precision full --no-half --skip-torch-cuda-test"
But I don't know the description of the parameters, hope someone can explain, thank.
same issue
Same issue. Line 13 webui-user.sh parameter mentioned above does not resolve.
same issue here
@superboychao someone in the other thread reported downgrading from python 3.11 solved it for them https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3780#issuecomment-1294241333
@superboychao someone in the other thread reported downgrading from python 3.11 solved it for them #3780 (comment)
Downgrade python 3.11>3.10 also just worked for me. Thanks.
Python 3.11 is said to have up to 60% speed boost, in general around 20% for most python functions, see official release notes (https://docs.python.org/3.11/whatsnew/3.11.html). It is a large performance upgrade. Even if it only speeds up python functions and not necessarily will produce more it/s, I would appreciate if SD-Webui and xformers would support running with python 3.11
@superboychao someone in the other thread reported downgrading from python 3.11 solved it for them #3780 (comment)
Downgrade python 3.11>3.10 also just worked for me. Thanks.
I had the same problem on Windows, tried downgrading to 3.10.8 and now running webui.bat is telling me: "No Python at '"C:\Users\Sparky\AppData\Local\Programs\Python\Python311\python.exe'"
@superboychao someone in the other thread reported downgrading from python 3.11 solved it for them #3780 (comment)
Downgrade python 3.11>3.10 also just worked for me. Thanks.
Encountered this error when using python 3.11
and resolved it by installing 3.10.6
.
when will the gui be python 3.11 ready ???
downgrade worked
Im running on 3.10.6 And I got the same problem.