lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: Error when trying to use directml #386

Closed sasoriza closed 7 months ago

sasoriza commented 7 months ago

Checklist

What happened?

Starting webui-user.bat without command parameters will throw this error: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

Trying to start webui-user.bat with command parameters (--use-directml --update-all-extensions --medvram --opt-sub-quad-attention --opt-split-attention --no-half --upcast-sampling --update-check) after adding torch-directml to requirements_versions.txt will throw these errors:

Style database not found: C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\styles.csv
Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1086, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\modeling_tf_utils.py", line 76, in <module>
    from keras.__internal__ import KerasTensor
ModuleNotFoundError: No module named 'keras.__internal__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1086, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\optimum\onnxruntime\modeling_diffusion.py", line 41, in <module>
    from ..exporters.onnx import main_export
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\optimum\exporters\__init__.py", line 16, in <module>
    from .tasks import TasksManager  # noqa
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\optimum\exporters\tasks.py", line 52, in <module>
    from transformers import TFPreTrainedModel
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1076, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.modeling_tf_utils because of the following error (look up to see its traceback):
No module named 'keras.__internal__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\launch.py", line 48, in <module>
    main()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\launch.py", line 44, in main
    start()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\launch_utils.py", line 677, in start
    import webui
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\initialize.py", line 34, in imports
    shared_init.initialize()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\shared_init.py", line 57, in initialize
    initialize_onnx()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\onnx_impl\__init__.py", line 236, in initialize
    from .pipelines.onnx_stable_diffusion_xl_pipeline import OnnxStableDiffusionXLPipeline
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\onnx_impl\pipelines\onnx_stable_diffusion_xl_pipeline.py", line 8, in <module>
    class OnnxStableDiffusionXLPipeline(CallablePipelineBase, optimum.onnxruntime.ORTStableDiffusionXLPipeline):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1076, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import optimum.onnxruntime.modeling_diffusion because of the following error (look up to see its traceback):
Failed to import transformers.modeling_tf_utils because of the following error (look up to see its traceback):
No module named 'keras.__internal__'

Steps to reproduce the problem

  1. Add torch-directml to requirements_versions.txt
  2. Start webui-user.bat with these command parameters: --use-directml --update-all-extensions --medvram --opt-sub-quad-attention --opt-split-attention --no-half --upcast-sampling --update-check

What should have happened?

It should have started correctly...

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

Can't even get it to start

Console logs

PS C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml> .\webui-user.bat
venv "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.7.0
Commit hash: 835ee2013fc46230271a02a002b4ba08c689f62d
Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\launch.py", line 48, in <module>
    main()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\launch.py", line 39, in main
    prepare_environment()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\launch_utils.py", line 560, 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
