You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prompt attention masks are misordered when generating multiple images per prompt #15462
I found that some pipelines pair embeddings with the wrong attention mask when I batch prompts with different masks and request multiple images per prompt. For two prompts and two images each, the embeddings are ordered [p0, p0, p1, p1], while the masks are ordered [m0, m1, m0, m1]. In Sana and SanaSprint, the denoiser can drop valid tokens or attend to padding for the middle two samples. In AuraFlow, the mismatch appears in the masks returned by encode_prompt. The pipeline's handling of precomputed padding is tracked separately in #13624.
I found the same ordering bug in Sana ControlNet, SanaSprint Img2Img, Sana PAG, Kandinsky 3, Kandinsky 3 Img2Img, Lumina2, PRX and PRX Pixel. The PRX instance is also covered by #13608. I have a patch that repeats each mask row alongside its embedding.
Activity
mertkayacs commentedon Dec 4, 2026
I opened #15492 with the fix for the affected pipelines.