mlsanityData to 7 Oct 2026

Towards Understanding Cross and Self-Attention in Stable Diffusion for Text-Guided Image Editing

arXiv 2403.03431 ↗First posted 6 Mar 2024cs.CVcited by 134

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

Abstract (arXiv)

Deep Text-to-Image Synthesis (TIS) models such as Stable Diffusion have recently gained significant popularity for creative Text-to-image generation. Yet, for domain-specific scenarios, tuning-free Text-guided Image Editing (TIE) is of greater importance for application developers, which modify objects or object properties in images by manipulating feature components in attention layers during the generation process. However, little is known about what semantic meanings these attention layers have learned and which parts of the attention maps contribute to the success of image editing. In this paper, we conduct an in-depth probing analysis and demonstrate that cross-attention maps in Stable Diffusion often contain object attribution information that can result in editing failures. In contrast, self-attention maps play a crucial role in preserving the geometric and shape details of the source image during the transformation to the target image. Our analysis offers valuable insights into understanding cross and self-attention maps in diffusion models. Moreover, based on our findings, we simplify popular image editing methods and propose a more straightforward yet more stable and efficient tuning-free procedure that only modifies self-attention maps of the specified attention layers during the denoising process. Experimental results show that our simplified method consistently surpasses the performance of popular approaches on multiple datasets.

Key facts. Cited by 134 papers in the map (data through 7 Oct 2026). Placed in Image generation, text-to-image and editing, one of 14 directions in Diffusion models. Builds on 34 of its 41 references that are in the map. First posted on arXiv 6 Mar 2024.

Builds on

34 of 41 references.

Closest ancestors · 11

Same direction, newest first

  1. 2023PAI-Diffusion: Constructing and Serving a Family of Open Chinese Diffusion Models for Text-to-image Synthesis on the Cloud11 Sep
  2. 2023T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models16 Feb
  3. 2023Adding Conditional Control to Text-to-Image Diffusion Models10 Feb
  4. 2022Shape-Guided Diffusion with Inside-Outside Attention1 Dec
  5. 2022InstructPix2Pix: Learning to Follow Image Editing Instructions17 Nov
  6. 2022Null-text Inversion for Editing Real Images using Guided Diffusion Models17 Nov
  7. 2022DiffEdit: Diffusion-based semantic image editing with mask guidance20 Oct
  8. 2022Imagic: Text-Based Real Image Editing with Diffusion Models17 Oct
  9. 2022DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generation25 Aug
  10. 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding23 May
  11. 2022Hierarchical Text-Conditional Image Generation with CLIP Latents13 Apr

Other references · 23

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  4. 2020Denoising Diffusion Probabilistic Modelscited by 20,851
  5. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
  6. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  7. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  8. 2020Denoising Diffusion Implicit Modelscited by 9,655
  9. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
  10. 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,005
  11. 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,131
  12. 2022Prompt-to-Prompt Image Editing with Cross Attention Controlcited by 2,409
11 more
  1. 2022An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversioncited by 2,231
  2. 2021SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equationscited by 1,903
  3. 2021LAION-400M: Open Dataset of CLIP-Filtered 400 Million Image-Text Pairscited by 1,544
  4. 2022Diffusion Models: A Comprehensive Survey of Methods and Applicationscited by 1,107
  5. 2022Diffusion Models in Vision: A Surveycited by 1,008
  6. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
  7. 2022Plug-and-Play Diffusion Features for Text-Driven Image-to-Image Translationcited by 897
  8. 2023MasaCtrl: Tuning-Free Mutual Self-Attention Control for Consistent Image Synthesis and Editingcited by 722
  9. 2023Zero-shot Image-to-Image Translationcited by 503
  10. 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 382
  11. 2022FlexIT: Towards Flexible Semantic Image Translationcited by 28

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 25; 2025: 72; 2026: 37.

134 papers.

Sort:

By area:

  1. 2024Attentive Eraser: Unleashing Diffusion Model's Object Removal Potential via Self-Attention Redirection Guidancecited by 63
  2. 2024CustomCrafter: Customized Video Generation with Preserving Motion and Concept Composition Abilitiescited by 58
  3. 2025ConceptAttention: Diffusion Transformers Learn Highly Interpretable Featurescited by 48
  4. 2024EditSplat: Multi-View Fusion and Attention-Guided Optimization for View-Consistent 3D Scene Editing with 3D Gaussian Splattingcited by 40
  5. 2024InstantSwap: Fast Customized Concept Swapping across Sharp Shape Differencescited by 34
  6. 2024Conditional Image Synthesis with Diffusion Models: A Surveycited by 29
  7. 2025IMAGHarmony: Controllable Image Editing with Consistent Object Quantity and Layoutcited by 28
  8. 2024StyleStudio: Text-Driven Style Transfer with Selective Control of Style Elementscited by 26
  9. 2024A Cat Is A Cat (Not A Dog!): Unraveling Information Mix-ups in Text-to-Image Encoders through Causal Analysis and Embedding Optimizationcited by 19
  10. 2025SuperEdit: Rectifying and Facilitating Supervision for Instruction-Based Image Editingcited by 18
  11. 2025Multi-turn Consistent Image Editingcited by 17
  12. 2025Exploring Multimodal Diffusion Transformers for Enhanced Prompt-based Image Editingcited by 16
