[Bug]: Couldnt install Torch
Checklist
- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [X] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [X] The issue has been reported before but has not been fixed yet
What happened?
Runtime error: couldn't install Torch
Steps to reproduce the problem
- Run webui.bat
What should have happened?
Torch should have downloaded
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
I do not know how to use --dump-sysinfo commandline argument to generate the file.
Console logs
'"D:\FC Diff\stable-diffusion-webui\venv\Scripts\activate.bat"' is not recognized as an internal or external command,
operable program or batch file.
venv "D:\FC Diff\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Installing torch and torchvision
D:\FC Diff\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
Traceback (most recent call last):
File "D:\FC Diff\stable-diffusion-webui\launch.py", line 48, in <module>
main()
File "D:\FC Diff\stable-diffusion-webui\launch.py", line 39, in main
prepare_environment()
File "D:\FC Diff\stable-diffusion-webui\modules\launch_utils.py", line 381, in prepare_environment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
File "D:\FC Diff\stable-diffusion-webui\modules\launch_utils.py", line 116, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "D:\FC Diff\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 1
Press any key to continue . . .
Additional information
I was trying with python 3.10.6 but read that switching to 3.10.10 resolved the issue. I have tried both pythons and get the same error. Other solutions have been to delete the Venv folder and rerun webui.bat. when I attempt this I get an error saying webui cannot create a venv folder. Note: I have a AMD Ryzen 7 5700G with Radeon Graphics
still having problems with AMD?
i like to suggest you two sources, first is the wiki page of stable diffusion, about how to install the amd gpu's installation. : https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs
and the second one is this one issue thats been created that looks very much the same problem as yours, check the solutions in this one : https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/8206
still a problem on amd must be a recent update