TL;DR
This paper introduces a training-free framework to solve the "over-editing" problem in instruction-based image editing by explicitly localizing where changes should occur. By leveraging the internal latent features and dual-stream architecture of modern Diffusion Transformers (DiTs), the authors create task-aware masks that significantly improve content consistency in non-target regions without requiring additional training or supervision.
What Problem Does This Paper Address?
Instruction-based image editing (IIE) allows users to modify images using natural language (e.g., "add a lamp on the table"). While recent models built on Diffusion Transformers (DiTs) produce high-quality results, they frequently suffer from over-editing.
Because these models lack an explicit mechanism to restrict changes, they often inadvertently alter parts of the image that should remain untouched—such as changing a person's facial features when adding an object nearby, or shifting the entire viewpoint of a scene. As shown in Figure 1, standard models might successfully follow an instruction but fail to preserve the "identity" of the rest of the image.
Methods
The authors propose a Task-Aware Edit Localization framework that operates in three main stages, all without retraining the underlying model:
- Attention-Based Semantic Estimation: The framework first extracts coarse localization cues from the model's internal joint attention matrices. It uses a "random-walk" interpretation to propagate these signals, helping to identify regions relevant to the text instruction.
- Feature-Based Semantic Assignment: Recognizing that raw attention maps are often noisy, the authors use the coarse cues to identify "edit" and "non-edit" feature centroids in the latent space. They then refine the mask by calculating the cosine similarity of every image token to these centroids.
- Task-Aware Mask Construction: A key insight is that different tasks require different localization strategies. For subject addition, the signal is strongest in the target image stream. For subject removal, it's in the source stream. For replacement, the framework combines signals from both.
Finally, a Mask-Guided Latent Preservation step blends the generated latents with source-aligned latents in the identified "non-edit" regions to ensure they remain unchanged.
Datasets
The researchers evaluated their method using two primary benchmarks:
- EdiVal-Bench: A recently introduced object-centric benchmark containing 572 real-world images with instructions categorized into nine types (addition, removal, replacement, color change, etc.).
- PIE-Bench: A standard benchmark for image editing consisting of 700 images, where the authors focused on a subset of 554 images requiring localized edits.
Key Insights and Ideas
- Latent Features > Attention Maps: One of the most important findings is that the deep latent features within a DiT provide much more robust and precise localization signals than the raw attention maps typically used in prior work. As seen in Figure 4, feature-derived masks have cleaner boundaries and better coverage.
- Localization is Task-Dependent: You can't use the same strategy for every edit. The "emergence" of a new object (addition) happens in the target stream, while the "disappearance" of an old one (removal) is best tracked in the source stream.
- Deeper is Better: Ablation studies (Figure 6) show that edit semantics are progressively formed and become most discriminative in the deeper layers of the transformer (peaking around layer 50 for Qwen-Image-Edit).
Key Results
The framework was tested on top of powerful backbones like Step1X-Edit and Qwen-Image-Edit.
- Consistency Gains: On EdiVal-Bench, the method improved background consistency by +3.18 and object consistency by +5.27 for the Qwen model.
- Instruction Following: Crucially, these consistency gains did not come at the cost of following the user's instructions. In some cases, instruction following (EdiVal-IF) actually improved because the model could focus its generative power on a smaller, localized region.
- Qualitative Superiority: As shown in Figure 5, the proposed method produces much "cleaner" difference maps, indicating that changes are strictly confined to the intended areas compared to baselines like GRAG.
Limitations and Future Work
The authors identify two main failure modes:
- Global Layout Shifts: If the base model insists on a massive global change (like a total viewpoint shift), the mask-guided preservation can lead to "stitching" artifacts where the new content doesn't blend naturally with the frozen background.
- Disjoint Regions: The current post-processing step focuses on the largest connected component, which can fail when an edit involves multiple separate areas (e.g., adding text in two different corners of an image).
Future work aims to develop more robust mask estimation techniques that can handle complex, multi-region scenarios and better blending for extreme layout changes.
Summary updated