AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: AMD GPU xFormers 0.0.28 do not support,GPU works but turn out nothing but error #16490

Open PennyFranklin opened 1 month ago

PennyFranklin commented 1 month ago

Checklist

What happened?

AMD GPU xFormers 0.0.28 do not support,GPU works but turn out nothing but error 截图 2024-09-15 20-48-14

Steps to reproduce the problem

1.I git clone the a1111 sdwebui and managed to install the pytorch2.4.1-rocm6.1,and it work well . 2.Then i installed the xformers0.0.28post1 ,the trouble comes.When i fill the prompt and cick che generate botton ,the terminal and GPU sound shows the process ,but after seconds turn out an error. 3.When i run a benchmark in vlad's system info extension,it turns out that error: 截图 2024-09-16 18-09-37 penny@Neko:~/stable-diffusion-webui$ '/home/penny/stable-diffusion-webui/webui.sh' --reinstall-xformers --xformers

################################################################ Install script for stable-diffusion + Web UI Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer. ################################################################

################################################################ Running on penny user ################################################################

################################################################ Repo already cloned, using it as install directory ################################################################

################################################################ Create and activate python venv ################################################################

################################################################ Launching launch.py... ################################################################ glibc version is 2.35 Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage) Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] Version: v1.10.1 Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2 Installing xformers Launching Web UI with arguments: --reinstall-xformers --xformers WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.4.1+cu121 with CUDA 1201 (you have 2.4.1+rocm6.1) Python 3.10.15 (you have 3.10.12) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details *** Error running preload() for /home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/preload.py Traceback (most recent call last): File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 30, in preload_extensions module = load_module(preload_script) File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/preload.py", line 4, in from modules.shared import models_path ImportError: cannot import name 'models_path' from partially initialized module 'modules.shared' (most likely due to a circular import) (/home/penny/stable-diffusion-webui/modules/shared.py)

Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu. sd-webui-prompt-all-in-one background API service started successfully. *** Error loading script: tagger.py Traceback (most recent call last): File "/home/penny/stable-diffusion-webui/modules/scripts.py", line 515, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/scripts/tagger.py", line 5, in from tagger.ui import on_ui_tabs File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/ui.py", line 10, in from webui import wrap_gradio_gpu_call ImportError: cannot import name 'wrap_gradio_gpu_call' from 'webui' (/home/penny/stable-diffusion-webui/webui.py)

Loading weights [7c819b6d13] from /home/penny/stable-diffusion-webui/models/Stable-diffusion/majicmixRealistic_v7.safetensors Running on local URL: http://127.0.0.1:7860/ Creating model from config: /home/penny/stable-diffusion-webui/configs/v1-inference.yaml /home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py:1150: 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( Applying attention optimization: sdp-no-mem... done. Model loaded in 1.8s (load weights from disk: 0.3s, create model: 0.2s, apply weights to model: 0.9s, calculate empty prompt: 0.1s).

