Issue with SD 2.1: size mismatch for input_blocks.1.1.proj_in.weight
After upgrading to the latest ControlNet I run into a size mismatch exception. Any ideas what could be causing it?
Control net works fine with SD 1.5
Here's the error log:
Loading model: control_v11p_sd21_depth [2722c7d7] Loaded state_dict from [D:\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd21_depth.safetensors] Loading config: D:\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd21_depth.yaml Error running process: D:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\scripts.py", line 417, in process script.process(p, *script_args) File "D:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 959, in process model_net = self.load_control_model(p, unet, unit.model, unit.low_vram) File "D:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 645, in load_control_model model_net = self.build_control_model(p, unet, model, lowvram) File "D:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 713, in build_control_model network = network_module( File "D:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\cldm.py", line 107, in init self.control_model.load_state_dict(state_dict) File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1671, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for ControlNet: size mismatch for input_blocks.1.1.proj_in.weight: copying a param with shape torch.Size([320, 320]) from checkpoint, the shape in current model is torch.Size([320, 320, 1, 1]). size mismatch for input_blocks.1.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 1024]) from checkpoint, the shape in current model is torch.Size([320, 768]). size mismatch for input_blocks.1.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 1024]) from checkpoint, the shape in current model is torch.Size([320, 768]). size mismatch for input_blocks.1.1.proj_out.weight: copying a param with shape torch.Size([320, 320]) from checkpoint, the shape in current model is torch.Size([320, 320, 1, 1]). size mismatch for input_blocks.2.1.proj_in.weight: copying a param with shape torch.Size([320, 320]) from checkpoint, the shape in current model is torch.Size([320, 320, 1, 1]). size mismatch for input_blocks.2.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 1024]) from checkpoint, the shape in current model is torch.Size([320, 768]). size mismatch for input_blocks.2.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 1024]) from checkpoint, the shape in current model is torch.Size([320, 768]). size mismatch for input_blocks.2.1.proj_out.weight: copying a param with shape torch.Size([320, 320]) from checkpoint, the shape in current model is torch.Size([320, 320, 1, 1]). ....
the same errors I try changed yaml file from v15 to v21,still problems.and I reintsall controlnet,even reintsall SD. the issue still in
the same errors crazy,
did you find out what the issue is? is it just controlnet 1.1 not supporting SD 2.1 yet?
did you find out what the issue is? is it just controlnet 1.1 not supporting SD 2.1 yet?
Hello. Check this, worked for me: https://huggingface.co/thibaud/controlnet-sd21/discussions/37#644aa2b8cb45734dfd439fa3
that worked for me, thanks! No more errors, the output looks like trash tho compared with 1.5 but might be just 2.1. Even with embeddings and everything, with controlnet off looks really good, and as soon as I enable with the same settings I get good results from 1.5 it just outputs garbage. I'll play with the settings tho. Thanks again!
你知道问题出在哪里了吗?只是 controlnet 1.1 还不支持 SD 2.1 吗?
你好。检查这个,对我有用: https://huggingface.co/thibaud/controlnet-sd21/discussions/37#644aa2b8cb45734dfd439fa3
thanks