Tuning-Free Inversion-Enhanced Control for Consistent Image Editing

Xiaoyue Duan, Shuhao Cui, Guoliang Kang, Baochang Zhang, Zhengcong Fei, Mingyuan Fan, Junshi Huang · DOI

Abstract

Consistent, non-rigid image editing—modifying an object's posture or expression without altering its identity or the background—is a significant challenge for generative diffusion models. We introduce Tuning-Free Inversion-Enhanced Control (TIC), a method that achieves high-fidelity edits by injecting self-attention features from the DDIM inversion process directly into the sampling process. TIC achieves reconstruction quality nearly identical to the theoretical VAE upper bound and performs complex edits in seconds, outperforming both fine-tuning-based and existing tuning-free methods.

Introduction

While Diffusion Models are powerful tools for image generation, they are notoriously difficult to control for precise editing of real-world images. The standard approach involves Inversion (transforming an image into noise) followed by Sampling (generating a new image from that noise with a modified prompt). However, this process is plagued by reconstruction drift. In practice, the Denoising Diffusion Implicit Model (DDIM) reconstruction is lossy, leading to artifacts, shifted backgrounds, or altered identities during the editing process.

Existing solutions generally fall into two categories: fine-tuning methods (e.g., NTI, PTI), which are accurate but computationally expensive (taking minutes per image), and tuning-free methods (e.g., MasaCtrl), which often produce inconsistent results because they rely on flawed naive DDIM reconstructions.

Methodology

TIC addresses the root cause of reconstruction drift by establishing a direct correlation between the inversion and sampling processes through two primary mechanisms.

Inversion-Enhanced Self-Attention

During the inversion phase, the model saves the Key ($K^*$) and Value ($V^*$) features from the self-attention layers at every timestep. During sampling, instead of generating new features, TIC replaces the sampling features with these saved inversion features. Because self-attention layers capture layout and texture, forcing the model to "query" the original features ensures that the identity and background remain perfectly intact.

Mask-Guided Attention Concatenation

To allow for the addition of new content or significant structural changes, TIC utilizes a concatenation strategy. Using cross-attention maps to create a binary mask of the edit area, the model preserves original features in the "keep" regions while concatenating inversion features with new sampling features ($[K; K^*]$) in the "edit" regions. This allows the model to blend the original texture with the requirements of the new prompt.

Experimental Results

TIC demonstrates superior performance in both reconstruction fidelity and editing consistency.

Qualitative comparison showing TIC's superior reconstruction and editing consistency compared to DDIM and MasaCtrl.

Quantitative Benchmarks

Evaluated on the MS-COCO 2017 validation set, TIC achieved a PSNR of 27.11, nearly identical to the VAE's theoretical maximum of 27.17. For comparison, naive DDIM reconstruction only reached 22.95.

Efficiency and Qualitative Fidelity

TIC is highly efficient, processing an image in roughly 5.56 seconds—the same as a standard DDIM pass. In contrast, tuning-based methods like Null-Text Inversion (NTI) require upwards of 149 seconds. Qualitatively, TIC successfully performs non-rigid edits, such as changing a cat's posture, while maintaining significantly higher stability in background and fine details than competing tuning-free methods like MasaCtrl.

Conclusion

TIC provides a new standard for consistent image editing by solving the fundamental problem of reconstruction drift. By anchoring the generation process with inversion-enhanced features, it enables high-fidelity, non-rigid edits without the need for costly model optimization. Future work may extend this framework to video editing, where temporal consistency remains a critical challenge.

Summary updated

BibTeX
@inproceedings{duan2024tuning,
  author = {Xiaoyue Duan and Shuhao Cui and Guoliang Kang and Baochang Zhang and Zhengcong Fei and Mingyuan Fan and Junshi Huang},
  title = {{Tuning-Free Inversion-Enhanced Control for Consistent Image Editing}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i2.27931},
}
Figure