To create a public link, set share=True in launch(). Startup time: 10.4s (prepare environment: 3.1s, import torch: 1.6s, import gradio: 0.3s, setup paths: 2.5s, other imports: 0.2s, load scripts: 0.3s, create ui: 0.2s, gradio launch: 2.2s). 正在现有浏览器会话中打开。 WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic" /home/penny/stable-diffusion-webui/modules/safe.py:156: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. return unsafe_torch_load(filename, *args, *kwargs) 0%| | 0/20 [00:00<?, ?it/s]/usr/lib/python3.10/contextlib.py:103: FutureWarning: torch.backends.cuda.sdp_kernel() is deprecated. In the future, this context manager will be removed. Please see torch.nn.attention.sdpa_kernel() for the new context manager, with updated signature. self.gen = func(args, **kwds) 100%|███████████████████████████████████████████| 20/20 [00:01<00:00, 18.65it/s] ERROR:sd:SD-System-Info benchmark error: 1 No operator found for memory_efficient_attention_forward with inputs: query : shape=(1, 4096, 1, 512) (torch.float16) key : shape=(1, 4096, 1, 512) (torch.float16) value : shape=(1, 4096, 1, 512) (torch.float16) attn_bias : <class 'NoneType'> p : 0.0 ckF is not supported because: max(query.shape[-1], value.shape[-1]) > 256 operator wasn't built - see python -m xformers.info for more info WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic" 100%|███████████████████████████████████████████| 20/20 [00:00<00:00, 20.65it/s] ERROR:sd:SD-System-Info benchmark error: 1 No operator found for memory_efficient_attention_forward with inputs: query : shape=(1, 4096, 1, 512) (torch.float16) key : shape=(1, 4096, 1, 512) (torch.float16) value : shape=(1, 4096, 1, 512) (torch.float16) attn_bias : <class 'NoneType'> p : 0.0 ckF is not supported because: max(query.shape[-1], value.shape[-1]) > 256 operator wasn't built - see python -m xformers.info for more info WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic" 100%|███████████████████████████████████████████| 20/20 [00:01<00:00, 11.10it/s] ERROR:sd:SD-System-Info benchmark error: 2 No operator found for memory_efficient_attention_forward with inputs: query : shape=(1, 4096, 1, 512) (torch.float16) key : shape=(1, 4096, 1, 512) (torch.float16) value : shape=(1, 4096, 1, 512) (torch.float16) attn_bias : <class 'NoneType'> p : 0.0 ckF is not supported because: max(query.shape[-1], value.shape[-1]) > 256 operator wasn't built - see python -m xformers.info for more info WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic" 100%|███████████████████████████████████████████| 20/20 [00:03<00:00, 5.75it/s] ERROR:sd:SD-System-Info benchmark error: 4 No operator found for memory_efficient_attention_forward with inputs: query : shape=(1, 4096, 1, 512) (torch.float16) key : shape=(1, 4096, 1, 512) (torch.float16) value : shape=(1, 4096, 1, 512) (torch.float16) attn_bias : <class 'NoneType'> p : 0.0 ckF is not supported because: max(query.shape[-1], value.shape[-1]) > 256 operator wasn't built - see python -m xformers.info for more info

