stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: AMD GPUs not running on with updated
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
When I try to generate an image I get the error below. It is related to the pytorch version as I can get it to work if I roll back the version.
MIOpen(HIP): Error [Compile] 'hiprtcCompileProgram(prog.get(), c_options.size(), c_options.data())' naive_conv.cpp: HIPRTC_ERROR_COMPILATION (6)
MIOpen(HIP): Error [BuildHip] HIPRTC status = HIPRTC_ERROR_COMPILATION (6), source file: naive_conv.cpp
MIOpen(HIP): Warning [BuildHip] /tmp/comgr-bafe6d/input/naive_conv.cpp:39:10: fatal error: 'limits' file not found
#include
Steps to reproduce the problem
Try to generate an image
What should have happened?
image is generated
Commit where the problem happens
1.3.2
What Python version are you running on ?
Python 3.10.x
What platforms do you use to access the UI ?
Linux
What device are you running WebUI on?
AMD GPUs (RX 6000 above)
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
No
List of extensions
No
Console logs
MIOpen(HIP): Error [Compile] 'hiprtcCompileProgram(prog.get(), c_options.size(), c_options.data())' naive_conv.cpp: HIPRTC_ERROR_COMPILATION (6)
MIOpen(HIP): Error [BuildHip] HIPRTC status = HIPRTC_ERROR_COMPILATION (6), source file: naive_conv.cpp
MIOpen(HIP): Warning [BuildHip] /tmp/comgr-bafe6d/input/naive_conv.cpp:39:10: fatal error: 'limits' file not found
#include <limits> // std::numeric_limits
^~~~~~~~
1 error generated when compiling for gfx1030.
terminate called after throwing an instance of 'miopen::Exception'
what(): /long_pathname_so_that_rpms_can_package_the_debug_info/data/driver/MLOpen/src/hipoc/hipoc_program.cpp:304: Code object build failed. Source: naive_conv.cpp
Aborted (core dumped)
Additional information
If I modify webui.sh to install the older version of pytorch I can get it to run
i``` f echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]] then # AMD users will still use torch 1.13 because 2.0 does not seem to work.
export TORCH_COMMAND="pip install torch==2.0.1+rocm5.4.2 torchvision==0.15.2+rocm5.4.2 --index-url https://download.pytorch.org/whl/rocm5.4.2"
export TORCH_COMMAND="pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 --index-url https://download.pytorch.org/whl/rocm5.2"
GPU
Name: gfx1030
Marketing Name: AMD Radeon RX 6800
Same issue. Running a 6700xt.
Same problem on an RX 6600, this appears to be an upstream issue in ROCm https://github.com/RadeonOpenCompute/ROCm/issues/1889.
> clinfo | rg gfx
Device Name gfx1032
Device Name gfx1032
Device Name gfx1032
Device Name gfx1032
Same problem on RX 7900XTX. To even get my GPU noticed i have to run this script:
git clone --branch dev https://github.com/automatic1111/stable-diffusion-webui
cd stable-diffusion-webui
python3 -m venv venv
. venv/bin/activate
export HSA_OVERRIDE_GFX_VERSION=11.0.0
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm5.5
./webui.sh --no-half
No errors occur during setup. I get the same error as the OP when trying to generate an image.
Linux Mint 21.2 Kernel 5.15.0-77-generic AMD Ryzen 7 7800X3D 32 GB RAM AMD RX 7900XTX ROCm 5.6.0
I think I know how to correct the issue. I found a similar post on pytorch forum.
There is a missing app run the following and let me know if it fixes it.
sudo apt install libstdc++-12-dev
I think I know how to correct the issue. I found a similar post on pytorch forum.
There is a missing app run the following and let me know if it fixes it.
sudo apt install libstdc++-12-dev
I also hit this error, and that fix worked for me. Thanks!
I think I know how to correct the issue. I found a similar post on pytorch forum.
There is a missing app run the following and let me know if it fixes it.
sudo apt install libstdc++-12-dev
Also worked for me, much appreciated
On Ryzen 7 7700 the apt command didn't fis the issue
HSA_OVERRIDE_GFX_VERSION=10.3.0 ./webui.sh
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################
################################################################
Running on g 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.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a
Launching Web UI with arguments: --no-half --no-half-vae --skip-torch-cuda-test --listen
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Loading weights [c5baa61ff4] from /home/g/Code/stable-diffusion-webui/stable-diffusion-webui/models/Stable-diffusion/sdxl/sd_xl_base_1.0.safetensors
MIOpen(HIP): Error [Compile] 'hiprtcCompileProgram(prog.get(), c_options.size(), c_options.data())' naive_conv.cpp: HIPRTC_ERROR_COMPILATION (6)
MIOpen(HIP): Error [BuildHip] HIPRTC status = HIPRTC_ERROR_COMPILATION (6), source file: naive_conv.cpp
MIOpen(HIP): Warning [BuildHip] /tmp/comgr-499674/input/naive_conv.cpp:39:10: fatal error: 'limits' file not found
#include <limits> // std::numeric_limits
^~~~~~~~
1 error generated when compiling for gfx1030.
terminate called after throwing an instance of 'miopen::Exception'
what(): /long_pathname_so_that_rpms_can_package_the_debug_info/data/driver/MLOpen/src/hipoc/hipoc_program.cpp:304: Code object build failed. Source: naive_conv.cpp
./webui.sh: line 254: 780665 Aborted "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"