Abstract
Text-driven diffusion models have significantly advanced image editing performance by using text prompts as inputs. One crucial step in text-driven image editing is to invert the original image into a latent noise code conditioned on the source prompt. While previous methods have achieved promising results by refactoring the image synthesizing process, the inverted latent noise code is tightly coupled with the source prompt, limiting the image editability by target text prompts. To address this issue, we propose a novel method called Source Prompt Disentangled Inversion (SPDInv), which aims at reducing the impact of source prompt, thereby enhancing the text-driven image editing performance by employing diffusion models. To make the inverted noise code be independent of the given source prompt as much as possible, we indicate that the iterative inversion process should satisfy a fixed-point constraint. Consequently, we transform the inversion problem into a searching problem to find the fixed-point solution, and utilize the pre-trained diffusion models to facilitate the searching process. The experimental results show that our proposed SPDInv method can effectively mitigate the conflicts between the target editing prompt and the source prompt, leading to a significant decrease in editing artifacts. In addition to text-driven image editing, with SPDInv we can easily adapt customized image generation models to localized editing tasks and produce promising performance.
The Challenge of Inversion Coupling
To edit a real-world image using a diffusion model, one must first perform "inversion"—finding the specific starting noise code that, when processed with a "source prompt" (e.g., "a photo of a cat"), reconstructs the original image. Standard techniques like DDIM inversion often "bake" the source prompt into the noise code. This tight coupling creates a "noise gap," where the latent code becomes stubborn when a user attempts to change the description to a "target prompt" (e.g., "a photo of a dog"). This results in editing artifacts, lost details, or the model simply ignoring new instructions.
Methodology: Fixed-Point Optimization
SPDInv introduces a core insight: the ideal inversion process should satisfy a fixed-point constraint. While previous methods focused on closing the reconstruction gap (making the output look like the input), SPDInv prioritizes closing the noise gap to ensure the noise is independent of the prompt.
As shown in the technical comparison above, SPDInv transforms the inversion problem into a search for a fixed-point solution. By applying iterative gradient descent at each step of the inversion process, the algorithm nudges the latent code closer to a state that is disentangled from the source prompt. This plug-and-play approach can be integrated into existing frameworks like Prompt-to-Prompt (P2P), MasaCtrl, or Plug-and-Play (PNP) with minimal code changes.
Key Results and Insights
The practical benefit of this disentanglement is most evident in complex edits, such as changing a character's pose. In standard inversion, the original pose is often so deeply embedded in the noise that changing it results in "ghosting" or structural failures.
Performance Benchmarks
Evaluated on benchmarks like PIE-Bench and the new TDE-Bench, SPDInv consistently outperformed state-of-the-art methods:
- Structural Consistency: Improved the DINO score by 24% over the second-best method when using the P2P engine.
- Background Preservation: Achieved a 5% increase in PSNR and a 21% decrease in LPIPS error, indicating superior preservation of non-edited regions.
- Customization Synergy: The method can also adapt customized models (like ELITE) for localized editing tasks, maintaining background fidelity where those models typically struggle.
Limitations and Future Work
While SPDInv significantly narrows the noise gap, it is not a total cure-all. Its performance is still partially dependent on the underlying editing engine (e.g., P2P's inherent ability to add or delete objects). Furthermore, high-difficulty tasks like human portrait editing remain a challenge. Future work will likely focus on even more robust disentanglement strategies to completely eliminate residual coupling between noise and source prompts.
Summary updated