comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
57.49k stars 6.09k forks source link

RuntimeError: mat1 and mat2 shapes cannot be multiplied (3456x64 and 128x3072) #5721

Open IAFFeng opened 9 hours ago

IAFFeng commented 9 hours ago

Expected Behavior

I don't know where the problem is, I hope there will be no such error.

Actual Behavior

When using the workflow of FLUX.1-Canny-dev-lora, sometimes an error is reported, and the image can be produced again after clicking again. It is sometimes good and sometimes bad. It feels like a bug

Steps to Reproduce

ComfyUI_temp_suidd_00020_

Debug Logs

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 64, in forward_comfy_cast_weights
    return torch.nn.functional.linear(input, weight, bias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 shapes cannot be multiplied (3456x64 and 128x3072)

Other

No response

IAFFeng commented 8 hours ago

Changing to t5xxl_fp8_e4m3fn_scaled will be fine, it seems

George0726 commented 3 hours ago

I have tried with t5xxl_fp8_e4m3fn_scaled. it seems still not work