Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Couldnt install Torch #16636

Open
6 tasks done
Shadowfire007 opened this issue Nov 9, 2024 · 3 comments
Open
6 tasks done

[Bug]: Couldnt install Torch #16636

Shadowfire007 opened this issue Nov 9, 2024 · 3 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@Shadowfire007
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • 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

  1. 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

@Shadowfire007 Shadowfire007 added the bug-report Report of a bug, yet to be confirmed label Nov 9, 2024
@0xelym
Copy link

0xelym commented Nov 9, 2024

still having problems with AMD?

@linuarM
Copy link

linuarM commented Nov 9, 2024

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
: #8206

@nickwewe
Copy link

still a problem on amd
must be a recent update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

4 participants