lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: Unable to generate on AMD GPU with Onnx/Olive #454

Closed kyvaith closed 1 month ago

kyvaith commented 2 months ago

Checklist

What happened?

Unable to generate images using AMG GPU with Onnx/Olive

Steps to reproduce the problem

  1. Installed Python 3.10.6 and checked checking "Add Python to PATH".
  2. Installed git.
  3. Run CMD normally and: git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml && cd stable-diffusion-webui-directml && git submodule init && git submodule update
  4. First run: webui.bat --use-cpu-torch
  5. Checked v1-5-pruned-emaonly.safetensors from the Stable Diffusion checkpoint list
  6. Go to ONNX Runtime tab in Settings.
  7. Check Use ONNX Runtime instead of PyTorch implementation.
  8. Change Execution Provider to proper one.
  9. Check Enable Olive.
  10. Check everything under Olive models to process. image
  11. Go to txt2img tab and generate. image
  12. nah...
  13. Go back to CMD, ctrl+C and: .\venv\Scripts\activate pip uninstall torch torchvision torch-directml -y pip install onnxruntime-directml
  14. Run SD again: webui.bat --use-cpu-torch
  15. DmlExecutionProvider appeard in Execution Provider. Choosing and saving
  16. Go to txt2img tab and generate image
  17. Unable to locate file: 'C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\models\ONNX\temp' appeard in logs. Removing ONYX cache folder
  18. Go to txt2img tab and generate
  19. The ONNX: Successfully exported converted model appeard in logs three times
  20. Same error :-( image
  21. Sadness :-(

What should have happened?

The image generation should work

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

https://pastebin.com/HU42VsmF

Console logs

Microsoft Windows [Version 10.0.22631.3447]
(c) Microsoft Corporation. Wszelkie prawa zastrzeżone.

C:\Users\kyvai>cd Aplikacje

C:\Users\kyvai\Aplikacje>git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml && cd stable-diffusion-webui-directml && git submodule init && git submodule update
Cloning into 'stable-diffusion-webui-directml'...
remote: Enumerating objects: 34536, done.
remote: Total 34536 (delta 0), reused 0 (delta 0), pack-reused 34536
Receiving objects: 100% (34536/34536), 35.61 MiB | 10.76 MiB/s, done.
Resolving deltas: 100% (24157/24157), done.

C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml>.\venv\Scripts\activate
System nie może odnaleźć określonej ścieżki.

C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml>webui.bat --use-cpu-torch
Creating venv in directory C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv using python "C:\Users\kyvai\AppData\Local\Programs\Python\Python310\python.exe"
venv "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\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: v1.9.3-amd
Commit hash: 6130ef9e7a194bb0a212d12a697347153c4f31e2
Installing torch and torchvision
Collecting torch==2.2.2
  Using cached torch-2.2.2-cp310-cp310-win_amd64.whl (198.6 MB)
Collecting torchvision
  Downloading torchvision-0.18.0-cp310-cp310-win_amd64.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 4.1 MB/s eta 0:00:00
Collecting sympy
  Using cached sympy-1.12-py3-none-any.whl (5.7 MB)
Collecting jinja2
  Using cached Jinja2-3.1.3-py3-none-any.whl (133 kB)
Collecting filelock
  Using cached filelock-3.13.4-py3-none-any.whl (11 kB)
Collecting typing-extensions>=4.8.0
  Using cached typing_extensions-4.11.0-py3-none-any.whl (34 kB)
Collecting networkx
  Using cached networkx-3.3-py3-none-any.whl (1.7 MB)
Collecting fsspec
  Using cached fsspec-2024.3.1-py3-none-any.whl (171 kB)
Collecting torchvision
  Using cached torchvision-0.17.2-cp310-cp310-win_amd64.whl (1.2 MB)
Collecting pillow!=8.3.*,>=5.3.0
  Using cached pillow-10.3.0-cp310-cp310-win_amd64.whl (2.5 MB)
Collecting numpy
  Using cached numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl (17 kB)
Collecting mpmath>=0.19
  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Installing collected packages: mpmath, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch, torchvision
Successfully installed MarkupSafe-2.1.5 filelock-3.13.4 fsspec-2024.3.1 jinja2-3.1.3 mpmath-1.3.0 networkx-3.3 numpy-1.26.4 pillow-10.3.0 sympy-1.12 torch-2.2.2 torchvision-0.17.2 typing-extensions-4.11.0

[notice] A new release of pip available: 22.2.1 -> 24.0
[notice] To update, run: C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\Scripts\python.exe -m pip install --upgrade pip
Installing clip
Installing open_clip
Cloning assets into C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\stable-diffusion-webui-assets...
Cloning into 'C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\stable-diffusion-webui-assets'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 20 (delta 0), reused 20 (delta 0), pack-reused 0
Receiving objects: 100% (20/20), 132.70 KiB | 991.00 KiB/s, done.
Cloning Stable Diffusion into C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\stable-diffusion-stability-ai...
Cloning into 'C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\stable-diffusion-stability-ai'...
remote: Enumerating objects: 580, done.
remote: Counting objects: 100% (571/571), done.
remote: Compressing objects: 100% (306/306), done.
remote: Total 580 (delta 278), reused 446 (delta 247), pack-reused 9
Receiving objects: 100% (580/580), 73.44 MiB | 11.93 MiB/s, done.
Resolving deltas: 100% (278/278), done.
Cloning Stable Diffusion XL into C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\generative-models...
Cloning into 'C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\generative-models'...
remote: Enumerating objects: 941, done.
remote: Total 941 (delta 0), reused 0 (delta 0), pack-reused 941
Receiving objects: 100% (941/941), 43.85 MiB | 7.64 MiB/s, done.
Resolving deltas: 100% (490/490), done.
Cloning K-diffusion into C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\k-diffusion...
Cloning into 'C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\k-diffusion'...
remote: Enumerating objects: 1340, done.
remote: Counting objects: 100% (1340/1340), done.
remote: Compressing objects: 100% (433/433), done.
remote: Total 1340 (delta 940), reused 1259 (delta 900), pack-reused 0
Receiving objects: 100% (1340/1340), 238.52 KiB | 1.51 MiB/s, done.
Resolving deltas: 100% (940/940), done.
Cloning BLIP into C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\repositories\BLIP...
Cloning into 'C:\Users\kyvai\Aplikacje\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 112
Receiving objects: 100% (277/277), 7.03 MiB | 9.89 MiB/s, done.
Resolving deltas: 100% (152/152), done.
Installing requirements
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\Users\kyvai\Aplikacje\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(
Launching Web UI with arguments: --use-cpu-torch
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
ONNX: selected=CPUExecutionProvider, available=['AzureExecutionProvider', 'CPUExecutionProvider']
Downloading: "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" to C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors

100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.97G/3.97G [06:38<00:00, 10.7MB/s]
Calculating sha256 for C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors: Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 658.6s (prepare environment: 295.4s, initialize shared: 3.8s, other imports: 0.5s, list SD models: 399.7s, load scripts: 0.9s, create ui: 0.5s, gradio launch: 0.2s).
6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa
Loading weights [6ce0161689] from C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\configs\v1-inference.yaml
Applying attention optimization: InvokeAI... done.
loading stable diffusion model: AssertionError
Traceback (most recent call last):
  File "C:\Users\kyvai\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "C:\Users\kyvai\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\kyvai\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\initialize.py", line 149, in load_model
    shared.sd_model  # noqa: B018
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\shared_items.py", line 190, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\sd_models.py", line 621, in get_sd_model
    load_model()
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\sd_models.py", line 782, in load_model
    with devices.autocast(), torch.no_grad():
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\devices.py", line 234, in autocast
    if has_xpu() or has_mps() or cuda_no_autocast():
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\devices.py", line 28, in cuda_no_autocast
    device_id = get_cuda_device_id()
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\devices.py", line 40, in get_cuda_device_id
    ) or torch.cuda.current_device()
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\torch\cuda\__init__.py", line 787, in current_device
    _lazy_init()
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\torch\cuda\__init__.py", line 293, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Stable diffusion model failed to load
changing setting cross_attention_optimization to Automatic: AttributeError
Traceback (most recent call last):
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\options.py", line 165, in set
    option.onchange()
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 13, in f
    res = func(*args, **kwargs)
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\initialize_util.py", line 186, in <lambda>
    shared.opts.onchange("cross_attention_optimization", wrap_queued_call(lambda: sd_hijack.model_hijack.redo_hijack(shared.sd_model)), call=False)
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\sd_hijack.py", line 333, in redo_hijack
    self.undo_hijack(m)
  File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\sd_hijack.py", line 290, in undo_hijack
    elif type(m.cond_stage_model) == sd_hijack_xlmr.FrozenXLMREmbedderWithCustomWords:
AttributeError: 'NoneType' object has no attribute 'cond_stage_model'

You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
WARNING: ONNX implementation works best with SD.Next. Please consider migrating to SD.Next.
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:684: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
  mask = torch.full((tgt_len, tgt_len), torch.tensor(torch.finfo(dtype).min, device=device), device=device)
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:284: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if attn_weights.size() != (bsz * self.num_heads, tgt_len, src_len):
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:292: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if causal_attention_mask.size() != (bsz, 1, tgt_len, src_len):
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:324: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if attn_output.size() != (bsz * self.num_heads, tgt_len, self.head_dim):
ONNX: Successfully exported converted model: submodel=text_encoder
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\unets\unet_2d_condition.py:1110: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if dim % default_overall_up_factor != 0:
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\downsampling.py:137: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert hidden_states.shape[1] == self.channels
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\downsampling.py:146: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert hidden_states.shape[1] == self.channels
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\upsampling.py:149: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert hidden_states.shape[1] == self.channels
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\upsampling.py:165: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if hidden_states.shape[0] >= 64:
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\unets\unet_2d_condition.py:1309: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if not return_dict:
ONNX: Successfully exported converted model: submodel=unet
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\autoencoders\autoencoder_kl.py:265: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if not return_dict:
ONNX: Successfully exported converted model: submodel=vae_encoder
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\autoencoders\autoencoder_kl.py:306: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if not return_dict:
ONNX: Successfully exported converted model: submodel=vae_decoder
Olive implementation is experimental. It contains potentially an issue and is subject to change at any time.

Processing text_encoder
[2024-04-26 13:41:26,713] [INFO] [run.py:243:run] Loading Olive module configuration from: C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\olive\olive_config.json
Olive: Failed to run olive passes: model='v1-5-pruned-emaonly.safetensors', error=7 validation errors for RunConfig
systems -> local_system -> config -> accelerators -> 0
  value is not a valid dict (type=type_error.dict)
engine
  Invalid systems (type=value_error)
passes -> optimize_CPUExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_DmlExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_CUDAExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_ROCMExecutionProvider
  Invalid engine (type=value_error)
passes -> quantization
  Invalid engine (type=value_error)
ONNX: Failed to load ONNX pipeline: is_sdxl=False
ONNX: You cannot load this model using the pipeline you selected. Please check Diffusers pipeline in ONNX Runtime Settings.
ONNX: processing=StableDiffusionProcessingTxt2Img, pipeline=OnnxRawPipeline
*** Error completing request
*** Arguments: ('task(zwldmc8yemrau44)', <gradio.routes.Request object at 0x00000115A5DCAD70>, 'car', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 952, in process_images_inner
        result = shared.sd_model(**kwargs)
    TypeError: 'OnnxRawPipeline' object is not callable

---
Interrupted with signal 2 in <frame at 0x00000115A3E19210, file 'C:\\Users\\kyvai\\AppData\\Local\\Programs\\Python\\Python310\\lib\\threading.py', line 324, code wait>
Terminate batch job (Y/N)? y

C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml>.\venv\Scripts\activate

(venv) C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml>pip uninstall torch torchvision torch-directml -y
Found existing installation: torch 2.2.2
Uninstalling torch-2.2.2:
  Successfully uninstalled torch-2.2.2
Found existing installation: torchvision 0.17.2
Uninstalling torchvision-0.17.2:
  Successfully uninstalled torchvision-0.17.2
WARNING: Skipping torch-directml as it is not installed.

(venv) C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml>pip install onnxruntime-directml
Collecting onnxruntime-directml
  Using cached onnxruntime_directml-1.17.3-cp310-cp310-win_amd64.whl (15.4 MB)
Requirement already satisfied: sympy in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from onnxruntime-directml) (1.12)
Requirement already satisfied: packaging in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from onnxruntime-directml) (24.0)
Requirement already satisfied: coloredlogs in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from onnxruntime-directml) (15.0.1)
Requirement already satisfied: flatbuffers in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from onnxruntime-directml) (24.3.25)
Requirement already satisfied: numpy>=1.21.6 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from onnxruntime-directml) (1.26.2)
Requirement already satisfied: protobuf in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from onnxruntime-directml) (3.20.3)
Requirement already satisfied: humanfriendly>=9.1 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from coloredlogs->onnxruntime-directml) (10.0)
Requirement already satisfied: mpmath>=0.19 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from sympy->onnxruntime-directml) (1.3.0)
Requirement already satisfied: pyreadline3 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime-directml) (3.4.1)
Installing collected packages: onnxruntime-directml
Successfully installed onnxruntime-directml-1.17.3