38 more
  1. 2025Analysis of Attention in Video Diffusion Transformerscited by 15
  2. 2025Training-free Geometric Image Editing on Diffusion Modelscited by 13
  3. 2024Text Guided Image Editing with Automatic Concept Locating and Forgettingcited by 12
  4. 2025Detect-and-Guide: Self-regulation of Diffusion Models for Safe Text-to-Image Generation via Guideline Token Optimizationcited by 12
  5. 2026Robotic Video World Models: A Survey of Applications, Research Challenges, Future Directionscited by 12
  6. 2024PrimeDepth: Efficient Monocular Depth Estimation with a Stable Diffusion Preimagecited by 11
  7. 2025AdvPaint: Protecting Images from Inpainting Manipulation via Adversarial Attention Disruptioncited by 11
  8. 2025Attention (as Discrete-Time Markov) Chainscited by 11
  9. 2024Growth Inhibitors for Suppressing Inappropriate Image Concepts in Diffusion Modelscited by 10
  10. 2025YOLO-Count: Differentiable Object Counting for Text-to-Image Generationcited by 10
  11. 2024Noise Diffusion for Enhancing Semantic Faithfulness in Text-to-Image Synthesiscited by 9
  12. 2025Charts Are Not Images: On the Challenges of Scientific Chart Editingcited by 9
  13. 2025EditID: Training-Free Editable ID Customization for Text-to-Image Generationcited by 8
  14. 2025MedEBench: Diagnosing Reliability in Text-Guided Medical Image Editingcited by 8
  15. 2024Addressing Text Embedding Leakage in Diffusion-based Image Editingcited by 7
  16. 2025PLADIS: Pushing the Limits of Attention in Diffusion Models at Inference Time by Leveraging Sparsitycited by 7
  17. 2025Enhancing Facial Privacy Protection via Weakening Diffusion Purificationcited by 7
  18. 2025VerbDiff: Text-Only Diffusion Models with Enhanced Interaction Awarenesscited by 7
  19. 2025Understanding Attention Mechanism in Video Diffusion Modelscited by 7
  20. 2024Understanding Implosion in Text-to-Image Generative Modelscited by 6
  21. 2025Training-Free Style and Content Transfer by Leveraging U-Net Skip Connections in Stable Diffusioncited by 6
  22. 2025TF-TI2I: Training-Free Text-and-Image-to-Image Generation via Multi-Modal Implicit-Context Learning in Text-to-Image Modelscited by 6
  23. 2025Localizing Knowledge in Diffusion Transformerscited by 6
  24. 2025Describe, Don't Dictate: Semantic Image Editing with Natural Language Intentcited by 6
  25. 2025ConsistEdit: Highly Consistent and Precise Training-free Visual Editingcited by 6
  26. 2025EditInfinity: Image Editing with Binary-Quantized Generative Modelscited by 6
  27. 2025DETACH: Cross-domain Learning for Long-Horizon Tasks via Mixture of Disentangled Expertscited by 5
  28. 2026SLICE: Semantic Latent Injection via Compartmentalized Embedding for Image Watermarkingcited by 5
  29. 2024Concept Conductor: Orchestrating Multiple Personalized Concepts in Text-to-Image Synthesiscited by 4
  30. 2024ColorEdit: Training-free Image-Guided Color editing with diffusion modelcited by 4
  31. 2025EditCLIP: Representation Learning for Image Editingcited by 4
  32. 2025From Visual Explanations to Counterfactual Explanations with Latent Diffusioncited by 4
  33. 2025Does Feasibility Matter? Understanding the Impact of Feasibility on Synthetic Training Datacited by 4
  34. 2025Detail++: Training-Free Detail Enhancer for T2I Diffusion Modelscited by 4
  35. 2025DrivingGaussian++: Towards Realistic Reconstruction and Editable Simulation for Surrounding Dynamic Driving Scenescited by 4
  36. 2024Latent Space Disentanglement in Diffusion Transformers Enables Precise Zero-shot Semantic Editingcited by 3
  37. 2025Towards Consistent and Controllable Image Synthesis for Face Editingcited by 3
  38. 2025Zero-Shot Subject-Centric Generation for Creative Application Using Entropy Fusioncited by 3

50 most cited of 134 All 134 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2024Enhancing Semantic Fidelity in Text-to-Image Synthesis: Attention Regulation in Diffusion Models
  2. 2025Self-Attention Decomposition For Training Free Diffusion Editing
  3. 2024Uniform Attention Maps: Boosting Image Fidelity in Reconstruction and Editing
  4. 2024Self-Cross Diffusion Guidance for Text-to-Image Synthesis of Similar Subjects
  5. 2023Harnessing the Spatial-Temporal Attention of Diffusion Models for High-Fidelity Text-to-Image Synthesis
  6. 2024Training-Free Layout-to-Image Generation with Marginal Attention Constraints
  7. 2026Dual-Channel Attention Guidance for Training-Free Image Editing Control in Diffusion Transformers
  8. 2026LooseRoPE: Content-aware Attention Manipulation for Semantic Harmonization