[X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui
What happened?
Whenever I try to use the controlnet cdxl IP-Adatper I see an error in my console. This doesn't happen with SDXL depth or canny models. The error is as follows:
2023-12-19 16:59:54,536 - ControlNet - INFO - unit_separate = False, style_align = False | 10/40 [00:23<01:15, 2.53s/it]
2023-12-19 16:59:54,538 - ControlNet - INFO - Loading model from cache: ip-adapter_xl [4209e9f7]
2023-12-19 16:59:54,544 - ControlNet - INFO - Loading preprocessor: ip-adapter_clip_sd15
2023-12-19 16:59:54,544 - ControlNet - INFO - preprocessor resolution = 512
*** Error running before_process_batch: /Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py
Traceback (most recent call last):
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/modules/scripts.py", line 627, in before_process_batch
script.before_process_batch(p, *script_args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1063, in before_process_batch
self.controlnet_hack(p)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1042, in controlnet_hack
self.controlnet_main_entry(p)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1020, in controlnet_main_entry
param.control_model.hook(
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlmodel_ipadapter.py", line 367, in hook
self.image_emb, self.uncond_image_emb = self.ipadapter.get_image_embeds(clip_vision_output)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlmodel_ipadapter.py", line 230, in get_image_embeds
image_prompt_embeds = self.image_proj_model(clip_image_embeds)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1502, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlmodel_ipadapter.py", line 38, in forward
clip_extra_context_tokens = self.proj(embeds).reshape(-1, self.clip_extra_context_tokens,
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1502, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions-builtin/Lora/networks.py", line 429, in network_Linear_forward
return originals.Linear_forward(self, input)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/stable-diffusion-webui-composable-lora/composable_lora.py", line 150, in lora_Linear_forward
return lora_forward(self, input, torch.nn.Linear_forward_before_lora(self, input))
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x1024 and 1280x8192)
Steps to reproduce the problem
M2 Mac running macOS Ventura Version 13.5 (22G74)
Go to text2image and enter a prompt.
Add an image to controlnet.
Choose the IP-Adapter XL model.
Try to generate an image.
What should have happened?
Should have been able to use the IP-Adapter.
Commit where the problem happens
webui: v1.6.1 (4afaaf8)
controlnet: v1.1.423
What browsers do you use to access the UI ?
Apple Safari
Command Line Arguments
I don't think so (but it's possible).
List of enabled extensions
Console logs
2023-12-19 16:59:54,536 - ControlNet - INFO - unit_separate = False, style_align = False | 10/40 [00:23<01:15, 2.53s/it]
2023-12-19 16:59:54,538 - ControlNet - INFO - Loading model from cache: ip-adapter_xl [4209e9f7]
2023-12-19 16:59:54,544 - ControlNet - INFO - Loading preprocessor: ip-adapter_clip_sd15
2023-12-19 16:59:54,544 - ControlNet - INFO - preprocessor resolution = 512
*** Error running before_process_batch: /Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py
Traceback (most recent call last):
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/modules/scripts.py", line 627, in before_process_batch
script.before_process_batch(p, *script_args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1063, in before_process_batch
self.controlnet_hack(p)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1042, in controlnet_hack
self.controlnet_main_entry(p)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 1020, in controlnet_main_entry
param.control_model.hook(
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlmodel_ipadapter.py", line 367, in hook
self.image_emb, self.uncond_image_emb = self.ipadapter.get_image_embeds(clip_vision_output)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlmodel_ipadapter.py", line 230, in get_image_embeds
image_prompt_embeds = self.image_proj_model(clip_image_embeds)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1502, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlmodel_ipadapter.py", line 38, in forward
clip_extra_context_tokens = self.proj(embeds).reshape(-1, self.clip_extra_context_tokens,
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1502, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions-builtin/Lora/networks.py", line 429, in network_Linear_forward
return originals.Linear_forward(self, input)
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/extensions/stable-diffusion-webui-composable-lora/composable_lora.py", line 150, in lora_Linear_forward
return lora_forward(self, input, torch.nn.Linear_forward_before_lora(self, input))
File "/Users/ME/Documents/stable-diffusion/stable-diffusion-webui/venv-torch-nightly/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x1024 and 1280x8192)
Is there an existing issue for this?
What happened?
Whenever I try to use the controlnet cdxl IP-Adatper I see an error in my console. This doesn't happen with SDXL depth or canny models. The error is as follows:
Steps to reproduce the problem
What should have happened?
Should have been able to use the IP-Adapter.
Commit where the problem happens
webui: v1.6.1 (4afaaf8) controlnet: v1.1.423
What browsers do you use to access the UI ?
Apple Safari
Command Line Arguments
List of enabled extensions
Console logs