Comfy-Org / Comfy-Org/ComfyUI

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

Open
#5,721 6 comments 4 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### 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_](https://github.com/user-attachments/assets/ee044140-aaae-46f6-a616-19dc4b13e3af)

### Debug Logs

```powershell
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.