Drücken Sie eine beliebige Taste . . .
PS C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml> .\venv\Scripts\activate
(venv) PS C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml> pip install -r .\requirements.txt
Collecting GitPython
  Downloading GitPython-3.1.41-py3-none-any.whl (196 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 196.4/196.4 kB 6.0 MB/s eta 0:00:00
Requirement already satisfied: Pillow in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from -r .\requirements.txt (line 2)) (10.2.0)
Collecting accelerate
  Downloading accelerate-0.27.2-py3-none-any.whl (279 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 280.0/280.0 kB 16.9 MB/s eta 0:00:00
Collecting basicsr
  Using cached basicsr-1.4.2-py3-none-any.whl
Collecting blendmodes
  Downloading blendmodes-2024.1-py3-none-any.whl (10 kB)
Collecting clean-fid
  Using cached clean_fid-0.1.35-py3-none-any.whl (26 kB)
Collecting diffusers
  Using cached diffusers-0.26.3-py3-none-any.whl (1.9 MB)
Collecting einops
  Downloading einops-0.7.0-py3-none-any.whl (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.6/44.6 kB ? eta 0:00:00
Collecting fastapi>=0.90.1
  Downloading fastapi-0.109.2-py3-none-any.whl (92 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.1/92.1 kB ? eta 0:00:00
Collecting gfpgan
  Using cached gfpgan-1.3.8-py3-none-any.whl (52 kB)
Collecting gradio==3.41.2
  Using cached gradio-3.41.2-py3-none-any.whl (20.1 MB)
Collecting inflection
  Using cached inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting jsonmerge
  Downloading jsonmerge-1.9.2-py3-none-any.whl (19 kB)
Collecting kornia
  Downloading kornia-0.7.1-py2.py3-none-any.whl (756 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 756.0/756.0 kB 12.0 MB/s eta 0:00:00
Collecting lark
  Downloading lark-1.1.9-py3-none-any.whl (111 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 111.7/111.7 kB ? eta 0:00:00
Requirement already satisfied: numpy in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from -r .\requirements.txt (line 17)) (1.26.4)
Collecting omegaconf
  Downloading omegaconf-2.3.0-py3-none-any.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB ? eta 0:00:00
Collecting open-clip-torch
  Downloading open_clip_torch-2.24.0-py3-none-any.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 11.9 MB/s eta 0:00:00
Collecting piexif
  Using cached piexif-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting psutil
  Downloading psutil-5.9.8-cp37-abi3-win_amd64.whl (255 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 255.1/255.1 kB 15.3 MB/s eta 0:00:00
Collecting pytorch_lightning
  Downloading pytorch_lightning-2.2.0.post0-py3-none-any.whl (800 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 800.9/800.9 kB 12.8 MB/s eta 0:00:00
Collecting realesrgan
  Using cached realesrgan-0.3.0-py3-none-any.whl (26 kB)
Requirement already satisfied: requests in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from -r .\requirements.txt (line 25)) (2.31.0)
Collecting resize-right
  Using cached resize_right-0.0.2-py3-none-any.whl (8.9 kB)
Collecting safetensors
  Downloading safetensors-0.4.2-cp310-none-win_amd64.whl (269 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 269.5/269.5 kB 8.1 MB/s eta 0:00:00
Collecting scikit-image>=0.19
  Using cached scikit_image-0.22.0-cp310-cp310-win_amd64.whl (24.5 MB)
Collecting timm
  Downloading timm-0.9.12-py3-none-any.whl (2.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 12.9 MB/s eta 0:00:00
Collecting tomesd
  Using cached tomesd-0.1.3-py3-none-any.whl (11 kB)
Requirement already satisfied: torch>=2.0.0 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from -r .\requirements.txt (line 32)) (2.2.0+cu121)
Collecting torchdiffeq
  Using cached torchdiffeq-0.2.3-py3-none-any.whl (31 kB)
Collecting torchsde
  Using cached torchsde-0.2.6-py3-none-any.whl (61 kB)
Collecting transformers==4.30.2
  Using cached transformers-4.30.2-py3-none-any.whl (7.2 MB)
Collecting onnx
  Using cached onnx-1.15.0-cp310-cp310-win_amd64.whl (14.3 MB)
Collecting onnxruntime
  Using cached onnxruntime-1.17.0-cp310-cp310-win_amd64.whl (5.6 MB)
Collecting optimum
  Using cached optimum-1.16.2-py3-none-any.whl (402 kB)
Collecting olive-ai
  Using cached olive_ai-0.4.0-py3-none-any.whl (496 kB)
Requirement already satisfied: typing-extensions~=4.0 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from gradio==3.41.2->-r .\requirements.txt (line 12)) (4.9.0)
Collecting gradio-client==0.5.0
  Using cached gradio_client-0.5.0-py3-none-any.whl (298 kB)
Collecting pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4
  Downloading pydantic-2.6.1-py3-none-any.whl (394 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 394.8/394.8 kB 12.0 MB/s eta 0:00:00
Requirement already satisfied: markupsafe~=2.0 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from gradio==3.41.2->-r .\requirements.txt (line 12)) (2.1.5)
Requirement already satisfied: jinja2<4.0 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from gradio==3.41.2->-r .\requirements.txt (line 12)) (3.1.3)
Collecting huggingface-hub>=0.14.0
  Using cached huggingface_hub-0.20.3-py3-none-any.whl (330 kB)
Collecting packaging
  Using cached packaging-23.2-py3-none-any.whl (53 kB)
Collecting pyyaml<7.0,>=5.0
  Using cached PyYAML-6.0.1-cp310-cp310-win_amd64.whl (145 kB)
Collecting orjson~=3.0
  Using cached orjson-3.9.14-cp310-none-win_amd64.whl (139 kB)
Collecting uvicorn>=0.14.0
  Using cached uvicorn-0.27.1-py3-none-any.whl (60 kB)
Collecting aiofiles<24.0,>=22.0
  Using cached aiofiles-23.2.1-py3-none-any.whl (15 kB)
Collecting httpx
  Downloading httpx-0.26.0-py3-none-any.whl (75 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.9/75.9 kB 4.4 MB/s eta 0:00:00
Collecting pydub
  Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting python-multipart
  Using cached python_multipart-0.0.9-py3-none-any.whl (22 kB)
Collecting importlib-resources<7.0,>=1.3
  Using cached importlib_resources-6.1.1-py3-none-any.whl (33 kB)
Collecting websockets<12.0,>=10.0
  Using cached websockets-11.0.3-cp310-cp310-win_amd64.whl (124 kB)
Collecting ffmpy
  Using cached ffmpy-0.3.2-py3-none-any.whl
Collecting altair<6.0,>=4.2.0
  Using cached altair-5.2.0-py3-none-any.whl (996 kB)
Collecting semantic-version~=2.0
  Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting pandas<3.0,>=1.0
  Using cached pandas-2.2.0-cp310-cp310-win_amd64.whl (11.6 MB)
Collecting matplotlib~=3.0
  Using cached matplotlib-3.8.2-cp310-cp310-win_amd64.whl (7.6 MB)
Collecting tqdm>=4.27
  Using cached tqdm-4.66.2-py3-none-any.whl (78 kB)
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1
  Using cached tokenizers-0.13.3-cp310-cp310-win_amd64.whl (3.5 MB)
Collecting regex!=2019.12.17
  Using cached regex-2023.12.25-cp310-cp310-win_amd64.whl (269 kB)
Requirement already satisfied: filelock in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from transformers==4.30.2->-r .\requirements.txt (line 35)) (3.13.1)
Requirement already satisfied: fsspec in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from gradio-client==0.5.0->gradio==3.41.2->-r .\requirements.txt (line 12)) (2024.2.0)
Collecting gitdb<5,>=4.0.1
  Using cached gitdb-4.0.11-py3-none-any.whl (62 kB)
Collecting lmdb
  Using cached lmdb-1.4.1-cp310-cp310-win_amd64.whl (100 kB)
Collecting addict
  Using cached addict-2.4.0-py3-none-any.whl (3.8 kB)
Collecting tb-nightly
  Using cached tb_nightly-2.17.0a20240214-py3-none-any.whl (5.5 MB)
Collecting future
  Using cached future-0.18.3-py3-none-any.whl
Collecting scipy
  Using cached scipy-1.12.0-cp310-cp310-win_amd64.whl (46.2 MB)
Collecting opencv-python
  Using cached opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl (38.6 MB)
Requirement already satisfied: torchvision in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from basicsr->-r .\requirements.txt (line 5)) (0.17.0+cu121)
Collecting yapf
  Using cached yapf-0.40.2-py3-none-any.whl (254 kB)
Collecting aenum<4,>=3.1.15
  Using cached aenum-3.1.15-py3-none-any.whl (137 kB)
Collecting importlib-metadata
  Using cached importlib_metadata-7.0.1-py3-none-any.whl (23 kB)
Collecting starlette<0.37.0,>=0.36.3
  Downloading starlette-0.36.3-py3-none-any.whl (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.5/71.5 kB 3.8 MB/s eta 0:00:00
Collecting facexlib>=0.2.5
  Using cached facexlib-0.3.0-py3-none-any.whl (59 kB)
Collecting jsonschema>2.4.0
  Using cached jsonschema-4.21.1-py3-none-any.whl (85 kB)
Collecting antlr4-python3-runtime==4.9.*
  Using cached antlr4_python3_runtime-4.9.3-py3-none-any.whl
Collecting sentencepiece
  Using cached sentencepiece-0.1.99-cp310-cp310-win_amd64.whl (977 kB)
Collecting protobuf
  Using cached protobuf-4.25.2-cp310-abi3-win_amd64.whl (413 kB)
Collecting ftfy
  Using cached ftfy-6.1.3-py3-none-any.whl (53 kB)
Collecting lightning-utilities>=0.8.0
  Using cached lightning_utilities-0.10.1-py3-none-any.whl (24 kB)
Collecting torchmetrics>=0.7.0
  Using cached torchmetrics-1.3.1-py3-none-any.whl (840 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from requests->-r .\requirements.txt (line 25)) (3.3.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from requests->-r .\requirements.txt (line 25)) (2024.2.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from requests->-r .\requirements.txt (line 25)) (2.2.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from requests->-r .\requirements.txt (line 25)) (3.6)
Requirement already satisfied: networkx>=2.8 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from scikit-image>=0.19->-r .\requirements.txt (line 29)) (3.2.1)
Collecting lazy_loader>=0.3
  Using cached lazy_loader-0.3-py3-none-any.whl (9.1 kB)
Collecting imageio>=2.27
  Using cached imageio-2.34.0-py3-none-any.whl (313 kB)
Collecting tifffile>=2022.8.12
  Using cached tifffile-2024.2.12-py3-none-any.whl (224 kB)
Requirement already satisfied: sympy in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from torch>=2.0.0->-r .\requirements.txt (line 32)) (1.12)
Collecting trampoline>=0.1.2
  Using cached trampoline-0.1.2-py3-none-any.whl (5.2 kB)
Collecting coloredlogs
  Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
Collecting flatbuffers
  Using cached flatbuffers-23.5.26-py2.py3-none-any.whl (26 kB)
Collecting datasets
  Using cached datasets-2.17.0-py3-none-any.whl (536 kB)
Collecting transformers[sentencepiece]>=4.26.0
  Using cached transformers-4.37.2-py3-none-any.whl (8.4 MB)
Collecting pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4
  Using cached pydantic-1.10.14-cp310-cp310-win_amd64.whl (2.1 MB)
Collecting torchmetrics>=0.7.0
  Using cached torchmetrics-0.10.3-py3-none-any.whl (529 kB)
Collecting optuna
  Using cached optuna-3.5.0-py3-none-any.whl (413 kB)
Collecting protobuf
  Using cached protobuf-3.20.3-cp310-cp310-win_amd64.whl (904 kB)
Collecting toolz
  Using cached toolz-0.12.1-py3-none-any.whl (56 kB)
Collecting numba
  Using cached numba-0.59.0-cp310-cp310-win_amd64.whl (2.7 MB)
Collecting filterpy
  Using cached filterpy-1.4.5-py3-none-any.whl
Collecting aiohttp!=4.0.0a0,!=4.0.0a1
  Using cached aiohttp-3.9.3-cp310-cp310-win_amd64.whl (365 kB)
Collecting smmap<6,>=3.0.1
  Using cached smmap-5.0.1-py3-none-any.whl (24 kB)
Collecting jsonschema-specifications>=2023.03.6
  Using cached jsonschema_specifications-2023.12.1-py3-none-any.whl (18 kB)
Collecting rpds-py>=0.7.1
  Using cached rpds_py-0.18.0-cp310-none-win_amd64.whl (206 kB)
Collecting attrs>=22.2.0
  Using cached attrs-23.2.0-py3-none-any.whl (60 kB)
Collecting referencing>=0.28.4
  Using cached referencing-0.33.0-py3-none-any.whl (26 kB)
Requirement already satisfied: setuptools in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from lightning-utilities>=0.8.0->pytorch_lightning->-r .\requirements.txt (line 23)) (63.2.0)
Collecting pyparsing>=2.3.1
  Using cached pyparsing-3.1.1-py3-none-any.whl (103 kB)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.2.0-cp310-cp310-win_amd64.whl (186 kB)
