Towards Understanding Cross and Self-Attention in Stable Diffusion for Text-Guided Image Editing
Abstract
Deep Text-to-Image Synthesis (TIS) models such as Stable Diffusion have recently gained significant popularity for creative text-to-image generation. However, for domainspecific scenarios, tuning-free Text-guided Image Editing (TIE) is of greater importance for application developers. This approach modifies objects or object properties in images by manipulating feature components in attention layers during the generation process. Nevertheless, little is known about the semantic meanings that 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 crossattention maps in Stable Diffusion often contain object attribution information, which 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 mechanisms in diffusion models. Furthermore, based on our findings, we propose a simplified, yet more stable and efficient, tuning-free procedure that modifies only the self-attention maps of specified attention layers during the denoising process. Experimental results show that our simplified method consistently surpasses the performance of popular approaches on multiple datasets. 1
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
67 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Probabilistic Models
- High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Implicit Models
- CustomCrafter: Customized Video Generation with Preserving Motion and Concept Composition Abilities cites High-Resolution Image Synthesis with Latent Diffusion Models
- CustomCrafter: Customized Video Generation with Preserving Motion and Concept Composition Abilities cites Learning Transferable Visual Models From Natural Language Supervision
- CustomCrafter: Customized Video Generation with Preserving Motion and Concept Composition Abilities cites Denoising Diffusion Probabilistic Models
- CustomCrafter: Customized Video Generation with Preserving Motion and Concept Composition Abilities cites Denoising Diffusion Implicit Models
- A Cat Is A Cat (Not A Dog!): Unraveling Information Mix-ups in Text-to-Image Encoders through Causal Analysis and Embedding Optimization cites High-Resolution Image Synthesis with Latent Diffusion Models
- A Cat Is A Cat (Not A Dog!): Unraveling Information Mix-ups in Text-to-Image Encoders through Causal Analysis and Embedding Optimization cites Learning Transferable Visual Models From Natural Language Supervision
- A Cat Is A Cat (Not A Dog!): Unraveling Information Mix-ups in Text-to-Image Encoders through Causal Analysis and Embedding Optimization cites Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
- Attention (as Discrete-Time Markov) Chains cites High-Resolution Image Synthesis with Latent Diffusion Models
- Attention (as Discrete-Time Markov) Chains cites Learning Transferable Visual Models From Natural Language Supervision
- Charts Are Not Images: On the Challenges of Scientific Chart Editing cites High-Resolution Image Synthesis with Latent Diffusion Models
- Charts Are Not Images: On the Challenges of Scientific Chart Editing cites Learning Transferable Visual Models From Natural Language Supervision
- Attentive Eraser: Unleashing Diffusion Model's Object Removal Potential via Self-Attention Redirection Guidance cites High-Resolution Image Synthesis with Latent Diffusion Models
- Attentive Eraser: Unleashing Diffusion Model's Object Removal Potential via Self-Attention Redirection Guidance cites Learning Transferable Visual Models From Natural Language Supervision
- Attentive Eraser: Unleashing Diffusion Model's Object Removal Potential via Self-Attention Redirection Guidance cites Denoising Diffusion Probabilistic Models
- Attentive Eraser: Unleashing Diffusion Model's Object Removal Potential via Self-Attention Redirection Guidance cites Denoising Diffusion Implicit Models
- Denoising Diffusion Implicit Models cites Denoising Diffusion Probabilistic Models
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites High-Resolution Image Synthesis with Latent Diffusion Models
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Learning Transferable Visual Models From Natural Language Supervision
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Denoising Diffusion Probabilistic Models
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Denoising Diffusion Implicit Models
Cited by top-tier papers67
- CustomCrafter: Customized Video Generation with Preserving Motion and Concept Composition AbilitiesTao Wu, Yong Zhang, Xintao Wang, Xianpan Zhou et al.AAAI 2025 · 62 citations
- Attentive Eraser: Unleashing Diffusion Model's Object Removal Potential via Self-Attention Redirection GuidanceWenhao Sun, Xue-Mei Dong, Benlei Cui, Jingqun TangAAAI 2025 · 50 citations
- A Cat Is A Cat (Not A Dog!): Unraveling Information Mix-ups in Text-to-Image Encoders through Causal Analysis and Embedding OptimizationChieh-Yun Chen, Chiang Tseng, Li-Wu Tsao, Hong-Han ShuaiNeurIPS 2024 · 22 citations
- Attention (as Discrete-Time Markov) ChainsYotam Erel, Olaf Dünkel, Rishabh Dabral, Vladislav Golyanik et al.NeurIPS 2025 · 12 citations
- Charts Are Not Images: On the Challenges of Scientific Chart EditingShawn Li, Ryan Rossi, Sungchul Kim, Sunav Choudhary et al.ICLR 2026 · 11 citations
Builds on20
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
- Photorealistic Text-to-Image Diffusion Models with Deep Language UnderstandingChitwan Saharia, William Chan, Saurabh Saxena, Lala Li et al.NeurIPS 2022 · 8,965 citations
Related papers
- Training-Free Structured Diffusion Guidance for Compositional Text-to-Image SynthesisWeixi Feng, Xuehai He, Tsu-Jui Fu, Varun Jampani et al.ICLR 2023 · 70 citations
- SSAIM: Not All Self-Attentions Contain Effective Spatial Structure in Diffusion Models for Text-to-Image EditingZhenbo Yu, Jimin Dai, Yingzhen Zhang, Jian Yang et al.ACM MM 2025 · 3 citations
- Dynamic Prompt Learning: Addressing Cross-Attention Leakage for Text-Based Image EditingKai Wang, Fei Yang, Shiqi Yang, Muhammad Atif Butt et al.NeurIPS 2023 · 108 citations
- Towards Efficient Diffusion-Based Image Editing with Instant Attention MasksSiyu Zou, Jiji Tang, Yiyi Zhou, Jing He et al.AAAI 2024 · 24 citations
- Attentive Linguistic Tracking in Diffusion Models for Training-free Text-guided Image EditingBingyan Liu, Chengyu Wang, Jun Huang, Kui JiaACM MM 2024 · 2 citations
