[GH-ISSUE #5] FluxTools-V2 causes mat1 and mat2 shapes cannot be multiplied error in FLUX1 models even after being disabled #6

Open
opened 2026-10-30 21:03:57 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @thejohnd0e on GitHub (Apr 21, 2025).
Original GitHub issue: https://github.com/AcademiaSD/sd-forge-fluxtools-v2/issues/5

Using FluxTools-V2 with any flux1 model (tested with flux1-dev-bnb-nf4.safetensors) causes a runtime crash during sampling, with the error:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (2304x128 and 64x3072)

Once the error happens, disabling FluxTools does not fix it — Forge needs to be fully restarted to recover.
The issue occurs even when Canny preprocessor works visually, and the UI loads normally.

FluxTools likely injects an incorrectly-shaped conditioning tensor (dim 128) into FLUX's img_in() or control pipeline, which expects a different shape (64). Even if FluxTools is visually off, the malformed tensor may remain in memory or model state.

webui_forge_cu124_torch24

Python 3.10.6
Torch 2.6.0+cu124
GPU: RTX 3060 (12 GB VRAM)
Model: flux1-dev-bnb-nf4.safetensors

Image

Originally created by @thejohnd0e on GitHub (Apr 21, 2025). Original GitHub issue: https://github.com/AcademiaSD/sd-forge-fluxtools-v2/issues/5 Using FluxTools-V2 with any flux1 model (tested with flux1-dev-bnb-nf4.safetensors) causes a runtime crash during sampling, with the error: RuntimeError: mat1 and mat2 shapes cannot be multiplied (2304x128 and 64x3072) Once the error happens, disabling FluxTools does not fix it — Forge needs to be fully restarted to recover. The issue occurs even when Canny preprocessor works visually, and the UI loads normally. FluxTools likely injects an incorrectly-shaped conditioning tensor (dim 128) into FLUX's img_in() or control pipeline, which expects a different shape (64). Even if FluxTools is visually off, the malformed tensor may remain in memory or model state. webui_forge_cu124_torch24 Python 3.10.6 Torch 2.6.0+cu124 GPU: RTX 3060 (12 GB VRAM) Model: flux1-dev-bnb-nf4.safetensors ![Image](https://github.com/user-attachments/assets/27c40756-09b6-437b-a2c7-878acfe7c4c2)
Author
Owner

@AcademiaSD commented on GitHub (Apr 22, 2025):

You must select the appropriate checkpoint for each tool, flux-depth-dev for the depth tool, flux-canny-dev for canny, flux-fill-dev for fill, and any flux-dev checkpoints for redux.

<!-- gh-comment-id:2822147570 --> @AcademiaSD commented on GitHub (Apr 22, 2025): You must select the appropriate checkpoint for each tool, flux-depth-dev for the depth tool, flux-canny-dev for canny, flux-fill-dev for fill, and any flux-dev checkpoints for redux.
Author
Owner

@AcademiaSD commented on GitHub (Apr 22, 2025):

https://www.youtube.com/watch?v=MHYSFBkF36s

<!-- gh-comment-id:2822148919 --> @AcademiaSD commented on GitHub (Apr 22, 2025): https://www.youtube.com/watch?v=MHYSFBkF36s
Author
Owner

@thejohnd0e commented on GitHub (Apr 24, 2025):

Yes, you're right, I was inattentive, but who reads these manuals ) Everything works now.
Thanks a lot

<!-- gh-comment-id:2828135023 --> @thejohnd0e commented on GitHub (Apr 24, 2025): Yes, you're right, I was inattentive, but who reads these manuals ) Everything works now. Thanks a lot
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AcademiaSD/sd-forge-fluxtools-v2#6
No description provided.