[notice] A new release of pip available: 22.2.1 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip

(venv) C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml>webui.bat --use-cpu-torch
venv "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\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: v1.9.3-amd
Commit hash: 6130ef9e7a194bb0a212d12a697347153c4f31e2
Installing torch and torchvision
Collecting torch==2.2.2
  Using cached torch-2.2.2-cp310-cp310-win_amd64.whl (198.6 MB)
Collecting torchvision
  Using cached torchvision-0.18.0-cp310-cp310-win_amd64.whl (1.2 MB)
Requirement already satisfied: filelock in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torch==2.2.2) (3.13.4)
Requirement already satisfied: jinja2 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torch==2.2.2) (3.1.3)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torch==2.2.2) (4.11.0)
Requirement already satisfied: sympy in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torch==2.2.2) (1.12)
Requirement already satisfied: fsspec in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torch==2.2.2) (2024.3.1)
Requirement already satisfied: networkx in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torch==2.2.2) (3.3)
  Using cached torchvision-0.17.2-cp310-cp310-win_amd64.whl (1.2 MB)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torchvision) (9.5.0)
Requirement already satisfied: numpy in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from torchvision) (1.26.2)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from jinja2->torch==2.2.2) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in c:\users\kyvai\aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages (from sympy->torch==2.2.2) (1.3.0)
Installing collected packages: torch, torchvision
Successfully installed torch-2.2.2 torchvision-0.17.2

