mlsanityData to 14 Oct 2026

Masked-Attention Diffusion Guidance for Spatially Controlling Text-to-Image Generation

arXiv 2308.06027 ↗First posted 11 Aug 2023cs.CV cs.GRcited by 9

On the map: Diffusion models → Image generation, text-to-image and editing

Abstract (arXiv)

Text-to-image synthesis has achieved high-quality results with recent advances in diffusion models. However, text input alone has high spatial ambiguity and limited user controllability. Most existing methods allow spatial control through additional visual guidance (e.g., sketches and semantic masks) but require additional training with annotated images. In this paper, we propose a method for spatially controlling text-to-image generation without further training of diffusion models. Our method is based on the insight that the cross-attention maps reflect the positional relationship between words and pixels. Our aim is to control the attention maps according to given semantic masks and text prompts. To this end, we first explore a simple approach of directly swapping the cross-attention maps with constant maps computed from the semantic regions. Some prior works also allow training-free spatial control of text-to-image diffusion models by directly manipulating cross-attention maps. However, these approaches still suffer from misalignment to given masks because manipulated attention maps are far from actual ones learned by diffusion models. To address this issue, we propose masked-attention guidance, which can generate images more faithful to semantic masks via indirect control of attention to each word and pixel by manipulating noise images fed to diffusion models. Masked-attention guidance can be easily integrated into pre-trained off-the-shelf diffusion models (e.g., Stable Diffusion) and applied to the tasks of text-guided image editing. Experiments show that our method enables more accurate spatial control than baselines qualitatively and quantitatively.

Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Image generation, text-to-image and editing, one of 14 directions in Diffusion models. Builds on 58 of its 66 references that are in the map. First posted on arXiv 11 Aug 2023.

Builds on

58 of 66 references.

Closest ancestors · 18

Same direction, newest first

  1. 2023Directed Diffusion: Direct Control of Object Placement through Attention Guidance25 Feb
  2. 2023Modulating Pretrained Diffusion Models for Multimodal Image Synthesis24 Feb
  3. 2023MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation16 Feb
  4. 2023Adding Conditional Control to Text-to-Image Diffusion Models10 Feb
  5. 2023GLIGEN: Open-Set Grounded Text-to-Image Generation17 Jan
  6. 2022Multi-Concept Customization of Text-to-Image Diffusion8 Dec
  7. 2022SpaText: Spatio-Textual Representation for Controllable Image Generation25 Nov
  8. 2022InstructPix2Pix: Learning to Follow Image Editing Instructions17 Nov
  9. 2022eDiff-I: Text-to-Image Diffusion Models with an Ensemble of Expert Denoisers2 Nov
  10. 2022DiffEdit: Diffusion-based semantic image editing with mask guidance20 Oct
  11. 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generation25 Aug
  12. 2022Blended Latent Diffusion6 Jun
6 more
  1. 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding23 May
  2. 2022Hierarchical Text-Conditional Image Generation with CLIP Latents13 Apr
  3. 2021GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models20 Dec
  4. 2021Blended Diffusion for Text-driven Editing of Natural Images29 Nov
  5. 2021Palette: Image-to-Image Diffusion Models10 Nov
  6. 2021DiffusionCLIP: Text-Guided Diffusion Models for Robust Image Manipulation6 Oct

Other references · 40

  1. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  2. 2020Denoising Diffusion Probabilistic Modelscited by 21,076
  3. 2015U-Net: Convolutional Networks for Biomedical Image Segmentationcited by 19,713
  4. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
  5. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  6. 2020Denoising Diffusion Implicit Modelscited by 9,781
  7. 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,255
  8. 2018A Style-Based Generator Architecture for Generative Adversarial Networkscited by 6,013
  9. 2022Classifier-Free Diffusion Guidancecited by 5,847
  10. 2021Improved Denoising Diffusion Probabilistic Modelscited by 3,761
  11. 2019Analyzing and Improving the Image Quality of StyleGANcited by 3,588
  12. 2017Progressive Growing of GANs for Improved Quality, Stability, and Variationcited by 2,988
28 more
  1. 2018Large Scale GAN Training for High Fidelity Natural Image Synthesiscited by 2,626
  2. 2022Prompt-to-Prompt Image Editing with Cross Attention Controlcited by 2,431
  3. 2021Masked-attention Mask Transformer for Universal Image Segmentationcited by 2,351
  4. 2021SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equationscited by 1,937
  5. 2022RePaint: Inpainting using Denoising Diffusion Probabilistic Modelscited by 1,430
  6. 2021Alias-Free Generative Adversarial Networkscited by 1,184
  7. 2021StyleCLIP: Text-Driven Manipulation of StyleGAN Imagerycited by 991
  8. 2020Encoding in Style: a StyleGAN Encoder for Image-to-Image Translationcited by 727
  9. 2019Interpreting the Latent Space of GANs for Semantic Face Editingcited by 695
  10. 2020GANSpace: Discovering Interpretable GAN Controlscited by 614
  11. 2023Zero-shot Image-to-Image Translationcited by 505
  12. 2022StyleGAN-XL: Scaling StyleGAN to Large Diverse Datasetscited by 492
  13. 2023Scaling up GANs for Text-to-Image Synthesiscited by 492
  14. 2020Closed-Form Factorization of Latent Semantics in GANscited by 408
  15. 2020StyleFlow: Attribute-conditioned Exploration of StyleGAN-Generated Images using Conditional Continuous Normalizing Flowscited by 349
  16. 2020Unsupervised Discovery of Interpretable Directions in the GAN Latent Spacecited by 289
  17. 2019On the "steerability" of generative adversarial networkscited by 248
  18. 2023Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifoldcited by 219
  19. 2022The Role of ImageNet Classes in Fr'echet Inception Distancecited by 213
  20. 2021StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generatorscited by 164
  21. 2021HairCLIP: Design Your Hair by Text and Reference Imagecited by 80
  22. 2021CLIP2StyleGAN: Unsupervised Extraction of StyleGAN Edit Directionscited by 78
  23. 2021Low-Rank Subspaces in GANscited by 53
  24. 2020GAN "Steerability" without optimizationcited by 48
  25. 2022SceneComposer: Any-Level Semantic Image Synthesiscited by 43
  26. 2021EigenGAN: Layer-Wise Eigen-Learning for GANscited by 34
  27. 2022User-Controllable Latent Transformer for StyleGAN Image Layout Editingcited by 28
  28. 2022ManiCLIP: Multi-Attribute Face Manipulation from Textcited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 2; 2025: 6; 2026: 1.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023Compositional Text-to-Image Synthesis with Attention Map Control of Diffusion Models
  2. 2024Enhancing Semantic Fidelity in Text-to-Image Synthesis: Attention Regulation in Diffusion Models
  3. 2023Harnessing the Spatial-Temporal Attention of Diffusion Models for High-Fidelity Text-to-Image Synthesis
  4. 2023Grounded Text-to-Image Synthesis with Attention Refocusing
  5. 2024Layout-to-Image Generation with Localized Descriptions using ControlNet with Cross-Attention Control
  6. 2024Training-Free Layout-to-Image Generation with Marginal Attention Constraints
  7. 2025Test-time Controllable Image Generation by Explicit Spatial Constraint Enforcement
  8. 2025Spatial Transport Optimization by Repositioning Attention Map for Training-Free Text-to-Image Synthesis