Object-aware Inversion and Reassembly for Image Editing

Zhen Yang, Dinggang Gui, Wen Wang, Hao Chen, Bohan Zhuang, Chunhua Shen · DOI

Introduction

Text-driven image editing using diffusion models, such as Stable Diffusion, has revolutionized creative workflows. These models typically operate through a two-stage process: inversion and denoising. Inversion transforms an existing image into a latent representation by adding noise, while denoising reconstructs the image guided by a new text prompt. However, a significant bottleneck remains: the "one-size-fits-all" approach to inversion steps often leads to a failure in complex scenes containing multiple objects with varying editing requirements.

The Inversion Step Dilemma

The success of an edit is highly sensitive to the number of inversion steps. Insufficient noise (low inversion steps) leaves the model too constrained by the original image, resulting in poor editability. Conversely, excessive noise (high inversion steps) causes the model to lose the original structure, leading to "concept mismatch" where unintended regions are altered.

The OIR framework identifies that different objects require different inversion steps to achieve optimal results, avoiding concept mismatch and poor editing.

As illustrated in the figure above, the authors discovered that editability is a local property rather than a global one. For instance, changing a "branch" to a "gold branch" requires fewer inversion steps than transforming a "parrot" into a "crochet parrot." Using a single global inversion level for both objects inevitably compromises the quality of one or both edits.

Object-aware Inversion and Reassembly (OIR)

To address these limitations, this paper introduces Object-aware Inversion and Reassembly (OIR). The method moves away from global inversion in favor of a granular, object-centric approach consisting of three core phases:

  1. Optimal Inversion Step Search: The system generates candidate images across a range of inversion levels. It employs a mathematical search metric that balances Editability ($S_e$)—measured via CLIP scores to ensure alignment with the new prompt—and Fidelity ($S_{ne}$)—measured via Mean Squared Error (MSE) to preserve non-edited regions.
  2. Disassembly: Each object and its corresponding target prompt are treated as an independent "editing pair." By finding the optimal noise level for each object in isolation, the model prevents "concept leakage," where attributes from one edited region bleed into another.
  3. Reassembly & Re-inversion: The independently edited objects are integrated back into the original background. To eliminate artifacts at the boundaries and ensure global lighting consistency, a final re-inversion step is applied. This involves adding a small amount of uniform noise to the entire assembled image and performing a final denoising pass to "glue" the components together.

Experimental Results and Benchmarking

The authors evaluated OIR using a new benchmark, OIRBench, which includes 208 single-object and 100 multi-object text-image pairs.

Quantitative Performance

On the multi-object dataset, OIR achieved a CLIP score of 30.28, significantly outperforming established baselines like Plug-and-Play (28.45) and Null-text Inversion (28.02). This indicates superior alignment with complex, multi-part editing instructions.

Qualitative and Human Evaluation

Qualitatively, OIR excels at maintaining the stability of non-edited regions, a common failure point for other models. In a blind user study with 58 participants, OIR-generated images were preferred 66.7% of the time over four leading competitive methods.

A final edit showing a crochet parrot, demonstrating the high structural fidelity and texture quality possible when using the optimal inversion step.

Conclusion and Future Work

OIR demonstrates that disentangling an image into its constituent objects and optimizing inversion levels locally is key to high-fidelity diffusion editing. While the search process increases computational overhead compared to one-shot methods, the gain in reliability and quality is substantial. Future research directions include optimizing the inference speed through parallelization and extending the object-aware logic to the temporal domain for video editing.

Summary updated

BibTeX
@inproceedings{yang2024object,
  author = {Zhen Yang and Dinggang Gui and Wen Wang and Hao Chen and Bohan Zhuang and Chunhua Shen},
  title = {{Object-aware Inversion and Reassembly for Image Editing}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=dpcVXiMlcv},
}
Figure