mayocream/koharu

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

Open

#652 aberto em 3 de mai. de 2026

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (257 forks)github user discovery
bughelp wantedplatform: macos

Métricas do repositório

Stars
 (4.568 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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

Guia do colaborador