PRedItOR: Text Guided Image Editing with Diffusion Prior

Hareesh Ravi, Sachin Kelkar, Midhun Harikumar, Ajinkya KalearXiv 2023

TL;DR

PRedItOR introduces a zero-shot, two-step method for text-guided image editing using a DALL-E 2-style hybrid diffusion architecture. By performing "conceptual edits" directly within the CLIP image embedding space and "structural edits" in a latent decoder, it eliminates the need for input base prompts, weight fine-tuning, or test-time optimization.

What Problem Does This Paper Address?

Most state-of-the-art text-guided image editing methods are built on text-conditioned diffusion models like Stable Diffusion. To edit a real image, these models typically require a base text prompt that perfectly describes the original image so they can invert it into noise accurately.

Because real-world images rarely come with perfect captions, researchers usually resort to expensive optimization techniques (like Null-text inversion) or model fine-tuning (like Imagic) to find a workable text embedding. PRedItOR tackles this bottleneck, aiming for an editing pipeline that preserves the original image's structure without requiring any base prompts, optimization loops, or fine-tuning.

Methods

PRedItOR shifts the editing paradigm by utilizing a Hybrid Diffusion Model (HDM) architecture consisting of a Diffusion Prior and a Latent Diffusion Decoder. The editing process is split into two distinct, controllable steps:

  1. Conceptual Editing (The Prior): Instead of starting from random noise, the authors inject the CLIP image embedding ($z_b$) of the base image into a pre-trained Diffusion Prior at an intermediate timestep ($t_c = T \times c$). The prior then runs its remaining denoising steps conditioned on the edit text prompt, effectively performing an automated latent walk. This yields an edited CLIP embedding ($z_e$) that blends the concepts of both the original image and the new text.
  2. Structural Editing (The Decoder): To ensure the spatial structure is preserved, the original image is inverted into the Latent Diffusion Model (LDM) decoder space using reverse DDIM up to a timestep ($t_s = T \times s$). The decoder then denoises this structural noise map, but switches its conditioning from the original embedding ($z_b$) to the newly edited conceptual embedding ($z_e$).

The user can intuitively balance these steps using two hyperparameters: $c$ (conceptual edit strength) and $s$ (structural preservation strength). Optional mask guidance can also be integrated to restrict edits to localized regions.

The PRedItOR inference pipeline showing the separation of conceptual and structural editing.

Datasets

  • Training: The authors utilized a publicly available Diffusion Prior trained by LAION. For the decoder, they trained a custom LDM conditioned on normalized CLIP L/14 image embeddings using an internal dataset of 77 million images (filtered to exclude humans and text).
  • Evaluation: Quantitative and qualitative evaluations were performed on a dataset of 20 base images sourced from Unsplash across four common classes (dog, cake, horse, flowers). Five manual edit prompts were generated per image, resulting in a benchmark of 100 edited images.

Key Insights and Ideas

  • CLIP Space as a "Conceptual Noise" Space: The authors realized that injecting a valid image embedding into the prior at an intermediate step treats the base image as "noise" relative to the target text prompt. The prior's denoising process naturally refines this mixture into a realistic, blended concept.
  • Inversion Stability Natively: Because the LDM decoder is conditioned on rich CLIP image embeddings rather than sparse text tokens, the inversion process via reverse DDIM is inherently more stable and accurate. This bypasses the need for complex prompt-tuning optimizations required by text-only models.
  • The Prior's Style Bias: Without the conceptual refinement step, passing a simple object prompt (like "Rottweiler") to a standard prior often yields embeddings biased toward oil paintings or stylized art. Initializing the prior with the base image embedding anchors the generation in the correct photographic domain.

Key Results

PRedItOR achieves qualitative results that are on par with or superior to optimization-heavy baselines like Imagic, Prompt-to-Prompt (P2P), and Plug-and-Play (P&P).

Qualitative comparison of PRedItOR against other baseline editing methods.

Quantitatively, the paper highlights a common pitfall in image-editing metrics: baselines often score exceptionally well on structural fidelity (LPIPS) simply because they fail to apply the text edit significantly (remaining too conservative). PRedItOR provides a much smoother, user-controlled trade-off curve. When visually inspected, it successfully alters objects (e.g., turning a dog into a "terminator robot" or a "plush toy") while cleanly maintaining background context.

Limitations and Future Work

  • No Human Faces: Because the custom LDM decoder was trained on data filtered to exclude people, PRedItOR cannot currently generate or edit human faces.
  • Color-Changing Artifacts: The structural edit step relies on reverse DDIM, a technique known to struggle with dramatic color transformations (e.g., turning a blue jay into a red cardinal). Achieving these edits requires lowering structural constraints, which can inadvertently introduce background artifacts.
  • Future Directions: The authors suggest exploring more advanced inversion techniques to fix the color-mapping limitations and diving deeper into how diffusion operates within multimodal embedding spaces like CLIP.

Summary updated

BibTeX
@misc{ravi2023preditor,
  author = {Hareesh Ravi and Sachin Kelkar and Midhun Harikumar and Ajinkya Kale},
  title = {{PRedItOR: Text Guided Image Editing with Diffusion Prior}},
  year = {2023},
  eprint = {2302.07979},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.07979},
}
Figure