ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

ERROR lora diffusion_model.img_in.weight shape '[3072, 64]' is invalid for input of size 393216

Open guangquanshao opened this issue 2 years ago • 17 comments

Expected Behavior

I just add the flux1-canny-dev-lora to the workflow. 微信图片_20241202181606

Actual Behavior

微信图片_20241202192558

Steps to Reproduce

test.json

Debug Logs

Using xformers attention in VAE
Using xformers attention in VAE
Requested to load FluxClipModel_
Loading 1 new model
loaded completely 0.0 4777.53759765625 True
clip missing: ['text_projection.weight']
Requested to load AutoencodingEngine
Loading 1 new model
loaded completely 0.0 159.87335777282715 True
model weight dtype torch.float8_e4m3fn, manual cast: torch.bfloat16
model_type FLUX
Requested to load Flux
Loading 1 new model
ERROR lora diffusion_model.img_in.weight shape '[3072, 64]' is invalid for input of size 393216
patch type not recognized set diffusion_model.single_blocks.9.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.9.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.8.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.8.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.7.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.7.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.6.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.6.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.5.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.5.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.4.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.4.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.37.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.37.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.36.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.36.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.35.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.35.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.34.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.34.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.33.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.33.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.32.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.32.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.31.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.31.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.30.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.30.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.3.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.3.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.29.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.29.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.28.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.28.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.27.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.27.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.26.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.26.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.25.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.25.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.24.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.24.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.23.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.23.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.22.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.22.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.21.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.21.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.20.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.20.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.2.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.2.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.19.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.19.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.18.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.18.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.17.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.17.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.16.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.16.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.15.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.15.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.14.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.14.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.13.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.13.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.12.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.12.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.11.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.11.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.10.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.10.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.1.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.1.norm.key_norm.scale
patch type not recognized set diffusion_model.single_blocks.0.norm.query_norm.scale
patch type not recognized set diffusion_model.single_blocks.0.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.9.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.9.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.9.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.9.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.8.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.8.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.8.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.8.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.7.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.7.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.7.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.7.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.6.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.6.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.6.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.6.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.5.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.5.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.5.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.5.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.4.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.4.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.4.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.4.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.3.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.3.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.3.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.3.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.2.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.2.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.2.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.2.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.18.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.18.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.18.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.18.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.17.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.17.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.17.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.17.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.16.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.16.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.16.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.16.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.15.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.15.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.15.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.15.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.14.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.14.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.14.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.14.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.13.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.13.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.13.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.13.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.12.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.12.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.12.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.12.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.11.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.11.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.11.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.11.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.10.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.10.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.10.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.10.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.1.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.1.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.1.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.1.img_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.0.txt_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.0.txt_attn.norm.key_norm.scale
patch type not recognized set diffusion_model.double_blocks.0.img_attn.norm.query_norm.scale
patch type not recognized set diffusion_model.double_blocks.0.img_attn.norm.key_norm.scale
loaded partially 10969.959919891358 10968.944396972656 84
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [03:31<00:00, 10.59s/it]
Requested to load AutoencodingEngine
Loading 1 new model
loaded completely 0.0 159.87335777282715 True
Prompt executed in 310.07 seconds

Other

No response

guangquanshao avatar Dec 02 '24 11:12 guangquanshao

Make sure your ComfyUI is up to date.

ltdrdata avatar Dec 02 '24 13:12 ltdrdata

@ltdrdata I've updated my ComfyUI to the latest version, but I still got the same issue.

come880412 avatar Dec 03 '24 05:12 come880412

Same error

AndrewDrimer avatar Dec 04 '24 22:12 AndrewDrimer

@ltdrdata I've updated my ComfyUI to the latest version, but I still got the same issue.

What is your ComfyUI version? image

ltdrdata avatar Dec 08 '24 13:12 ltdrdata

@ltdrdata I downloaded the repository from the v0.3.6 release, but I’m not sure why the ComfyUI interface shows an unknown version.

螢幕擷取畫面 2024-12-12 112943

