lllyasviel / lllyasviel/stable-diffusion-webui-forge
[Bug]: DirectML not launching
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [X] 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
- [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?
Tried to launch webui through webui-user.bat and it can't. Seems like torch_directml doesn't get installed and that the program supposes that i'm using a cuda compatible gpu.
### Steps to reproduce the problem
1. Git clone stable-diffusion-webui-forge
2. Add `--directml --skip-torch-cuda-test` to COMMANDLINE_ARGS in webui-user.bat
3. Launch webui-user.bat
### What should have happened?
It should have launched the UI.
### What browsers do you use to access the UI ?
Mozilla Firefox
### Sysinfo
I couldn't get the sysinfo dump either
```Traceback (most recent call last):
File "C:\stable-diffusion-webui-forge\launch.py", line 48, in
main()
File "C:\stable-diffusion-webui-forge\launch.py", line 29, in main
filename = launch_utils.dump_sysinfo()
File "C:\stable-diffusion-webui-forge\modules\launch_utils.py", line 516, in dump_sysinfo
from modules import sysinfo
File "C:\stable-diffusion-webui-forge\modules\sysinfo.py", line 12, in
from modules import paths_internal, timer, shared, extensions, errors
File "C:\stable-diffusion-webui-forge\modules\shared.py", line 6, in
from modules import shared_cmd_options, shared_gradio_themes, options, shared_items, sd_models_types
File "C:\stable-diffusion-webui-forge\modules\sd_models_types.py", line 1, in
from ldm.models.diffusion.ddpm import LatentDiffusion
ModuleNotFoundError: No module named 'ldm'```
### Console logs
```Shell
venv "C:\stable-diffusion-webui-forge\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.7-latest-41-g6aee7a20
Commit hash: 6aee7a20329b4a0e10b87d841d680562bdde65c7
Launching Web UI with arguments: --directml --skip-torch-cuda-test
Traceback (most recent call last):
File "C:\stable-diffusion-webui-forge\launch.py", line 48, in
main()
File "C:\stable-diffusion-webui-forge\launch.py", line 44, in main
start()
File "C:\stable-diffusion-webui-forge\modules\launch_utils.py", line 508, in start
import webui
File "C:\stable-diffusion-webui-forge\webui.py", line 15, in
initialize_forge()
File "C:\stable-diffusion-webui-forge\modules_forge\initialization.py", line 46, in initialize_forge
import ldm_patched.modules.model_management as model_management
File "C:\stable-diffusion-webui-forge\ldm_patched\modules\model_management.py", line 38, in
import torch_directml
ModuleNotFoundError: No module named 'torch_directml'
```
### Additional information
The DirectML fork of a1111 webui works fine on my AMD Ryzen 3500U Vega 8 laptop APU (2x4GB 2400MHz).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with launch.py and modules/launch_utils.py, then follow initialization through modules_forge/initialization.py into ldm_patched/modules/model_management.py. Reproduce with --directml --skip-torch-cuda-test and inspect the missing torch_directml and ldm imports. Done means webui-user.bat launches the UI on the reported DirectML setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100