AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.59k stars 26.61k forks source link

[Bug]: RX 6750 XT not supported [Arch Linux] #13824

Open PrintStringName opened 11 months ago

PrintStringName commented 11 months ago

Is there an existing issue for this?

What happened?

Torch does not detect RX 6750 XT for GPU acceleration, giving the dreaded "Torch is not able to use GPU" error. Worked when I tried it a few months ago, but seems to be broken now. This is on a clean install.

sysinfo file anonymised to remove name.

Steps to reproduce the problem

  1. Follow installation instructions for Arch + AMD GPU
  2. Attempt to run ./webui.sh

What should have happened?

Web UI should launch and use GPU for acceleration.

Sysinfo

sysinfo-2023-11-02-20-49.txt

What browsers do you use to access the UI ?

Mozilla Firefox

Console logs

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on <user> user
################################################################

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

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

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.11.5 (main, Sep  2 2023, 14:16:33) [GCC 13.2.1 20230801]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Traceback (most recent call last):
  File "/home/<name>/Documents/SD/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/<name>/Documents/SD/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/<name>/Documents/SD/stable-diffusion-webui/modules/launch_utils.py", line 356, in prepare_environment
    raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

Additional information

Running an RX 6750 XT Red Devil, Ryzen 5 2600, Gigabyte AB350M-D3V, 16GB generic 3000MT/s RAM.

s-b-repo commented 11 months ago

maybe rollback to older version where it still worked

s-b-repo commented 11 months ago

and also check your launch options line 39 and 48

Anders1974 commented 11 months ago

Change your Python version to a supported version 3.10.6 - 3.10.x. Python 3.11.x is not supported

UltraBlackLinux commented 10 months ago

I don't understand why it wouldn't be supported. It's a shame that it isn't.

I had previously used https://archlinux.org/packages/extra/x86_64/python-pytorch/ which has some gpu support included that the pip package has not. I recently tried my luck pulling almost half a year worth of changes and since then it's no longer detecting my GPU. No idea how to proceed from here, and I'm pretty tired of trying random things until it works. I'm surprised that pytorch apparently doesn't even include the rx 6700 xt by default

Edit: Did a full reinstall. Was less painful than I'd expected. Now it works :shrug:

wmjdgla commented 9 months ago

I'm using Python 3.11 and it works fine. Your sysinfo seems to show that you got the wrong torch version. Probably torchvision too. Since you're on Linux and AMD GPU, the version of torch and torchvision should have the +rocm5.4.2 suffix. However sysinfo shows that your torch version is either 2.1.0+cu121 or just 2.1.0. +cu121 is for Nvidia GPUs while no suffix means GPU-less. What you need is to reinstall your torch and torchvision in your venv (i.e. <your webui dir>\venv\scripts\python -m pip install ...) using the following in your pip command: torch==2.0.1+rocm5.4.2 torchvision==0.15.2+rocm5.4.2 --index-url https://download.pytorch.org/whl/rocm5.4.2.

If you understood the above then you can safely upgrade your torch, torchvision, and associated rocm to the latest version. You can get the latest URL for --index-url from https://pytorch.org/get-started/locally/