lllyasviel / lllyasviel/stable-diffusion-webui-forge
[Bug]: What's up with AMD cards?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [ ] The issue exists after disabling all extensions
- [X] 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?
install is not working on AMD card
I've properly installed ROCm and Torch drivers that function with automatic1111 webui
But the same does not work with Forge.
just executing ./webui.sh gives me the expected -
`RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check`
executing ./webui.sh --skip-torch-cuda-test gives me -
`RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx`
### Steps to reproduce the problem
install ROCm 5.7
export TORCH_COMMAND='pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.5.0' - so correct torch drivers get installed
./webui.sh --skip-torch-cuda-test should properly execute Forge webui
### What should have happened?
Webui should have started the same as automatic1111 I would have presumed
### What browsers do you use to access the UI ?
_No response_
### Sysinfo
[sysinfo-2024-04-09-02-33.json](https://github.com/lllyasviel/stable-diffusion-webui-forge/files/14912747/sysinfo-2024-04-09-02-33.json)
### Console logs
```Shell
❯ ./webui.sh --skip-torch-cuda-test
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################
################################################################
Running on martin user
################################################################
################################################################
Repo already cloned, using it as install directory
################################################################
################################################################
Create and activate python venv
################################################################
################################################################
Launching launch.py...
################################################################
glibc version is 2.39
ldconfig: Can't open cache file /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/etc/ld.so.cache
: No such file or directory
ldconfig: Can't open cache file /nix/store/ddwyrxif62r8n6xclvskjyy6szdhvj60-glibc-2.39-5/etc/ld.so.cache
: No such file or directory
Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage)
Python 3.10.14 (main, Mar 19 2024, 21:46:16) [GCC 13.2.0]
Version: f0.0.17v1.8.0rc-latest-276-g29be1da7
Commit hash: 29be1da7cf2b5dccfc70fbdd33eb35c56a31ffb7
Launching Web UI with arguments: --skip-torch-cuda-test
Traceback (most recent call last):
File "/home/martin/devel/SD/stable-diffusion-webui-forge/launch.py", line 51, in
main()
File "/home/martin/devel/SD/stable-diffusion-webui-forge/launch.py", line 47, in main
start()
File "/home/martin/devel/SD/stable-diffusion-webui-forge/modules/launch_utils.py", line 541, in start
import webui
File "/home/martin/devel/SD/stable-diffusion-webui-forge/webui.py", line 17, in
initialize_forge()
File "/home/martin/devel/SD/stable-diffusion-webui-forge/modules_forge/initialization.py", line 50, in initialize_forge
import ldm_patched.modules.model_management as model_management
File "/home/martin/devel/SD/stable-diffusion-webui-forge/ldm_patched/modules/model_management.py", line 122, in
total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
File "/home/martin/devel/SD/stable-diffusion-webui-forge/ldm_patched/modules/model_management.py", line 91, in get_torch_device
return torch.device(torch.cuda.current_device())
File "/home/martin/devel/SD/stable-diffusion-webui-forge/venv/lib/python3.10/site-packages/torch/cuda/__init__.py", line 787, in current_device
_lazy_init()
File "/home/martin/devel/SD/stable-diffusion-webui-forge/venv/lib/python3.10/site-packages/torch/cuda/__init__.py", line 302, in _lazy_init
torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
```
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the startup failure with ROCm and the reported torch installation command, then trace the stack from launch.py through modules_forge/initialization.py to ldm_patched/modules/model_management.py, especially get_torch_device(). Compare the AMD failure with the reported NVIDIA-driver error; done means the web UI starts on the reported AMD setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100