Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
16.97k stars 1.96k forks source link

[Bug]: KeyError: 'ip-adapter_sd15_plus' #2786

Closed zhangukai closed 6 months ago

zhangukai commented 6 months ago

Is there an existing issue for this?

What happened?

The IP-adapter cannot be used for interior rendering

Steps to reproduce the problem

Controlnet Unit 1, add 1 indoor image to multiple inputs. Controlnet Unit 2, add an interior wire sketch Snipaste_2024-04-22_14-50-35 Snipaste_2024-04-22_14-50-43

What should have happened?

it should transfer the style from Figure 1 to Figure 2

Commit where the problem happens

webui:b9ab9dc controlnet: b4b5bfe

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

no

List of enabled extensions

Snipaste_2024-04-22_15-05-21

Console logs

Traceback (most recent call last):
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\scripts.py", line 825, in process
        script.process(p, *script_args)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1247, in process
        self.controlnet_hack(p)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1232, in controlnet_hack
        self.controlnet_main_entry(p)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 982, in controlnet_main_entry
        controls, hr_controls, additional_maps = get_control(
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 314, in get_control
        controls, hr_controls = list(zip(*[preprocess_input_image(img) for img in optional_tqdm(input_images)]))
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 314, in <listcomp>
        controls, hr_controls = list(zip(*[preprocess_input_image(img) for img in optional_tqdm(input_images)]))
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 269, in preprocess_input_image
        detected_map = preprocessor.cached_call(
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\utils.py", line 81, in decorated_func
        return cached_func(*args, **kwargs)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\utils.py", line 65, in cached_func
        return func(*args, **kwargs)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\supported_preprocessor.py", line 170, in cached_call
        return self(*args, **kwargs)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\preprocessor\ip_adapter_auto.py", line 17, in __call__
        module: str = IPAdapterPreset.match_model(model).module
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\ipadapter\presets.py", line 19, in match_model
        return _preset_by_model[model_name]
    KeyError: 'ip-adapter_sd15_plus'

---
Python 3.10.11 | packaged by conda-forge | (main, May 10 2023, 18:51:25) [MSC v.1934 64 bit (AMD64)]
Version: v1.9.0
Commit hash: adadb4e3c7382bf3e4f7519126cd6c70f4f8557b
Launching Web UI with arguments: --theme dark --xformers --api --autolaunch
No SDP backend available, likely because you are running in pytorch versions < 2.0. In fact, you are using PyTorch 1.12.1+cu113. You might want to consider upgrading.
==============================================================================
You are running torch 1.12.1+cu113.
The program is tested to work with torch 2.1.2.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
=================================================================================
You are running xformers 0.0.14.dev.
The program is tested to work with xformers 0.0.23.post1.
To reinstall the desired version, run with commandline flag --reinstall-xformers.

Use --skip-version-check commandline argument to disable this check.
=================================================================================
Civitai Helper: Root Path is: D:\SD\sd-webui-aki\sd-webui-aki-v4.1
Civitai Helper: Get Custom Model Folder
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[AddNet] Updating model hashes...
[AddNet] Updating model hashes...
ControlNet preprocessor location: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\annotator\downloads
2024-04-22 14:30:24,394 - ControlNet - INFO - ControlNet v1.1.445
2024-04-22 14:30:24,512 - ControlNet - INFO - ControlNet v1.1.445
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [ec41bd2a82] from D:\SD\sd-webui-aki\sd-webui-aki-v4.1\models\Stable-diffusion\Photon_v1.safetensors
Creating model from config: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\configs\v1-inference.yaml
2024-04-22 14:30:25,402 - ControlNet - INFO - ControlNet UI callback registered.
Civitai Helper: Settings:
Civitai Helper: max_size_preview: True
Civitai Helper: skip_nsfw_preview: False
Civitai Helper: open_url_with_js: True
Civitai Helper: proxy:
Civitai Helper: use civitai api key: False
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.
🤯 LobeTheme: Initializing...
Startup time: 17.7s (prepare environment: 5.8s, import torch: 3.1s, import gradio: 1.3s, setup paths: 1.2s, initialize shared: 0.3s, other imports: 0.7s, load scripts: 2.8s, create ui: 1.0s, gradio launch: 0.4s, add APIs: 0.8s, app_started_callback: 0.3s).
Loading VAE weights specified in settings: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: xformers... done.
Model loaded in 5.7s (create model: 0.8s, apply weights to model: 4.2s, load VAE: 0.1s, calculate empty prompt: 0.4s).
2024-04-22 14:31:29,676 - ControlNet - INFO - Preview Resolution = 512
2024-04-22 14:31:35,320 - ControlNet - INFO - Preview Resolution = 512
2024-04-22 14:31:53,989 - ControlNet - INFO - unit_separate = False, style_align = False
2024-04-22 14:31:54,177 - ControlNet - INFO - Loading model: ip-adapter_sd15_plus [32cd8f7f]
2024-04-22 14:31:54,210 - ControlNet - INFO - Loaded state_dict from [D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\models\ip-adapter_sd15_plus.pth]
2024-04-22 14:31:54,415 - ControlNet - INFO - ControlNet model ip-adapter_sd15_plus [32cd8f7f](ControlModelType.IPAdapter) loaded.
2024-04-22 14:31:54,418 - ControlNet - INFO - using mask
2024-04-22 14:31:54,426 - ControlNet - INFO - Using preprocessor: ip-adapter-auto
2024-04-22 14:31:54,426 - ControlNet - INFO - preprocessor resolution = 853
*** Error running process: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py
    Traceback (most recent call last):
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\scripts.py", line 825, in process
        script.process(p, *script_args)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1247, in process
        self.controlnet_hack(p)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1232, in controlnet_hack
        self.controlnet_main_entry(p)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 982, in controlnet_main_entry
        controls, hr_controls, additional_maps = get_control(
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 314, in get_control
        controls, hr_controls = list(zip(*[preprocess_input_image(img) for img in optional_tqdm(input_images)]))
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 314, in <listcomp>
        controls, hr_controls = list(zip(*[preprocess_input_image(img) for img in optional_tqdm(input_images)]))
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py", line 269, in preprocess_input_image
        detected_map = preprocessor.cached_call(
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\utils.py", line 81, in decorated_func
        return cached_func(*args, **kwargs)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\utils.py", line 65, in cached_func
        return func(*args, **kwargs)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\supported_preprocessor.py", line 170, in cached_call
        return self(*args, **kwargs)
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\preprocessor\ip_adapter_auto.py", line 17, in __call__
        module: str = IPAdapterPreset.match_model(model).module
      File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\ipadapter\presets.py", line 19, in match_model
        return _preset_by_model[model_name]
    KeyError: 'ip-adapter_sd15_plus'

---
2024-04-22 14:35:38,193 - ControlNet - INFO - unit_separate = False, style_align = False
2024-04-22 14:35:38,193 - ControlNet - INFO - Loading model from cache: ip-adapter_sd15_plus [32cd8f7f]
2024-04-22 14:35:38,193 - ControlNet - INFO - using mask
2024-04-22 14:35:38,201 - ControlNet - INFO - Using preprocessor: ip-adapter-auto
2024-04-22 14:35:38,202 - ControlNet - INFO - preprocessor resolution = 853
*** Error running process: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\controlnet.py

Additional information

No response

zhangukai commented 6 months ago

Thank you very much for your help in your busy schedule. I have downloaded the ip-adapter-plus_sd15.safetensors, but another mistake has occurred. Are some steps I have done wrong? Snipaste_2024-04-22_14-50-35 Snipaste_2024-04-22_14-50-43 Snipaste_2024-04-23_09-51-32

zhangukai commented 6 months ago

Python 3.10.11 | packaged by conda-forge | (main, May 10 2023, 18:51:25) [MSC v.1934 64 bit (AMD64)] Version: v1.9.3 Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0 Launching Web UI with arguments: --theme dark --xformers --api --autolaunch No SDP backend available, likely because you are running in pytorch versions < 2.0. In fact, you are using PyTorch 1.12.1+cu113. You might want to consider upgrading.

You are running torch 1.12.1+cu113. The program is tested to work with torch 2.1.2. To reinstall the desired version, run with commandline flag --reinstall-torch. Beware that this will cause a lot of large files to be downloaded, as well as there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.

================================================================================= You are running xformers 0.0.14.dev. The program is tested to work with xformers 0.0.23.post1. To reinstall the desired version, run with commandline flag --reinstall-xformers.

Use --skip-version-check commandline argument to disable this check.

Civitai Helper: Root Path is: D:\SD\sd-webui-aki\sd-webui-aki-v4.1 Civitai Helper: Get Custom Model Folder Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu. [AddNet] Updating model hashes... [AddNet] Updating model hashes... ControlNet preprocessor location: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\annotator\downloads 2024-04-23 09:48:50,214 - ControlNet - INFO - ControlNet v1.1.445 2024-04-23 09:48:50,334 - ControlNet - INFO - ControlNet v1.1.445 sd-webui-prompt-all-in-one background API service started successfully. Loading weights [ec41bd2a82] from D:\SD\sd-webui-aki\sd-webui-aki-v4.1\models\Stable-diffusion\Photon_v1.safetensors Creating model from config: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\configs\v1-inference.yaml 2024-04-23 09:48:51,226 - ControlNet - INFO - ControlNet UI callback registered. Civitai Helper: Settings: Civitai Helper: max_size_preview: True Civitai Helper: skip_nsfw_preview: False Civitai Helper: open_url_with_js: True Civitai Helper: proxy: Civitai Helper: use civitai api key: False 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. 🤯 LobeTheme: Initializing... Startup time: 18.0s (prepare environment: 5.9s, import torch: 3.1s, import gradio: 1.3s, setup paths: 1.3s, initialize shared: 0.3s, other imports: 0.8s, load scripts: 2.8s, create ui: 1.1s, gradio launch: 0.4s, add APIs: 0.8s, app_started_callback: 0.3s). Loading VAE weights specified in settings: D:\SD\sd-webui-aki\sd-webui-aki-v4.1\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors Applying attention optimization: xformers... done. Model loaded in 5.6s (create model: 0.8s, apply weights to model: 4.1s, load VAE: 0.1s, calculate empty prompt: 0.4s). 2024-04-23 09:50:00,997 - ControlNet - INFO - Preview Resolution = 512 2024-04-23 09:50:13,149 - ControlNet - INFO - unit_separate = False, style_align = False 2024-04-23 09:50:13,336 - ControlNet - INFO - Loading model: ip-adapter-plus_sd15 [836b5c2e] 2024-04-23 09:50:13,339 - ControlNet - INFO - Loaded state_dict from [D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\models\ip-adapter-plus_sd15.safetensors] 2024-04-23 09:50:13,542 - ControlNet - INFO - ControlNet model ip-adapter-plus_sd15 836b5c2e loaded. 2024-04-23 09:50:13,543 - ControlNet - INFO - using mask 2024-04-23 09:50:13,550 - ControlNet - INFO - Using preprocessor: ip-adapter-auto 2024-04-23 09:50:13,551 - ControlNet - INFO - preprocessor resolution = 853 2024-04-23 09:50:13,553 - ControlNet - INFO - ip-adapter-auto => ip-adapter_clip_h 2024-04-23 09:50:19,942 - ControlNet - INFO - Loading model: control_v11p_sd15_lineart [43d4be0d] 2024-04-23 09:50:20,219 - ControlNet - INFO - Loaded state_dict from [D:\SD\sd-webui-aki\sd-webui-aki-v4.1\models\ControlNet\control_v11p_sd15_lineart.pth] 2024-04-23 09:50:20,219 - ControlNet - INFO - controlnet_default_config 2024-04-23 09:50:22,063 - ControlNet - INFO - ControlNet model control_v11p_sd15_lineart 43d4be0d loaded. 2024-04-23 09:50:22,110 - ControlNet - INFO - Using preprocessor: lineart_standard (from white bg & black line) 2024-04-23 09:50:22,111 - ControlNet - INFO - preprocessor resolution = 744 2024-04-23 09:50:22,191 - ControlNet - INFO - IP-Adapter using advanced weighting [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 2024-04-23 09:50:22,330 - ControlNet - INFO - ControlNet Hooked - Time = 9.184790134429932 Error completing request Arguments: ('task(i5dzhgpldtw65tj)', <gradio.routes.Request object at 0x000001AB549B8130>, '', '', ['基础起手式'], 1, 1, 7, 744, 1280, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 40, 'DPM++ 3M SDE', 'Karras', False, '', 0.8, -1, False, -1, 0, 0, 0, False, 'MultiDiffusion', False, True, 1024, 1024, 96, 96, 48, 1, '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, False, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', UiControlNetUnit(enabled=True, module='ip-adapter-auto', model='ip-adapter-plus_sd15 [836b5c2e]', weight=0.8, image={'image': array([[[ 17, 16, 14], [ 17, 16, 14], [ 17, 16, 14], ..., [103, 103, 105], [103, 103, 105], [103, 103, 105]],


[[ 17, 16, 14], [ 17, 16, 14], [ 17, 16, 14], ..., [103, 103, 105], [103, 103, 105], *** [103, 103, 105]],


[[ 16, 15, 13], [ 16, 15, 13], [ 16, 15, 13], ..., [103, 103, 105], [103, 103, 105], *** [103, 103, 105]],


*** ...,


[[ 22, 20, 21], [ 22, 20, 21], [ 22, 20, 21], ..., [122, 126, 129], [122, 126, 129], *** [122, 126, 129]],


[[ 20, 18, 19], [ 19, 17, 18], [ 19, 17, 18], ..., [120, 124, 127], [120, 124, 127], *** [121, 125, 128]],


[[ 16, 14, 15], [ 16, 14, 15], [ 17, 15, 16], ..., [119, 123, 126], [119, 123, 126], [119, 123, 126]]], dtype=uint8), 'mask': array([[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


*** ...,


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], [0, 0, 0]]], dtype=uint8)}, resize_mode='Crop and Resize', low_vram=False, processor_res=512, threshold_a=0.5, threshold_b=0.5, guidance_start=0, guidance_end=0.8, pixel_perfect=True, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ipadapter_input=None), UiControlNetUnit(enabled=True, module='lineart_standard (from white bg & black line)', model='control_v11p_sd15_lineart [43d4be0d]', weight=0.9, image={'image': array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], [255, 255, 255], *** [255, 255, 255]],


[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], [255, 255, 255], *** [255, 255, 255]],


[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], [255, 255, 255], *** [255, 255, 255]],


*** ...,


[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], [255, 255, 255], *** [255, 255, 255]],


[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], [255, 255, 255], *** [255, 255, 255]],


[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8), 'mask': array([[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


*** ...,


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], *** [0, 0, 0]],


[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], [0, 0, 0]]], dtype=uint8)}, resize_mode='Crop and Resize', low_vram=False, processor_res=512, threshold_a=0.5, threshold_b=0.5, guidance_start=0, guidance_end=0.9, pixel_perfect=True, control_mode='ControlNet is more important', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=512, threshold_a=64, threshold_b=64, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), 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 "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\call_queue.py", line 57, in f res = list(func(args, kwargs)) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\call_queue.py", line 36, in f res = func(*args, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\txt2img.py", line 109, in txt2img processed = processing.process_images(p) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\processing.py", line 845, in process_images res = process_images_inner(p) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\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 "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\processing.py", line 981, in process_images_inner samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\hook.py", line 449, in process_sample return process.sample_before_CN_hack(args, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\processing.py", line 1328, in sample samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x)) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_samplers_kdiffusion.py", line 218, in sample samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, extra_params_kwargs)) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_samplers_common.py", line 272, in launch_sampling return func() File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_samplers_kdiffusion.py", line 218, in samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, extra_params_kwargs)) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\k-diffusion\k_diffusion\sampling.py", line 668, in sample_dpmpp_3m_sde denoised = model(x, sigmas[i] * s_in, *extra_args) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_samplers_cfg_denoiser.py", line 237, in forward x_out = self.inner_model(x_in, sigma_in, cond=make_condition_dict(cond_in, image_cond_in)) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\k-diffusion\k_diffusion\external.py", line 112, in forward eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), *kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\k-diffusion\k_diffusion\external.py", line 138, in get_eps return self.inner_model.apply_model(args, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_hijack_utils.py", line 18, in setattr(resolved_obj, func_path[-1], lambda *args, kwargs: self(*args, *kwargs)) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\modules\sd_hijack_utils.py", line 32, in call return self.__orig_func(args, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 858, in apply_model x_recon = self.model(x_noisy, t, cond) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 1335, in forward out = self.diffusion_model(x, t, context=cc) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\hook.py", line 874, in forward_webui raise e File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\hook.py", line 871, in forward_webui return forward(*args, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\hook.py", line 778, in forward h = module(h, emb, context) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 84, in forward x = layer(x, context) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 334, in forward x = block(x, context=context[i]) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 269, in forward return checkpoint(self._forward, (x, context), self.parameters(), self.checkpoint) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\util.py", line 121, in checkpoint return CheckpointFunction.apply(func, len(inputs), args) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\util.py", line 136, in forward output_tensors = ctx.run_function(ctx.input_tensors) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 273, in _forward x = self.attn2(self.norm2(x), context=context) + x File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1.ext\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(input, **kwargs) File "D:\SD\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\scripts\ipadapter\plugable_ipadapter.py", line 36, in attn_forward_hacked out = torch.nn.functional.scaled_dot_product_attention( AttributeError: module 'torch.nn.functional' has no attribute 'scaled_dot_product_attention'

zhangukai commented 6 months ago

I upgraded my Torch and xFormers and they work properly. Thank you very much