come880412 avatar Dec 12 '24 03:12 come880412

@ltdrdata I downloaded the repository from the v0.3.6 release, but I’m not sure why the ComfyUI interface shows an unknown version.

螢幕擷取畫面 2024-12-12 112943

How did you install the ComfyUI? It seems that you have installed ComfyUI in the wrong way.

ltdrdata avatar Dec 12 '24 04:12 ltdrdata

me too

ERROR lora diffusion_model.img_in.weight shape '[3072, 384]' is invalid for input of size 196608

lipeng1109 avatar Dec 12 '24 09:12 lipeng1109

same error

executorrr86 avatar Dec 14 '24 22:12 executorrr86

I got same error "ERROR lora diffusion_model.img_in.weight shape '[3072, 64]' is invalid for input of size 393216" from the first day until today... when using canny-lora or depth-lora models.

I tried to delete some custom nodes unused recently.

  • ComfyUI-Vextra-Nodes
  • comfyui-tensorop
  • ComfyUI Fooocus Nodes
  • ComfyUI_MiniCPM-V-2_6-int4

Then the error is fixed. ^^; Try this!!! Good luck!!!

JissiChoi avatar Dec 16 '24 06:12 JissiChoi

An error occurs when using hyper to accelerate flux:ERROR lora diffusion_model.img_in.weight shape '[3072, 384]' is invalid for input of size 196608

I mistakenly used the flux dev acceleration lora to the flux fill dev model.

lipeng1109 avatar Dec 18 '24 10:12 lipeng1109

got this error too. I use flux 1 dev alpha lora to reduce steps with the normal flux 1 dev fp8 model. I also use the flux 1 dev depth lora in the workflow.

ERROR lora diffusion_model.img_in.weight shape '[3072, 128]' is invalid for input of size 196608

image is still generating but it is very slow

kanarch66 avatar Dec 19 '24 02:12 kanarch66

Hi @ltdrdata I initially downloaded ComfyUI from the releases page to download the repo from v0.3.6. And now, I used the following command to clone the repository and get the latest version: git clone https://github.com/comfyanonymous/ComfyUI.git

image However, the same error persisted as mentioned earlier.

Fortunately, I tried the solution provided by @JissiChoi, and it worked perfectly! Thank you!!

come880412 avatar Dec 20 '24 09:12 come880412

This issue can occur when using an outdated version of ComfyUI, and in some cases, certain custom nodes may override parts of ComfyUI's functionality with outdated code, causing issues.

If the same issue occurs even with all custom nodes disabled in the latest version of ComfyUI, please reopen this issue.

ltdrdata avatar Dec 20 '24 13:12 ltdrdata

got this error too. I use flux 1 dev alpha lora to reduce steps with the normal flux 1 dev fp8 model. I also use the flux 1 dev depth lora in the workflow.

ERROR lora diffusion_model.img_in.weight shape '[3072, 128]' is invalid for input of size 196608

image is still generating but it is very slow

same here. i got ERROR lora diffusion_model.img_in.weight shape '[3072, 384]' is invalid for input of size 196608 when try to use Turbo alpha lora . tried to remove ComfyUI-Vextra-Nodes but error still there.

ktee95 avatar Dec 26 '24 05:12 ktee95

I have updated Comfy, deleted nodes, and still get the same ERROR lora diffusion_model.img_in.weight shape '[3072, 384]' is invalid for input of size 196608.

Has anyone found a solution?

iopsych1975 avatar Feb 20 '25 19:02 iopsych1975

Image

Anyone experiencing this issue should first check the ComfyUI version on the About page and then upload the exact workflow. (It's not just about the structure; details such as the configured model also need to be verified.)

ltdrdata avatar Feb 22 '25 00:02 ltdrdata

I'm having the same issue with the controlnet depth lora.. otherwise everythings works fine... but I'm getting the same error as above. I've installed a fresh version of comfy etc.. nothing seem to work.. any thoughts ?

alexgilseg avatar Feb 26 '25 20:02 alexgilseg