mayocream/koharu

[Bug] FLUX.2 Klein inpainting fails on macOS (Metal) with "Meta SDPA does not support q head dim 512"

Open

#652 aperta il 3 mag 2026

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Rust (257 fork)github user discovery
bughelp wantedplatform: macos

Metriche repository

Star
 (4568 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

What you expected to happen When selecting the FLUX.2 Klein 4B model for inpainting, I expected the image processing to complete successfully using Metal acceleration on Apple Silicon.

What happened instead The inpainting pipeline fails during inference. The process stops at step 6, throwing an error that the Metal SDPA (Scaled Dot-Product Attention) kernel does not support a query head dimension of 512.

Steps to reproduce

Launch Koharu on macOS.

Go to Settings and set the Inpainting model to FLUX.2 Klein 4B.

Load a manga page and run the translation/inpainting pipeline.

The process aborts and the error appears in the terminal.

logs ⚠ pipeline step failed: Meta SDPA does not support q head dim 512: q dims [1, 1, 16060, 512], k dims [1, 1, 16060, 512], v dims [1, 1, 16060, 512]. engine=flux2-klein page=019deda5-7aa3-71b2-9d1c-4a58ac670f52 step_index=6

Your OS and GPU/runtime setup

OS: macOS

Chip: Apple M4 Max (Apple Silicon)

Runtime/Backend: Metal (Default GPU acceleration)

App Version: v0.58.0

Guida contributor