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

[Bug]: "Torch is not able to use GPU" on RX 580 2048SP

Open marohinmark opened this issue 2 years ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

Trying to run unmodified WebUI on Ubuntu 22.04 (i5-10500 + RX570 8GB), does not run without --skip-torch-cuda test, can use only CPU.

Steps to reproduce the problem

  1. Clone WebUI
  2. Put any model in models/Stable-diffusion
  3. Launch WebUI with TORCH_COMMAND='pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.1.1' python launch.py --no-half

What should have happened?

Successful launch of WebUI; RX500 series should have no problems.

Commit where the problem happens

b08500cec8a791ef20082628b49b17df833f5dda

What platforms do you use to access the UI ?

Linux

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

No

List of extensions

No extensions, unmodified webui

Console logs

https://pastebin.com/qpzsCS6K

Additional information

Rocminfo successfully detects the GPU as RX 580 2048SP, but I am unable to use it.

marohinmark avatar May 14 '23 02:05 marohinmark

I thought you can only use NVIDIA gpu and not AMD?

AshifulBhuiyan avatar May 14 '23 02:05 AshifulBhuiyan

AMD can be used. And documentation says that RX500 should have no issues and can run WebUI without --no-half and --precision full

marohinmark avatar May 14 '23 02:05 marohinmark

I have confirmed that rocm and opencl actually works on this gpu. rocminfo: Снимок экрана от 2023-05-14 14-13-24 clinfo: Снимок экрана от 2023-05-14 14-13-36

marohinmark avatar May 14 '23 04:05 marohinmark

UPD: I assume custom torch is needed now, but i couldnt find one that will install on ubuntu 22.04 (wheel is not supported on this platform) https://pastebin.com/e9dPQwWV

marohinmark avatar May 14 '23 04:05 marohinmark

UPD: I assume custom torch is needed now, but i couldnt find one that will install on ubuntu 22.04 (wheel is not supported on this platform) https://pastebin.com/e9dPQwWV

I used these ones, works with my rx584 and kubuntu 22.04 both with auto and voldy fork: https://github.com/tsl0922/pytorch-gfx803/releases

albinose avatar May 14 '23 11:05 albinose

UPD: I assume custom torch is needed now, but i couldnt find one that will install on ubuntu 22.04 (wheel is not supported on this platform) https://pastebin.com/e9dPQwWV

I used these ones, works with my rx584 and kubuntu 22.04 both with auto and voldy fork: https://github.com/tsl0922/pytorch-gfx803/releases How did you install these? Installed them in venv?

marohinmark avatar May 14 '23 11:05 marohinmark

How did you install these? Installed them in venv?

Yes, activated venv and installed from there I also manually installed some missing libraries giving errors, libstdc++-12-dev, openmpi and libopenblas, if i remember correctly

albinose avatar May 14 '23 12:05 albinose

okay, will try, not closing yet

marohinmark avatar May 14 '23 12:05 marohinmark

okay, will try, not closing yet

@marohinmark So what did you do to make it work? I'm getting a similar error on my RX 580 and have rocm 5.3 installed

vitaminsofsalem avatar May 17 '23 17:05 vitaminsofsalem

Have same issue =(

alex-suspicious avatar May 22 '23 05:05 alex-suspicious