Abstract
Recent advancements in diffusion-based image editing have seen a divergence between methods specialized for rigid transformations (e.g., color and texture) and those designed for non-rigid transformations (e.g., shape and pose). This paper introduces a unified, training-free framework that bridges this gap. By employing a novel dual-path injection scheme and a unified self-attention mechanism, the proposed system enables high-fidelity editing guided by either text prompts or reference images, outperforming existing state-of-the-art methods in versatility and accuracy.
Introduction
Diffusion-based image editing has long been characterized by a "specialization gap." Existing tools typically excel at one type of transformation while struggling with another. For instance, methods like Plug-and-Play (PnP) are effective for rigid edits, such as changing an object's color, but often introduce artifacts when attempting to alter geometry. Conversely, methods like MasaCtrl are adept at non-rigid tasks, such as changing a teapot's shape, but fail to preserve identity during simple color shifts.
Furthermore, the reliance on text prompts can be limiting, as text is often too ambiguous to describe complex structural or stylistic transfers. Integrating a reference image as a control modality remains a significant challenge for current attention-control mechanisms. This work addresses these limitations by providing a versatile framework that decouples appearance and structure to achieve unified editing.
Methodology
The framework achieves unified editing through three core technical innovations, leveraging pre-trained models like Stable Diffusion v1.5 without requiring additional fine-tuning.
Dual-path Injection Scheme
Unlike single-path methods that attempt to process all information simultaneously, this framework utilizes two independent denoising paths: one for appearance ($Z^{app}$) and one for structure ($Z^{struct}$). These paths inject their respective features into a third, target output path ($Z^{out}$), allowing for a clean separation of concerns.
Unified Self-Attention Mechanism
At the heart of the system is the Unified Self-Attention mechanism. It calculates structural attention maps from the source and a similarity matrix from the appearance reference. To ensure precise mapping—such as applying tiger stripes to a bear's body—the mechanism employs contrast and rearrange operations. These operations sharpen semantic correspondences, preventing the blurring or misalignment common in standard attention-swapping techniques.
Latent Fusion Techniques
To maintain background consistency and prevent color bleeding, the authors incorporate AdaIN (Adaptive Instance Normalization) to align feature distributions and Blended Diffusion to ensure the background remains faithful to the original source image.
Evaluation and Results
The framework was evaluated using PIE-Bench for text-based editing and a curated Appearance Transfer dataset covering five domains: animal faces, animals, bedrooms, cars, and churches.
Key Findings
- Versatility: The model successfully performs both rigid (e.g., turning a sitting dog into pixel art) and non-rigid (e.g., making a dog jump) transformations with high proficiency.
- Quantitative Performance: In appearance transfer tasks, the method outperformed DiffuseIT, achieving a lower Structure Distance (7.96 vs. 8.55) and a significantly lower Appearance Distance (3.01 vs. 4.54).
- Text Alignment: On the PIE-Bench, the method showed competitive results against Prompt-to-Prompt and PnP, particularly in scenarios requiring simultaneous structural and stylistic shifts.
Conclusion and Future Work
This unified framework demonstrates that appearance and structure are best handled as distinct signals within the diffusion process. By using self-attention as a bridge for semantic correspondence and refining those signals through contrast operations, the model achieves high-fidelity results across diverse editing tasks.
While highly versatile, the method's reliance on automatically generated cross-attention masks means that quality can suffer if the base model has a poor semantic understanding of a specific object. Future work may involve integrating external segmentation models to further refine the latent fusion process and improve background preservation in complex scenes.
Summary updated