stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Cant install on AMD navi 1, pytorch http 403 error

Open steffineu89 opened this issue 1 year ago • 9 comments

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
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

Cant install at all on my AMD RX5700XT because it says: ERROR: HTTP error 403 while getting https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl ERROR: Could not install requirement torch==2.0.0.dev20230209+rocm5.2 from https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl because of HTTP error 403 Client Error: Forbidden for url: https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl for URL https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl while trying to install webui

Steps to reproduce the problem

  1. Try to install natively on ubuntu

What should have happened?

The Webui should have installed pytorch 2.0.0 rocm5.2.

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

Can´t do that, doesn´t work

Console logs

./webui.sh --listen --opt-sub-quad-attention --lowvram --precision full --no-half

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on steffi user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.39
Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage)
Python 3.10.15 (main, Sep  7 2024, 18:35:38) [GCC 13.2.0]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Installing torch and torchvision
Collecting torch==2.0.0.dev20230209+rocm5.2
  ERROR: HTTP error 403 while getting https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl
ERROR: Could not install requirement torch==2.0.0.dev20230209+rocm5.2 from https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl because of HTTP error 403 Client Error: Forbidden for url: https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl for URL https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl

[notice] A new release of pip is available: 23.0.1 -> 24.2
[notice] To update, run: pip install --upgrade pip
Traceback (most recent call last):
  File "/home/steffi/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/steffi/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/steffi/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 "/home/steffi/stable-diffusion-webui/modules/launch_utils.py", line 116, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/home/steffi/stable-diffusion-webui/venv/bin/python" -m pip install https://download.pytorch.org/whl/nightly/rocm5.2/torch-2.0.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl https://download.pytorch.org/whl/nightly/rocm5.2/torchvision-0.15.0.dev20230209%2Brocm5.2-cp310-cp310-linux_x86_64.whl
Error code: 1

Additional information

No response

steffineu89 avatar Sep 28 '24 08:09 steffineu89

I found a solution: Someone has build a torch 2.1.0 with rocm5.2, works perfectly https://github.com/pytorch/pytorch/issues/103973#issuecomment-1815387635

steffineu89 avatar Sep 28 '24 11:09 steffineu89

https://github.com/pytorch/pytorch/issues/103973#issuecomment-1815387635

Your link sends me to a blank issues page with no instructions whatsoever. Could you correct that? I'm encountering the same issue as you are.

DesertCookie avatar Oct 01 '24 13:10 DesertCookie

https://github.com/pytorch/pytorch/issues/103973#issuecomment-1815387635

Your link sends me to a blank issues page with no instructions whatsoever. Could you correct that? I'm encountering the same issue as you are.

Used the Link tag wrong... now it should work ;-)

steffineu89 avatar Oct 01 '24 14:10 steffineu89

I found a solution: Someone has build a torch 2.1.0 with rocm5.2, works perfectly pytorch/pytorch#103973 (comment)

Hello, I run an RX 5700 XT as well and came across exactly the same problem as you posted. I used your link and installed the .whl files for torch and rocm. Though, when I attempted to rerun webui.sh I stumbled in the same return. Is there something I am missing?

billymambo avatar Oct 07 '24 03:10 billymambo

I found a solution: Someone has build a torch 2.1.0 with rocm5.2, works perfectly pytorch/pytorch#103973 (comment)

Hello, I run an RX 5700 XT as well and came across exactly the same problem as you posted. I used your link and installed the .whl files for torch and rocm. Though, when I attempted to rerun webui.sh I stumbled in the same return. Is there something I am missing?

Sounds Like you missed to activate the venv. You have To Install the pakages inside the venv for stable Diffusion.

steffineu89 avatar Oct 07 '24 06:10 steffineu89

I found a solution: Someone has build a torch 2.1.0 with rocm5.2, works perfectly pytorch/pytorch#103973 (comment)

Hello, I run an RX 5700 XT as well and came across exactly the same problem as you posted. I used your link and installed the .whl files for torch and rocm. Though, when I attempted to rerun webui.sh I stumbled in the same return. Is there something I am missing?

Sounds Like you missed to activate the venv. You have To Install the pakages inside the venv for stable Diffusion.

Thank you kindly, the venv was indeed the problem. I created one for stable_diffusion, install the torch+rocm files in an active instance and then proceeded with the webui installation. Finalizing some stuff currently, but my initial problem like the one in your post has been solved. Thanks again!

billymambo avatar Oct 07 '24 18:10 billymambo

I was having this issue too. My error looked like

ERROR: HTTP error 403 while getting https://download.pytorch.org/whl/nightly/rocm5.7/torch-2.2.0.dev20231010%2Brocm5.7-cp310-cp310-linux_x86_64.whl (from https://download.pytorch.org/whl/nightly/rocm5.7/torch/)

Notice it says rocm5.7 - Which is more modern than the 5.2 in the OP post. The solution was to run

source venv/bin/activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.7

(Note: I think the script fails because the script runs "install --pre torch torchvision torchaudio", it works if you drop the --pre!)

dginovker avatar Nov 24 '24 00:11 dginovker

I was having this issue too. My error looked like

ERROR: HTTP error 403 while getting https://download.pytorch.org/whl/nightly/rocm5.7/torch-2.2.0.dev20231010%2Brocm5.7-cp310-cp310-linux_x86_64.whl (from https://download.pytorch.org/whl/nightly/rocm5.7/torch/)

Notice it says rocm5.7 - Which is more modern than the 5.2 in the OP post. The solution was to run

source venv/bin/activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.7

(Note: I think the script fails because the script runs "install --pre torch torchvision torchaudio", it works if you drop the --pre!)

can you use rocm5.7 with the RX5700XT? I have tried it, and my card doesn't work with newer versions of ROCm.

steffineu89 avatar Nov 24 '24 05:11 steffineu89

Hello, could you give me a hand? I have the same problem and I'm not sure if I did it wrong or it's just not working for me, I would really appreciate your help since I will use automatic1111 to create indie video games and I really need it, thank you very much in advance if you answer this

DarkPhoenix331 avatar Feb 12 '25 23:02 DarkPhoenix331