RuntimeError

#8
by Knoffelstokkie - opened

Hi,

I installed this by following Aitrepreneur's tutorial on youtube but get this error when trying to generate in Auto1111

RuntimeError: mat1 and mat2 shapes cannot be multiplied (154x1024 and 768x320)

Any idea?

It seems that controlnet is only compatible with SD 1.5 model. At least for me it works with 1.5, but not with 1.4 or 2.1 (where I get exactly the same error).

I was using 2.1 so I think you might be right. Thank you!

Have you tried specifying the 2.1 config file in the ControlNet settings in the UI? I have no idea if that works but there is a 2.1 config file, worth a shot.

I am using Colab Pro and i had the same issue. Using SD 1.5. You have to lower the resolution to 768 x 384 or maybe less. That has worked for me.

I have the same Problem,
first error with 2.1 model, Used 1.5 then and lowered the resultion down to 384x384. Tried with a lot of settings, always getting the same error.
Using this colab:
https://github.com/sagiodev/stablediffusion_webui/blob/master/StableDiffusionUI_ngrok_sagiodev.ipynb

This comment has been hidden

I am specifying the 2.1 config file in the ControlNet settings. There are errors, but it works with sd2.1 .

I am specifying the 2.1 config file in the ControlNet settings. There are errors, but it works with sd2.1 .

i got this working, thanks

how did you get it working?

Hi EightBitRG,
use always the latest colab-Version of https://github.com/sagiodev/stablediffusion_webui/blob/master/StableDiffusionUI_ngrok_sagiodev.ipynb
after automatic1111 is running, go to the extension tab and -> check for updates -> apply and restart ui. if you encounter a Error written in red in the interface, dont hesitate, kill automatic1111 and restart colab (automatic1111 isnt that stable...)
and here is a screenshot of my settings https://imgur.com/a/fbTqF7N
it worked for me
good luck

Please help me. I'm just a dumb artist lol

AttributeError: 'NoneType' object has no attribute 'convert'

i went into same issue. but i fix it by going to sittings and add ( models\v2-1_768-ema-pruned.yaml )
here screen shot i hope its helping !!
image.png

Hey guys, I'm trying to do 2.1 Control net on a 2.1 model and getting errros asking for individual config files... but there are no yamls in this folder.

Loading model: control_v11p_sd21_openposev2 [f3edb4e5]β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 80/80 [00:13<00:00, 6.63it/s]
Loaded state_dict from [C:\Users\xxxx\Deep\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd21_openposev2.safetensors]
Error running process: C:\Users\xxxx\Deep\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "C:\Users\xxxx\Deep\stable-diffusion-webui\modules\scripts.py", line 417, in process
script.process(p, *script_args)
File "C:\Users\xxxx\Deep\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 949, in process
model_net = self.load_control_model(p, unet, unit.model, unit.low_vram)
File "C:\Users\xxxx\Deep\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 636, in load_control_model
model_net = self.build_control_model(p, unet, model, lowvram)
File "C:\Users\xxxx\Deep\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 698, in build_control_model
assert os.path.exists(override_config), f'Error: The model config {override_config} is missing. ControlNet 1.1 must have configs.'
AssertionError: Error: The model config C:\Users\xxxx\Deep\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd21_openposev2.yaml is missing. ControlNet 1.1 must have configs.

I'm also getting the "RuntimeError: mat1 and mat2 shapes cannot be multiplied" but on both 1.5 & 2.1 models

For reference:

I'm on a 1080TI and have tried several variations in the below order (NB error changes for Torch1)

Torch2
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 5ab7f213bec2f816f9c5644becb32eb72c8ffb89
Launching Web UI with arguments: --port 7862 --medvram --xformers --no-half --no-half-vae
ControlNet v1.1.134
RuntimeError: mat1 and mat2 shapes cannot be multiplied (231x1024 and 768x320)
--
Torch2
Launching Web UI with arguments: --port 7862 --medvram --opt-split-attention --no-half --no-half-vae
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 5ab7f213bec2f816f9c5644becb32eb72c8ffb89
Launching Web UI with arguments: --port 7862 --medvram --xformers --no-half --no-half-vae
ControlNet v1.1.134
RuntimeError: mat1 and mat2 shapes cannot be multiplied (231x1024 and 768x320)
--
Torch1
Launching Web UI with arguments: --port 7862 --medvram --opt-split-attention --no-half --no-half-vae
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 5ab7f213bec2f816f9c5644becb32eb72c8ffb89
Launching Web UI with arguments: --port 7862 --medvram --xformers --no-half --no-half-vae
ControlNet v1.1.134
RuntimeError: The size of tensor a (1024) must match the size of tensor b (768) at non-singleton dimension 1
--
Torch1
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 5ab7f213bec2f816f9c5644becb32eb72c8ffb89
Launching Web UI with arguments: --port 7862 --medvram --xformers --no-half --no-half-vae
ControlNet v1.1.134
RuntimeError: The size of tensor a (1024) must match the size of tensor b (768) at non-singleton dimension 1

Hey getting the same error added config to the settings. There must be something we're missing here?

I am specifying the 2.1 config file in the ControlNet settings. There are errors, but it works with sd2.1 .
Can you recreate how you got this working?

Sign up or log in to comment