MaskAttn-SDXL: Controllable Region-Level Text-To-Image Generation

Yu Chang, Jiahao Chen, Anzhe Cheng, Paul Bogdan
9/18/2025
cs.CVcs.LG
diffusion-flowtransformer-attention

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Text-to-image diffusion models achieve impressive realism but often suffer from compositional failures on prompts with multiple objects, attributes, and spatial relations, resulting in cross-token interference where entities entangle, attributes mix across objects, and spatial cues are violated. To address these failures, we propose MaskAttn-SDXL,a region-level gating mechanism applied to the cross-attention logits of Stable Diffusion XL(SDXL)'s UNet.

Show full abstract

MaskAttn-SDXL learns a binary mask per layer, injecting it into each cross-attention logit map before softmax to sparsify token-to-latent interactions so that only semantically relevant connections remain active. The method requires no positional encodings, auxiliary tokens, or external region masks, and preserves the original inference path with negligible overhead. In practice, our model improves spatial compliance and attribute binding in multi-object prompts while preserving overall image quality and diversity. These findings demonstrate that logit-level maksed cross-attention is an data-efficient primitve for enforcing compositional control, and our method thus serves as a practical extension for spatial control in text-to-image generation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chang2025maskattnsdxl,
  title  = {MaskAttn-SDXL: Controllable Region-Level Text-To-Image Generation},
  author = {Yu Chang and Jiahao Chen and Anzhe Cheng and Paul Bogdan},
  year   = {2025},
  eprint = {2509.15357},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.15357v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.15357.svg)](https://codeofpaper.com/paper/2509.15357)

Discussion