4.when i generate the picture in txt2img ,here is the code: Error completing request 4.43s/it] Arguments: ('task(femn6y84yofgpcx)', <gradio.routes.Request object at 0x7b50d04eb640>, '1girl, ', '', [], 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, 'NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\nINS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0\nIND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0\nINALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0\nMIDD:1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0\nOUTD:1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0\nOUTS:1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1\nOUTALL:1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1\nALL0.5:0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5', True, 0, 'values', '0,0.25,0.5,0.75,1', 'Block ID', 'IN05-OUT05', 'none', '', '0.5,1', 'BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11', 1.0, 'black', '20', False, 'ATTNDEEPON:IN05-OUT05:attn:1\n\nATTNDEEPOFF:IN05-OUT05:attn:0\n\nPROJDEEPOFF:IN05-OUT05:proj:0\n\nXYZ:::1', False, False, 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 "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 74, in f res = list(func(*args, kwargs)) File "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 53, in f res = func(*args, *kwargs) File "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(args, kwargs) File "/home/penny/stable-diffusion-webui/modules/txt2img.py", line 109, in txt2img processed = processing.process_images(p) File "/home/penny/stable-diffusion-webui/modules/processing.py", line 847, in process_images res = process_images_inner(p) File "/home/penny/stable-diffusion-webui/modules/processing.py", line 1002, in process_images_inner x_samples_ddim = decode_latent_batch(p.sd_model, samples_ddim, target_device=devices.cpu, check_for_nans=True) File "/home/penny/stable-diffusion-webui/modules/processing.py", line 632, in decode_latent_batch sample = decode_first_stage(model, batch[i:i + 1])[0] File "/home/penny/stable-diffusion-webui/modules/sd_samplers_common.py", line 76, in decode_first_stage return samples_to_images_tensor(x, approx_index, model) File "/home/penny/stable-diffusion-webui/modules/sd_samplers_common.py", line 58, in samples_to_images_tensor x_sample = model.decode_first_stage(sample.to(model.first_stage_model.dtype)) File "/home/penny/stable-diffusion-webui/modules/sd_hijack_utils.py", line 22, in setattr(resolved_obj, func_path[-1], lambda *args, kwargs: self(*args, *kwargs)) File "/home/penny/stable-diffusion-webui/modules/sd_hijack_utils.py", line 36, in call return self.__orig_func(args, kwargs) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, kwargs) File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 826, in decode_first_stage return self.first_stage_model.decode(z) File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/autoencoder.py", line 90, in decode dec = self.decoder(z) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl return forward_call(args, kwargs) File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/model.py", line 631, in forward h = self.mid.attn_1(h) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl return forward_call(args, **kwargs) File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/model.py", line 258, in forward out = xformers.ops.memory_efficient_attention(q, k, v, attn_bias=None, op=self.attention_op) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/init.py", line 301, in memory_efficient_attention return _memory_efficient_attention( File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/init.py", line 462, in _memory_efficient_attention return _memory_efficient_attention_forward( File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/init.py", line 481, in _memory_efficient_attention_forward op = _dispatch_fw(inp, False) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/dispatch.py", line 135, in _dispatch_fw return _run_priority_list( File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/dispatch.py", line 76, in _run_priority_list raise NotImplementedError(msg) NotImplementedError: No operator found for memory_efficient_attention_forward with inputs: query : shape=(1, 4096, 1, 512) (torch.float16) key : shape=(1, 4096, 1, 512) (torch.float16) value : shape=(1, 4096, 1, 512) (torch.float16) attn_bias : <class 'NoneType'> p : 0.0 ckF is not supported because: max(query.shape[-1], value.shape[-1]) > 256 operator wasn't built - see python -m xformers.info for more info

What should have happened?

since xFormers has the AMD ROCm support,hope that the dev branch could quickly give the featrure support update.

What browsers do you use to access the UI ?

Microsoft Edge

Sysinfo

sysinfo-2024-09-16-12-25.json

Console logs

penny@Neko:~/stable-diffusion-webui$ '/home/penny/stable-diffusion-webui/webui.sh' --xformers

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on penny user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.35
Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage)
Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Launching Web UI with arguments: --xformers
WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.4.1+cu121 with CUDA 1201 (you have 2.4.1+rocm6.1)
    Python  3.10.15 (you have 3.10.12)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
*** Error running preload() for /home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/preload.py
    Traceback (most recent call last):
      File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 30, in preload_extensions
        module = load_module(preload_script)
      File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/preload.py", line 4, in <module>
        from modules.shared import models_path
    ImportError: cannot import name 'models_path' from partially initialized module 'modules.shared' (most likely due to a circular import) (/home/penny/stable-diffusion-webui/modules/shared.py)

---
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
sd-webui-prompt-all-in-one background API service started successfully.
*** Error loading script: tagger.py
    Traceback (most recent call last):
      File "/home/penny/stable-diffusion-webui/modules/scripts.py", line 515, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/scripts/tagger.py", line 5, in <module>
        from tagger.ui import on_ui_tabs
      File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/ui.py", line 10, in <module>
        from webui import wrap_gradio_gpu_call
    ImportError: cannot import name 'wrap_gradio_gpu_call' from 'webui' (/home/penny/stable-diffusion-webui/webui.py)

---
Loading weights [7c819b6d13] from /home/penny/stable-diffusion-webui/models/Stable-diffusion/majicmixRealistic_v7.safetensors
Running on local URL:  http://127.0.0.1:7860
Creating model from config: /home/penny/stable-diffusion-webui/configs/v1-inference.yaml
/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py:1150: 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(
Applying attention optimization: Doggettx... done.
Model loaded in 1.8s (load weights from disk: 0.3s, create model: 0.2s, apply weights to model: 0.9s, calculate empty prompt: 0.2s).

To create a public link, set `share=True` in `launch()`.
Startup time: 8.7s (prepare environment: 1.4s, import torch: 1.6s, import gradio: 0.3s, setup paths: 2.5s, other imports: 0.2s, load scripts: 0.3s, create ui: 0.2s, gradio launch: 2.2s).
正在现有浏览器会话中打开。
/home/penny/stable-diffusion-webui/modules/safe.py:156: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return unsafe_torch_load(filename, *args, **kwargs)
100%|███████████████████████████████████████████| 20/20 [00:01<00:00, 18.34it/s]
*** Error completing request████████████████████| 20/20 [00:00<00:00, 20.39it/s]
*** Arguments: ('task(5mb4apnjy4i0lh3)', <gradio.routes.Request object at 0x7796f0f434c0>, '1girl, ', '', [], 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, 'NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\nINS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0\nIND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0\nINALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0\nMIDD:1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0\nOUTD:1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0\nOUTS:1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1\nOUTALL:1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1\nALL0.5:0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5', True, 0, 'values', '0,0.25,0.5,0.75,1', 'Block ID', 'IN05-OUT05', 'none', '', '0.5,1', 'BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11', 1.0, 'black', '20', False, 'ATTNDEEPON:IN05-OUT05:attn:1\n\nATTNDEEPOFF:IN05-OUT05:attn:0\n\nPROJDEEPOFF:IN05-OUT05:proj:0\n\nXYZ:::1', False, False, 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 "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
      File "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 53, in f
        res = func(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 37, in f
        res = func(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/modules/txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "/home/penny/stable-diffusion-webui/modules/processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "/home/penny/stable-diffusion-webui/modules/processing.py", line 1002, in process_images_inner
        x_samples_ddim = decode_latent_batch(p.sd_model, samples_ddim, target_device=devices.cpu, check_for_nans=True)
      File "/home/penny/stable-diffusion-webui/modules/processing.py", line 632, in decode_latent_batch
        sample = decode_first_stage(model, batch[i:i + 1])[0]
      File "/home/penny/stable-diffusion-webui/modules/sd_samplers_common.py", line 76, in decode_first_stage
        return samples_to_images_tensor(x, approx_index, model)
      File "/home/penny/stable-diffusion-webui/modules/sd_samplers_common.py", line 58, in samples_to_images_tensor
        x_sample = model.decode_first_stage(sample.to(model.first_stage_model.dtype))
      File "/home/penny/stable-diffusion-webui/modules/sd_hijack_utils.py", line 22, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "/home/penny/stable-diffusion-webui/modules/sd_hijack_utils.py", line 36, in __call__
        return self.__orig_func(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
        return func(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 826, in decode_first_stage
        return self.first_stage_model.decode(z)
      File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/autoencoder.py", line 90, in decode
        dec = self.decoder(z)
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
        return forward_call(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/model.py", line 631, in forward
        h = self.mid.attn_1(h)
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
        return forward_call(*args, **kwargs)
      File "/home/penny/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/model.py", line 258, in forward
        out = xformers.ops.memory_efficient_attention(q, k, v, attn_bias=None, op=self.attention_op)
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/__init__.py", line 301, in memory_efficient_attention
        return _memory_efficient_attention(
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/__init__.py", line 462, in _memory_efficient_attention
        return _memory_efficient_attention_forward(
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/__init__.py", line 481, in _memory_efficient_attention_forward
        op = _dispatch_fw(inp, False)
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/dispatch.py", line 135, in _dispatch_fw
        return _run_priority_list(
      File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/dispatch.py", line 76, in _run_priority_list
        raise NotImplementedError(msg)
    NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs:
         query       : shape=(1, 4096, 1, 512) (torch.float16)
         key         : shape=(1, 4096, 1, 512) (torch.float16)
         value       : shape=(1, 4096, 1, 512) (torch.float16)
         attn_bias   : <class 'NoneType'>
         p           : 0.0
    `ckF` is not supported because:
        max(query.shape[-1], value.shape[-1]) > 256
        operator wasn't built - see `python -m xformers.info` for more info

---
                                                                               WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic"
100%|███████████████████████████████████████████| 20/20 [00:00<00:00, 20.09it/s]
ERROR:sd:SD-System-Info benchmark error: 1 No operator found for `memory_efficient_attention_forward` with inputs:
     query       : shape=(1, 4096, 1, 512) (torch.float16)
     key         : shape=(1, 4096, 1, 512) (torch.float16)
     value       : shape=(1, 4096, 1, 512) (torch.float16)
     attn_bias   : <class 'NoneType'>
     p           : 0.0
`ckF` is not supported because:
    max(query.shape[-1], value.shape[-1]) > 256
    operator wasn't built - see `python -m xformers.info` for more info
WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic"
100%|███████████████████████████████████████████| 20/20 [00:00<00:00, 20.30it/s]
ERROR:sd:SD-System-Info benchmark error: 1 No operator found for `memory_efficient_attention_forward` with inputs:
     query       : shape=(1, 4096, 1, 512) (torch.float16)
     key         : shape=(1, 4096, 1, 512) (torch.float16)
     value       : shape=(1, 4096, 1, 512) (torch.float16)
     attn_bias   : <class 'NoneType'>
     p           : 0.0
`ckF` is not supported because:
    max(query.shape[-1], value.shape[-1]) > 256
    operator wasn't built - see `python -m xformers.info` for more info
WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic"
100%|███████████████████████████████████████████| 20/20 [00:01<00:00, 11.12it/s]
ERROR:sd:SD-System-Info benchmark error: 2 No operator found for `memory_efficient_attention_forward` with inputs:
     query       : shape=(1, 4096, 1, 512) (torch.float16)
     key         : shape=(1, 4096, 1, 512) (torch.float16)
     value       : shape=(1, 4096, 1, 512) (torch.float16)
     attn_bias   : <class 'NoneType'>
     p           : 0.0
`ckF` is not supported because:
    max(query.shape[-1], value.shape[-1]) > 256
    operator wasn't built - see `python -m xformers.info` for more info
WARNING:root:Sampler Scheduler autocorrection: "Euler a" -> "Euler a", "None" -> "Automatic"
100%|███████████████████████████████████████████| 20/20 [00:03<00:00,  5.71it/s]
ERROR:sd:SD-System-Info benchmark error: 4 No operator found for `memory_efficient_attention_forward` with inputs:
     query       : shape=(1, 4096, 1, 512) (torch.float16)
     key         : shape=(1, 4096, 1, 512) (torch.float16)
     value       : shape=(1, 4096, 1, 512) (torch.float16)
     attn_bias   : <class 'NoneType'>
     p           : 0.0
`ckF` is not supported because:
    max(query.shape[-1], value.shape[-1]) > 256
    operator wasn't built - see `python -m xformers.info` for more info

Additional information

Radeon RX 7900XTX ROCm6.1

missionfloyd commented 1 month ago

You might try --opt-sdp-attention instead. https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Optimizations

PennyFranklin commented 1 month ago

You mean i can use this optimization for now,and wait for the xFormers support for AMD release,or there is no plan for the support?

Charmandrigo commented 1 month ago

the official rocm xformers fork always fails to compile, it's still under development

ananosleep commented 1 month ago

Firstly, remove --reinstall-xformers. It will install xformers with CUDA 12.1.

You need to install xformers manually:

source venv/bin/activate
pip install xformers -i https://download.pytorch.org/whl/rocm6.1
PennyFranklin commented 2 weeks ago

Firstly, remove --reinstall-xformers. It will install xformers with CUDA 12.1.

You need to install xformers manually:

source venv/bin/activate
pip install xformers -i https://download.pytorch.org/whl/rocm6.1

Still error after do as say so . Here's the error code: (venv) (sd1) penny@neko:~/stable-diffusion-webui$ '/home/penny/stable-diffusion-webui/webui.sh' --xformers

################################################################ Install script for stable-diffusion + Web UI Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer. ################################################################

################################################################ Running on penny user ################################################################

################################################################ Repo already cloned, using it as install directory ################################################################

################################################################ python venv already activate or run without venv: /home/penny/stable-diffusion-webui/venv ################################################################

################################################################ Launching launch.py... ################################################################ glibc version is 2.39 Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage) Python 3.10.15 (main, Oct 3 2024, 07:27:34) [GCC 11.2.0] Version: v1.10.1 Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2 ControlNet init warning: Unable to install insightface automatically. Please try run pip install insightface manually. Launching Web UI with arguments: --xformers amdgpu.ids: No such file or directory *** Error running preload() for /home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/preload.py Traceback (most recent call last): File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 30, in preload_extensions module = load_module(preload_script) File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/preload.py", line 4, in from modules.shared import models_path ImportError: cannot import name 'models_path' from partially initialized module 'modules.shared' (most likely due to a circular import) (/home/penny/stable-diffusion-webui/modules/shared.py)


Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu. [-] ADetailer initialized. version: 24.9.0, num models: 10 ControlNet preprocessor location: /home/penny/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads 2024-10-24 12:03:55,690 - ControlNet - INFO - ControlNet v1.1.455 sd-webui-prompt-all-in-one background API service started successfully. *** Error loading script: tagger.py Traceback (most recent call last): File "/home/penny/stable-diffusion-webui/modules/scripts.py", line 515, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/home/penny/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/scripts/tagger.py", line 5, in from tagger.ui import on_ui_tabs File "/home/penny/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/tagger/ui.py", line 10, in from webui import wrap_gradio_gpu_call ImportError: cannot import name 'wrap_gradio_gpu_call' from 'webui' (/home/penny/stable-diffusion-webui/webui.py)


Loading weights [d48c2391e0] from /home/penny/stable-diffusion-webui/models/Stable-diffusion/aamXLAnimeMix_v10.safetensors Creating model from config: /home/penny/stable-diffusion-webui/repositories/generative-models/configs/inference/sd_xl_base.yaml 2024-10-24 12:03:56,352 - ControlNet - INFO - ControlNet UI callback registered. /home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/huggingface_hub/file_download.py:797: 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( Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). IIB Database file has been successfully backed up to the backup folder. 正在现有浏览器会话中打开。 Startup time: 12.0s (prepare environment: 1.9s, import torch: 1.7s, import gradio: 0.3s, setup paths: 3.0s, other imports: 0.2s, load scripts: 2.0s, create ui: 0.5s, gradio launch: 2.3s). Applying attention optimization: Doggettx... done. Model loaded in 5.3s (create model: 0.9s, apply weights to model: 3.9s, calculate empty prompt: 0.3s). /home/penny/stable-diffusion-webui/modules/safe.py:156: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. return unsafe_torch_load(filename, args, kwargs) 100%|███████████████████████████████████████████| 20/20 [00:01<00:00, 11.79it/s] Error completing request████████████████████| 20/20 [00:01<00:00, 11.79it/s] Arguments: ('task(all1h4l71koiyot)', <gradio.routes.Request object at 0x73dcf77b2ec0>, '1girl,', '', [], 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, {'ad_model': 'face_yolov8n.pt', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, False, 'MultiDiffusion', False, True, 1024, 1024, 96, 96, 48, 4, 'None', 2, False, 10, 1, 1, 64, False, False, False, False, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 'DemoFusion', False, 128, 64, 4, 2, False, 10, 1, 1, 64, False, True, 3, 1, 1, True, 0.85, 0.6, 4, False, False, 3072, 192, True, True, True, False, False, 7, 100, 'Constant', 0, 'Constant', 0, 4, True, 'MEAN', 'AD', 1, ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='', output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=False, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='', output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=False, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='', output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=False, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), 'NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\nINS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0\nIND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0\nINALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0\nMIDD:1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0\nOUTD:1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0\nOUTS:1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1\nOUTALL:1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1\nALL0.5:0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5', True, 0, 'values', '0,0.25,0.5,0.75,1', 'Block ID', 'IN05-OUT05', 'none', '', '0.5,1', 'BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11', 1.0, 'black', '20', False, 'ATTNDEEPON:IN05-OUT05:attn:1\n\nATTNDEEPOFF:IN05-OUT05:attn:0\n\nPROJDEEPOFF:IN05-OUT05:proj:0\n\nXYZ:::1', False, False, False, False, 0, None, [], 0, False, [], [], False, 0, 1, False, False, 0, None, [], -2, False, [], False, 0, None, None, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50) {} Traceback (most recent call last): File "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 74, in f res = list(func(args, kwargs)) File "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 53, in f res = func(*args, kwargs) File "/home/penny/stable-diffusion-webui/modules/call_queue.py", line 37, in f res = func(*args, *kwargs) File "/home/penny/stable-diffusion-webui/modules/txt2img.py", line 109, in txt2img processed = processing.process_images(p) File "/home/penny/stable-diffusion-webui/modules/processing.py", line 847, in process_images res = process_images_inner(p) File "/home/penny/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 59, in processing_process_images_hijack return getattr(processing, '__controlnet_original_process_images_inner')(p, args, kwargs) File "/home/penny/stable-diffusion-webui/modules/processing.py", line 1002, in process_images_inner x_samples_ddim = decode_latent_batch(p.sd_model, samples_ddim, target_device=devices.cpu, check_for_nans=True) File "/home/penny/stable-diffusion-webui/modules/processing.py", line 632, in decode_latent_batch sample = decode_first_stage(model, batch[i:i + 1])[0] File "/home/penny/stable-diffusion-webui/modules/sd_samplers_common.py", line 76, in decode_first_stage return samples_to_images_tensor(x, approx_index, model) File "/home/penny/stable-diffusion-webui/modules/sd_samplers_common.py", line 58, in samples_to_images_tensor x_sample = model.decode_first_stage(sample.to(model.first_stage_model.dtype)) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(args, kwargs) File "/home/penny/stable-diffusion-webui/repositories/generative-models/sgm/models/diffusion.py", line 121, in decode_first_stage out = self.first_stage_model.decode(z) File "/home/penny/stable-diffusion-webui/repositories/generative-models/sgm/models/autoencoder.py", line 315, in decode dec = self.decoder(z, decoder_kwargs) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(args, kwargs) File "/home/penny/stable-diffusion-webui/repositories/generative-models/sgm/modules/diffusionmodules/model.py", line 722, in forward h = self.mid.attn_1(h, kwargs) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forwardcall(*args, **kwargs) File "/home/penny/stable-diffusion-webui/repositories/generative-models/sgm/modules/diffusionmodules/model.py", line 260, in forward h = self.attention(h_) File "/home/penny/stable-diffusion-webui/repositories/generative-models/sgm/modules/diffusionmodules/model.py", line 246, in attention out = xformers.ops.memory_efficient_attention( File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/init.py", line 301, in memory_efficient_attention return _memory_efficient_attention( File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/init.py", line 462, in _memory_efficient_attention return _memory_efficient_attention_forward( File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/init.py", line 481, in _memory_efficient_attention_forward op = _dispatch_fw(inp, False) File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/dispatch.py", line 135, in _dispatch_fw return _run_priority_list( File "/home/penny/stable-diffusion-webui/venv/lib/python3.10/site-packages/xformers/ops/fmha/dispatch.py", line 76, in _run_priority_list raise NotImplementedError(msg) NotImplementedError: No operator found for memory_efficient_attention_forward with inputs: query : shape=(1, 4096, 1, 512) (torch.float16) key : shape=(1, 4096, 1, 512) (torch.float16) value : shape=(1, 4096, 1, 512) (torch.float16) attn_bias : <class 'NoneType'> p : 0.0 ckF is not supported because: max(query.shape[-1], value.shape[-1]) > 256


Total progress: 100%|███████████████████████████| 20/20 [00:19<00:00, 11.79it/s]

截图 2024-10-24 12-09-17