Collecting cycler>=0.10
  Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.48.1-cp310-cp310-win_amd64.whl (2.2 MB)
Collecting kiwisolver>=1.3.1
  Using cached kiwisolver-1.4.5-cp310-cp310-win_amd64.whl (56 kB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz>=2020.1
  Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
Collecting tzdata>=2022.7
  Using cached tzdata-2024.1-py2.py3-none-any.whl (345 kB)
Collecting anyio<5,>=3.4.0
  Downloading anyio-4.2.0-py3-none-any.whl (85 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.5/85.5 kB 5.0 MB/s eta 0:00:00
Collecting colorama
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting transformers[sentencepiece]>=4.26.0
  Using cached transformers-4.37.1-py3-none-any.whl (8.4 MB)
  Using cached transformers-4.37.0-py3-none-any.whl (8.4 MB)
  Using cached transformers-4.36.2-py3-none-any.whl (8.2 MB)
  Using cached transformers-4.36.1-py3-none-any.whl (8.3 MB)
  Using cached transformers-4.36.0-py3-none-any.whl (8.2 MB)
  Using cached transformers-4.35.2-py3-none-any.whl (7.9 MB)
  Using cached transformers-4.35.1-py3-none-any.whl (7.9 MB)
  Using cached transformers-4.35.0-py3-none-any.whl (7.9 MB)
  Using cached transformers-4.34.1-py3-none-any.whl (7.7 MB)
  Using cached transformers-4.34.0-py3-none-any.whl (7.7 MB)
  Using cached transformers-4.33.3-py3-none-any.whl (7.6 MB)
  Using cached transformers-4.33.2-py3-none-any.whl (7.6 MB)
  Using cached transformers-4.33.1-py3-none-any.whl (7.6 MB)
  Using cached transformers-4.33.0-py3-none-any.whl (7.6 MB)
  Using cached transformers-4.32.1-py3-none-any.whl (7.5 MB)
  Using cached transformers-4.32.0-py3-none-any.whl (7.5 MB)
  Using cached transformers-4.31.0-py3-none-any.whl (7.4 MB)
Collecting click>=7.0
  Using cached click-8.1.7-py3-none-any.whl (97 kB)
Collecting h11>=0.8
  Downloading h11-0.14.0-py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 3.0 MB/s eta 0:00:00
Collecting humanfriendly>=9.1
  Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
Collecting datasets
  Using cached datasets-2.16.1-py3-none-any.whl (507 kB)
  Using cached datasets-2.16.0-py3-none-any.whl (507 kB)
  Using cached datasets-2.15.0-py3-none-any.whl (521 kB)
  Using cached datasets-2.14.7-py3-none-any.whl (520 kB)
  Using cached datasets-2.14.6-py3-none-any.whl (493 kB)
  Using cached datasets-2.14.5-py3-none-any.whl (519 kB)
Collecting dill<0.3.8,>=0.3.0
  Using cached dill-0.3.7-py3-none-any.whl (115 kB)
Collecting datasets
  Using cached datasets-2.14.4-py3-none-any.whl (519 kB)
Collecting xxhash
  Using cached xxhash-3.4.1-cp310-cp310-win_amd64.whl (29 kB)
Collecting multiprocess
  Using cached multiprocess-0.70.16-py310-none-any.whl (134 kB)
Collecting pyarrow>=8.0.0
  Using cached pyarrow-15.0.0-cp310-cp310-win_amd64.whl (24.8 MB)
Collecting wcwidth<0.3.0,>=0.2.12
  Using cached wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Collecting httpcore==1.*
  Downloading httpcore-1.0.3-py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.0/77.0 kB ? eta 0:00:00
Collecting sniffio
  Using cached sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting zipp>=0.5
  Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)
Collecting alembic>=1.5.0
  Using cached alembic-1.13.1-py3-none-any.whl (233 kB)
Collecting sqlalchemy>=1.3.0
  Using cached SQLAlchemy-2.0.27-cp310-cp310-win_amd64.whl (2.1 MB)
Collecting colorlog
  Using cached colorlog-6.8.2-py3-none-any.whl (11 kB)
Requirement already satisfied: mpmath>=0.19 in c:\users\user\appdata\roaming\automatic111\stable-diffusion-webui-directml\venv\lib\site-packages (from sympy->torch>=2.0.0->-r .\requirements.txt (line 32)) (1.3.0)
Collecting werkzeug>=1.0.1
  Using cached werkzeug-3.0.1-py3-none-any.whl (226 kB)
Collecting tf-keras-nightly
  Using cached tf_keras_nightly-2.17.0.dev2024021422-py3-none-any.whl (1.7 MB)
Collecting grpcio>=1.48.2
  Using cached grpcio-1.60.1-cp310-cp310-win_amd64.whl (3.7 MB)
Collecting markdown>=2.6.8
  Using cached Markdown-3.5.2-py3-none-any.whl (103 kB)
Collecting tensorboard-data-server<0.8.0,>=0.7.0
  Using cached tensorboard_data_server-0.7.2-py3-none-any.whl (2.4 kB)
Collecting six>1.9
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting absl-py>=0.4
  Using cached absl_py-2.1.0-py3-none-any.whl (133 kB)
Collecting platformdirs>=3.5.1
  Using cached platformdirs-4.2.0-py3-none-any.whl (17 kB)
Collecting tomli>=2.0.1
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting aiosignal>=1.1.2
  Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.9.4-cp310-cp310-win_amd64.whl (76 kB)
Collecting async-timeout<5.0,>=4.0
  Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
Collecting frozenlist>=1.1.1
  Using cached frozenlist-1.4.1-cp310-cp310-win_amd64.whl (50 kB)
Collecting multidict<7.0,>=4.5
  Using cached multidict-6.0.5-cp310-cp310-win_amd64.whl (28 kB)
Collecting Mako
  Using cached Mako-1.3.2-py3-none-any.whl (78 kB)
Collecting exceptiongroup>=1.0.2
  Using cached exceptiongroup-1.2.0-py3-none-any.whl (16 kB)
Collecting pyreadline3
  Using cached pyreadline3-3.4.1-py3-none-any.whl (95 kB)
Collecting greenlet!=0.4.17
  Using cached greenlet-3.0.3-cp310-cp310-win_amd64.whl (292 kB)
Collecting multiprocess
  Using cached multiprocess-0.70.15-py310-none-any.whl (134 kB)
Collecting llvmlite<0.43,>=0.42.0dev0
  Using cached llvmlite-0.42.0-cp310-cp310-win_amd64.whl (28.1 MB)
Collecting tf-nightly~=2.17.0.dev
  Using cached tf_nightly-2.17.0.dev20240214-cp310-cp310-win_amd64.whl (2.2 kB)
Collecting tf-nightly-intel==2.17.0-dev20240214
  Using cached tf_nightly_intel-2.17.0.dev20240214-cp310-cp310-win_amd64.whl (211.9 MB)
Collecting opt-einsum>=2.3.2
  Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting astunparse>=1.6.0
  Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting h5py>=3.10.0
  Using cached h5py-3.10.0-cp310-cp310-win_amd64.whl (2.7 MB)
Collecting tensorflow-io-gcs-filesystem>=0.23.1
  Using cached tensorflow_io_gcs_filesystem-0.31.0-cp310-cp310-win_amd64.whl (1.5 MB)
Collecting libclang>=13.0.0
  Using cached libclang-16.0.6-py2.py3-none-win_amd64.whl (24.4 MB)
Collecting ml-dtypes~=0.3.1
  Using cached ml_dtypes-0.3.2-cp310-cp310-win_amd64.whl (127 kB)
Collecting wrapt>=1.11.0
  Using cached wrapt-1.16.0-cp310-cp310-win_amd64.whl (37 kB)
Collecting keras-nightly~=3.0.0.dev
  Using cached keras_nightly-3.0.4.dev2024021403-py3-none-any.whl (1.0 MB)
Collecting termcolor>=1.1.0
  Using cached termcolor-2.4.0-py3-none-any.whl (7.7 kB)
Collecting tb-nightly
  Using cached tb_nightly-2.16.0a20240212-py3-none-any.whl (5.5 MB)
Collecting gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1
  Using cached gast-0.5.4-py3-none-any.whl (19 kB)
Collecting google-pasta>=0.1.1
  Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Collecting wheel<1.0,>=0.23.0
  Using cached wheel-0.42.0-py3-none-any.whl (65 kB)
Collecting namex
  Using cached namex-0.0.7-py3-none-any.whl (5.8 kB)
Collecting dm-tree
  Using cached dm_tree-0.1.8-cp310-cp310-win_amd64.whl (101 kB)
Collecting rich
  Using cached rich-13.7.0-py3-none-any.whl (240 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached pygments-2.17.2-py3-none-any.whl (1.2 MB)
Collecting markdown-it-py>=2.2.0
  Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Installing collected packages: wcwidth, trampoline, tokenizers, sentencepiece, resize-right, pytz, pyreadline3, pydub, namex, lmdb, libclang, flatbuffers, ffmpy, dm-tree, antlr4-python3-runtime, aenum, addict, zipp, xxhash, wrapt, wheel, werkzeug, websockets, tzdata, toolz, tomli, tifffile, termcolor, tensorflow-io-gcs-filesystem, tensorboard-data-server, sniffio, smmap, six, semantic-version, scipy, safetensors, rpds-py, regex, pyyaml, python-multipart, pyparsing, pygments, pydantic, pyarrow, psutil, protobuf, platformdirs, piexif, packaging, orjson, opt-einsum, opencv-python, multidict, ml-dtypes, mdurl, markdown, Mako, llvmlite, lazy_loader, lark, kiwisolver, inflection, importlib-resources, imageio, humanfriendly, h5py, h11, grpcio, greenlet, gast, future, ftfy, frozenlist, fonttools, exceptiongroup, einops, dill, cycler, contourpy, colorama, blendmodes, attrs, async-timeout, aiofiles, absl-py, yarl, tqdm, sqlalchemy, scikit-image, referencing, python-dateutil, onnx, omegaconf, numba, multiprocess, markdown-it-py, lightning-utilities, importlib-metadata, httpcore, google-pasta, gitdb, colorlog, coloredlogs, click, astunparse, anyio, aiosignal, yapf, uvicorn, torchsde, torchmetrics, torchdiffeq, tomesd, starlette, rich, pandas, onnxruntime, matplotlib, kornia, jsonschema-specifications, huggingface-hub, httpx, GitPython, alembic, aiohttp, transformers, timm, optuna, keras-nightly, jsonschema, gradio-client, filterpy, fastapi, diffusers, clean-fid, accelerate, pytorch_lightning, open-clip-torch, olive-ai, jsonmerge, facexlib, datasets, altair, optimum, gradio, tf-nightly-intel, tf-nightly, tf-keras-nightly, tb-nightly, basicsr, gfpgan, realesrgan
Successfully installed GitPython-3.1.41 Mako-1.3.2 absl-py-2.1.0 accelerate-0.27.2 addict-2.4.0 aenum-3.1.15 aiofiles-23.2.1 aiohttp-3.9.3 aiosignal-1.3.1 alembic-1.13.1 altair-5.2.0 antlr4-python3-runtime-4.9.3 anyio-4.2.0 astunparse-1.6.3 async-timeout-4.0.3 attrs-23.2.0 basicsr-1.4.2 blendmodes-2024.1 clean-fid-0.1.35 click-8.1.7 colorama-0.4.6 coloredlogs-15.0.1 colorlog-6.8.2 contourpy-1.2.0 cycler-0.12.1 datasets-2.14.4 diffusers-0.26.3 dill-0.3.7 dm-tree-0.1.8 einops-0.7.0 exceptiongroup-1.2.0 facexlib-0.3.0 fastapi-0.109.2 ffmpy-0.3.2 filterpy-1.4.5 flatbuffers-23.5.26 fonttools-4.48.1 frozenlist-1.4.1 ftfy-6.1.3 future-0.18.3 gast-0.5.4 gfpgan-1.3.8 gitdb-4.0.11 google-pasta-0.2.0 gradio-3.41.2 gradio-client-0.5.0 greenlet-3.0.3 grpcio-1.60.1 h11-0.14.0 h5py-3.10.0 httpcore-1.0.3 httpx-0.26.0 huggingface-hub-0.20.3 humanfriendly-10.0 imageio-2.34.0 importlib-metadata-7.0.1 importlib-resources-6.1.1 inflection-0.5.1 jsonmerge-1.9.2 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 keras-nightly-3.0.4.dev2024021403 kiwisolver-1.4.5 kornia-0.7.1 lark-1.1.9 lazy_loader-0.3 libclang-16.0.6 lightning-utilities-0.10.1 llvmlite-0.42.0 lmdb-1.4.1 markdown-3.5.2 markdown-it-py-3.0.0 matplotlib-3.8.2 mdurl-0.1.2 ml-dtypes-0.3.2 multidict-6.0.5 multiprocess-0.70.15 namex-0.0.7 numba-0.59.0 olive-ai-0.4.0 omegaconf-2.3.0 onnx-1.15.0 onnxruntime-1.17.0 open-clip-torch-2.24.0 opencv-python-4.9.0.80 opt-einsum-3.3.0 optimum-1.16.2 optuna-3.5.0 orjson-3.9.14 packaging-23.2 pandas-2.2.0 piexif-1.1.3 platformdirs-4.2.0 protobuf-3.20.3 psutil-5.9.8 pyarrow-15.0.0 pydantic-1.10.14 pydub-0.25.1 pygments-2.17.2 pyparsing-3.1.1 pyreadline3-3.4.1 python-dateutil-2.8.2 python-multipart-0.0.9 pytorch_lightning-2.2.0.post0 pytz-2024.1 pyyaml-6.0.1 realesrgan-0.3.0 referencing-0.33.0 regex-2023.12.25 resize-right-0.0.2 rich-13.7.0 rpds-py-0.18.0 safetensors-0.4.2 scikit-image-0.22.0 scipy-1.12.0 semantic-version-2.10.0 sentencepiece-0.1.99 six-1.16.0 smmap-5.0.1 sniffio-1.3.0 sqlalchemy-2.0.27 starlette-0.36.3 tb-nightly-2.16.0a20240212 tensorboard-data-server-0.7.2 tensorflow-io-gcs-filesystem-0.31.0 termcolor-2.4.0 tf-keras-nightly-2.17.0.dev2024021422 tf-nightly-2.17.0.dev20240214 tf-nightly-intel-2.17.0.dev20240214 tifffile-2024.2.12 timm-0.9.12 tokenizers-0.13.3 tomesd-0.1.3 tomli-2.0.1 toolz-0.12.1 torchdiffeq-0.2.3 torchmetrics-0.10.3 torchsde-0.2.6 tqdm-4.66.2 trampoline-0.1.2 transformers-4.30.2 tzdata-2024.1 uvicorn-0.27.1 wcwidth-0.2.13 websockets-11.0.3 werkzeug-3.0.1 wheel-0.42.0 wrapt-1.16.0 xxhash-3.4.1 yapf-0.40.2 yarl-1.9.4 zipp-3.17.0

[notice] A new release of pip available: 22.2.1 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
(venv) PS C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml> .\webui-user.bat
venv "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.7.0
Commit hash: 835ee2013fc46230271a02a002b4ba08c689f62d
Installing clip
Cloning Stable Diffusion into C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\stable-diffusion-stability-ai...
Cloning into 'C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\stable-diffusion-stability-ai'...
remote: Enumerating objects: 580, done.
remote: Counting objects: 100% (357/357), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 580 (delta 260), reused 229 (delta 229), pack-reused 223Receiving objects:  93% (540/580), 69.13 MiB | 12.54 MiB/s
Receiving objects: 100% (580/580), 73.44 MiB | 12.50 MiB/s, done.
Resolving deltas: 100% (279/279), done.
Cloning Stable Diffusion XL into C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\generative-models...
Cloning into 'C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\generative-models'...
remote: Enumerating objects: 860, done.
remote: Counting objects: 100% (489/489), done.
remote: Compressing objects: 100% (222/222), done.
remote: Total 860 (delta 368), reused 267 (delta 267), pack-reused 371
Receiving objects: 100% (860/860), 42.67 MiB | 12.54 MiB/s, done.
Resolving deltas: 100% (445/445), done.
Cloning K-diffusion into C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\k-diffusion...
Cloning into 'C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\k-diffusion'...
remote: Enumerating objects: 1340, done.
remote: Counting objects: 100% (622/622), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 1340 (delta 576), reused 547 (delta 536), pack-reused 718
Receiving objects: 100% (1340/1340), 242.04 KiB | 5.04 MiB/s, done.
Resolving deltas: 100% (939/939), done.
Cloning CodeFormer into C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\CodeFormer...
Cloning into 'C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\CodeFormer'...
remote: Enumerating objects: 594, done.
remote: Counting objects: 100% (594/594), done.
remote: Compressing objects: 100% (317/317), done.
remote: Total 594 (delta 288), reused 491 (delta 268), pack-reused 0Receiving objects:  99% (589/594), 12.31 MiB | 12.29 MiB/s
Receiving objects: 100% (594/594), 17.31 MiB | 12.40 MiB/s, done.
Resolving deltas: 100% (288/288), done.
Cloning BLIP into C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\BLIP...
Cloning into 'C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\repositories\BLIP'...
remote: Enumerating objects: 277, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 277 (delta 137), reused 136 (delta 135), pack-reused 112Receiving objects:  99% (275/277), 4.63 MiB | 9.24 MiB/s
Receiving objects: 100% (277/277), 7.03 MiB | 10.22 MiB/s, done.
Resolving deltas: 100% (152/152), done.
Installing requirements for CodeFormer
Installing requirements
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
  rank_zero_deprecation(
Installing onnxruntime-directml
2024-02-15 02:06:20.630333: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-02-15 02:06:21.900496: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
Olive: Failed to load olive-ai: Failed to import transformers.models.gpt2.modeling_tf_gpt2 because of the following error (look up to see its traceback):
No module named 'keras.__internal__'
You are up to date with the most recent release.
Launching Web UI with arguments: --use-directml --update-all-extensions --medvram --opt-sub-quad-attention --opt-split-attention --no-half --upcast-sampling --update-check
Style database not found: C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\styles.csv
Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1086, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\modeling_tf_utils.py", line 76, in <module>
    from keras.__internal__ import KerasTensor
ModuleNotFoundError: No module named 'keras.__internal__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1086, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\optimum\onnxruntime\modeling_diffusion.py", line 41, in <module>
    from ..exporters.onnx import main_export
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\optimum\exporters\__init__.py", line 16, in <module>
    from .tasks import TasksManager  # noqa
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\optimum\exporters\tasks.py", line 52, in <module>
    from transformers import TFPreTrainedModel
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1076, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.modeling_tf_utils because of the following error (look up to see its traceback):
No module named 'keras.__internal__'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\launch.py", line 48, in <module>
    main()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\launch.py", line 44, in main
    start()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\launch_utils.py", line 677, in start
    import webui
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\initialize.py", line 34, in imports
    shared_init.initialize()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\shared_init.py", line 57, in initialize
    initialize_onnx()
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\onnx_impl\__init__.py", line 236, in initialize
    from .pipelines.onnx_stable_diffusion_xl_pipeline import OnnxStableDiffusionXLPipeline
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\modules\onnx_impl\pipelines\onnx_stable_diffusion_xl_pipeline.py", line 8, in <module>
    class OnnxStableDiffusionXLPipeline(CallablePipelineBase, optimum.onnxruntime.ORTStableDiffusionXLPipeline):
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1076, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\user\AppData\Roaming\Automatic111\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import optimum.onnxruntime.modeling_diffusion because of the following error (look up to see its traceback):
Failed to import transformers.modeling_tf_utils because of the following error (look up to see its traceback):
No module named 'keras.__internal__'

Additional information

No response

Maxmaxio01 commented 7 months ago

me too!!! I reinstall many time it same ploblem.

sa20001 commented 7 months ago

I went back to commit d500e58a65d99bfaa9c7bb0da6c3eb5704fadf25, on that commit it still works git checkout d500e58a65d99bfaa9c7bb0da6c3eb5704fadf25

Maxmaxio01 commented 7 months ago

I went back to commit d500e58, on that commit it still works git checkout d500e58a65d99bfaa9c7bb0da6c3eb5704fadf25

hey!!! so thank you dude it work!!!!

notloged commented 7 months ago

same error here

demon8555 commented 7 months ago

Don't we have to use the --use-cpu-torch argument?

doctorzgh commented 7 months ago

me too

Tatalebuj commented 7 months ago

Don't we have to use the --use-cpu-torch argument?

This is what I was thinking.....but I don't know if that's true or not.

lshqqytiger commented 7 months ago

Please remove venv folder and try again.

sasoriza commented 7 months ago

I tried, but I am still getting the "Torch is not able to use GPU" error. I tried running webui-user.bat without command line arguments and with the ones I posted above, I am always getting the error even after deleting the venv folder.

EDIT: I got it to work by replacing the line torch with torch-directml in requirements_versions.txt instead of adding it below