[notice] A new release of pip available: 22.2.1 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\Users\kyvai\Aplikacje\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(
Launching Web UI with arguments: --use-cpu-torch
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
ONNX: selected=CPUExecutionProvider, available=['DmlExecutionProvider', 'CPUExecutionProvider']
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 33.1s (prepare environment: 41.7s, initialize shared: 1.0s, load scripts: 0.5s, create ui: 0.6s, gradio launch: 0.2s).
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
Applying attention optimization: InvokeAI... done.
WARNING: ONNX implementation works best with SD.Next. Please consider migrating to SD.Next.
Olive implementation is experimental. It contains potentially an issue and is subject to change at any time.

Processing text_encoder
[2024-04-26 13:44:14,280] [INFO] [run.py:243:run] Loading Olive module configuration from: C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\olive\olive_config.json
Olive: Failed to run olive passes: model='v1-5-pruned-emaonly.safetensors', error=7 validation errors for RunConfig
systems -> local_system -> config -> accelerators -> 0
  value is not a valid dict (type=type_error.dict)
engine
  Invalid systems (type=value_error)
passes -> optimize_CPUExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_DmlExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_CUDAExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_ROCMExecutionProvider
  Invalid engine (type=value_error)
passes -> quantization
  Invalid engine (type=value_error)
ONNX: Failed to load ONNX pipeline: is_sdxl=False
ONNX: You cannot load this model using the pipeline you selected. Please check Diffusers pipeline in ONNX Runtime Settings.
ONNX: processing=StableDiffusionProcessingTxt2Img, pipeline=OnnxRawPipeline
*** Error completing request
*** Arguments: ('task(9qnzce4mcw5z1jc)', <gradio.routes.Request object at 0x000001AB86D20F70>, 'car', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'PNDM', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 952, in process_images_inner
        result = shared.sd_model(**kwargs)
    TypeError: 'OnnxRawPipeline' object is not callable

---
WARNING: ONNX implementation works best with SD.Next. Please consider migrating to SD.Next.
ONNX: Failed to convert model: model='v1-5-pruned-emaonly.safetensors-512w-512h', error=[WinError 3] System nie może odnaleźć określonej ścieżki: 'C:\\Users\\kyvai\\Aplikacje\\stable-diffusion-webui-directml\\models\\ONNX\\temp'
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
ONNX: processing=StableDiffusionProcessingTxt2Img, pipeline=OnnxRawPipeline
*** Error completing request
*** Arguments: ('task(ztvwsf4wr9wf75m)', <gradio.routes.Request object at 0x000001AB86CE0640>, 'car', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'PNDM', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 952, in process_images_inner
        result = shared.sd_model(**kwargs)
    TypeError: 'OnnxRawPipeline' object is not callable

---
WARNING: ONNX implementation works best with SD.Next. Please consider migrating to SD.Next.
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:684: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
  mask = torch.full((tgt_len, tgt_len), torch.tensor(torch.finfo(dtype).min, device=device), device=device)
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:284: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if attn_weights.size() != (bsz * self.num_heads, tgt_len, src_len):
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:292: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if causal_attention_mask.size() != (bsz, 1, tgt_len, src_len):
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\transformers\models\clip\modeling_clip.py:324: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if attn_output.size() != (bsz * self.num_heads, tgt_len, self.head_dim):
ONNX: Successfully exported converted model: submodel=text_encoder
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\unets\unet_2d_condition.py:1110: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if dim % default_overall_up_factor != 0:
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\downsampling.py:137: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert hidden_states.shape[1] == self.channels
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\downsampling.py:146: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert hidden_states.shape[1] == self.channels
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\upsampling.py:149: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  assert hidden_states.shape[1] == self.channels
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\upsampling.py:165: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if hidden_states.shape[0] >= 64:
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\unets\unet_2d_condition.py:1309: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if not return_dict:
ONNX: Successfully exported converted model: submodel=unet
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\autoencoders\autoencoder_kl.py:265: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if not return_dict:
ONNX: Successfully exported converted model: submodel=vae_encoder
C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\diffusers\models\autoencoders\autoencoder_kl.py:306: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
  if not return_dict:
ONNX: Successfully exported converted model: submodel=vae_decoder
Olive implementation is experimental. It contains potentially an issue and is subject to change at any time.

Processing text_encoder
[2024-04-26 13:49:19,310] [INFO] [run.py:243:run] Loading Olive module configuration from: C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\venv\lib\site-packages\olive\olive_config.json
Olive: Failed to run olive passes: model='v1-5-pruned-emaonly.safetensors', error=7 validation errors for RunConfig
systems -> local_system -> config -> accelerators -> 0
  value is not a valid dict (type=type_error.dict)
engine
  Invalid systems (type=value_error)
passes -> optimize_CPUExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_DmlExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_CUDAExecutionProvider
  Invalid engine (type=value_error)
passes -> optimize_ROCMExecutionProvider
  Invalid engine (type=value_error)
passes -> quantization
  Invalid engine (type=value_error)
ONNX: Failed to load ONNX pipeline: is_sdxl=False
ONNX: You cannot load this model using the pipeline you selected. Please check Diffusers pipeline in ONNX Runtime Settings.
ONNX: processing=StableDiffusionProcessingTxt2Img, pipeline=OnnxRawPipeline
*** Error completing request
*** Arguments: ('task(f1445vlldc7zr8y)', <gradio.routes.Request object at 0x000001AB86B4EC50>, 'car', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'PNDM', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "C:\Users\kyvai\Aplikacje\stable-diffusion-webui-directml\modules\processing.py", line 952, in process_images_inner
        result = shared.sd_model(**kwargs)
    TypeError: 'OnnxRawPipeline' object is not callable

---

Additional information

Fresh install, AMD RX 6750 XT, 16GB VRAM, 32GB RAM

lshqqytiger commented 1 month ago

Fixed in a92b859e4090a1d33576036a688a44bb6b5d55b7 ~ 9514d9194d6a8a45d3ceb42567e45d020d5226c0.

cdunn95 commented 1 month ago

Fixed in a92b859 ~ 9514d91.

I am still having the same issues that OP referenced. My steps are exactly the same as his, with the exact same results, even though I am on Master after your fixed commits https://github.com/lshqqytiger/stable-diffusion-webui-directml/commit/a92b859e4090a1d33576036a688a44bb6b5d55b7 and https://github.com/lshqqytiger/stable-diffusion-webui-directml/commit/9514d9194d6a8a45d3ceb42567e45d020d5226c0 were merged in. I am on the 7900 XT.

CONSOLE LOG

venv "C:\Users\camer\Documents\Automatic1111\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
Python 3.10.14 | packaged by Anaconda, Inc. | (main, Mar 21 2024, 16:20:14) [MSC v.1916 64 bit (AMD64)]
Version: v1.9.3-amd-10-ge2cbdab3
Commit hash: e2cbdab3375deea621a48de269fd4ac47ff6cece
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\Users\camer\Documents\Automatic1111\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(
Launching Web UI with arguments: --use-cpu-torch
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
ONNX: version=1.17.3 provider=DmlExecutionProvider, available=['DmlExecutionProvider', 'CPUExecutionProvider']
Checkpoint v1-5-pruned-emaonly.safetensors [6ce0161689] not found; loading fallback v1-5-pruned-emaonly.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 8.3s (prepare environment: 12.6s, initialize shared: 0.8s, load scripts: 0.4s, create ui: 0.4s, gradio launch: 0.1s).
C:\Users\camer\Documents\Automatic1111\stable-diffusion-webui-directml\venv\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
ONNX: Failed to load ONNX pipeline: is_sdxl=False
ONNX: You cannot load this model using the pipeline you selected. Please check Diffusers pipeline in ONNX Runtime Settings.
Applying attention optimization: InvokeAI... done.
WARNING: ONNX implementation works best with SD.Next. Please consider migrating to SD.Next.
ONNX: Failed to convert model: model='v1-5-pruned-emaonly.safetensors', error=[WinError 3] The system cannot find the path specified: 'C:\\Users\\camer\\Documents\\Automatic1111\\stable-diffusion-webui-directml\\models\\ONNX\\temp'
Checkpoint v1-5-pruned-emaonly.safetensors [6ce0161689] not found; loading fallback v1-5-pruned-emaonly.safetensors
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
ONNX: Failed to load ONNX pipeline: is_sdxl=False
ONNX: You cannot load this model using the pipeline you selected. Please check Diffusers pipeline in ONNX Runtime Settings.
ONNX: processing=StableDiffusionProcessingTxt2Img, pipeline=OnnxRawPipeline
*** Error completing request
*** Arguments: ('task(qhjs0cvbhjtfgd2)', <gradio.routes.Request object at 0x000001FA3388AAD0>, 'astronaut', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'PNDM', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "C:\Users\camer\Documents\Automatic1111\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\Users\camer\Documents\Automatic1111\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\Users\camer\Documents\Automatic1111\stable-diffusion-webui-directml\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "C:\Users\camer\Documents\Automatic1111\stable-diffusion-webui-directml\modules\processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "C:\Users\camer\Documents\Automatic1111\stable-diffusion-webui-directml\modules\processing.py", line 952, in process_images_inner
        result = shared.sd_model(**kwargs)
    TypeError: 'OnnxRawPipeline' object is not callable

---
lshqqytiger commented 1 month ago

Remove incomplete conversion/optimization cache in models/ONNX/cache and models/ONNX/temp folder, and try again.

cdunn95 commented 1 month ago

Remove incomplete conversion/optimization cache in models/ONNX/cache and models/ONNX/temp folder, and try again.

I do not have a models/ONNX folder, something I have found strange from the beginning. This is what my models folder looks like:

image

This is despite having that directory specified in the settings: image

My ONXX Runtime settings: image

EDIT: Just for confirmation that I am on the master branch when this is happening:

image

lshqqytiger commented 1 month ago

Create models\ONNX folder, and try again.

Aelzaire commented 4 weeks ago

This fixed it for me also

Create models\ONNX folder, and try again.

Something is not creating this when it should be.