Tuning-Free Inversion-Enhanced Control for Consistent Image Editing

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

Introduction

Editing real-world images using diffusion models typically involves a two-stage process: Inversion (mapping an image to noise) and Sampling (reconstructing or editing the image from that noise). However, standard techniques like DDIM inversion suffer from significant reconstruction errors, leading to blurry results or loss of subject identity. While optimization-based methods can mitigate these issues, they are computationally expensive. Tuning-free Inversion-Enhanced Control (TIC) addresses this by injecting features directly from the inversion process into the sampling process, enabling high-fidelity, consistent editing without model fine-tuning.

Methodology: Inversion-Enhanced Self-Attention

The core of TIC is the observation that reconstruction errors arise from the "timestep approximation assumption" in DDIM. To solve this, TIC utilizes Inversion-Enhanced Self-Attention. During the inversion of the source image, the model saves the Key (K) and Value (V) features from the U-Net’s self-attention layers. These features serve as a high-fidelity "blueprint" of the original image's texture and identity.

When generating the edited image, these saved features are injected into the sampling path. The Query (Q) feature, guided by the new text prompt, handles structural changes (like posture), while the injected K and V features ensure the subject's identity and background remain consistent. For more significant edits, a mask-guided strategy allows the model to generate new content where necessary while anchoring the rest of the scene to the original.

Comparison of TIC against DDIM reconstruction and MasaCtrl editing. TIC achieves near-perfect reconstruction and maintains identity during non-rigid edits.

Performance and Results

TIC demonstrates superior performance in both reconstruction quality and editing consistency:

  • Reconstruction Fidelity: TIC achieves a PSNR of 27.11, significantly outperforming standard DDIM (22.95) and approaching the theoretical VAE upper bound (27.17).
  • Efficiency: By eliminating the need for optimization iterations, TIC processes images in approximately 5.56 seconds, whereas tuning-based methods like Null-Text Inversion (NTI) can take up to 150 seconds.
  • Qualitative Consistency: As shown in the comparison figure, TIC successfully performs non-rigid edits—such as changing a cat's posture—without the "ghosting" artifacts or background shifts common in other tuning-free methods like MasaCtrl.

Conclusion

TIC provides a robust, efficient framework for consistent image editing. By leveraging internal features from the inversion process, it bridges the gap between slow, high-fidelity optimization methods and fast but artifact-prone tuning-free approaches. Future work may extend this consistency-preserving mechanism to video editing and multi-modal generation tasks.

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