Skip to main content
QUICK REVIEW

[Paper Review] Imagic: Text-Based Real Image Editing with Diffusion Models

Bahjat Kawar, Shiran Zada|arXiv (Cornell University)|Oct 17, 2022
Generative Adversarial Networks and Image SynthesisComputer Science34 citations
TL;DR

Imagic enables complex, non-rigid text-based edits on a single real image using a pre-trained diffusion model, by optimizing a text embedding, fine-tuning the model, and interpolating embeddings to balance fidelity and target-text alignment.

ABSTRACT

Text-conditioned image editing has recently attracted considerable interest. However, most methods are currently either limited to specific editing types (e.g., object overlay, style transfer), or apply to synthetically generated images, or require multiple input images of a common object. In this paper we demonstrate, for the very first time, the ability to apply complex (e.g., non-rigid) text-guided semantic edits to a single real image. For example, we can change the posture and composition of one or multiple objects inside an image, while preserving its original characteristics. Our method can make a standing dog sit down or jump, cause a bird to spread its wings, etc. -- each within its single high-resolution natural image provided by the user. Contrary to previous work, our proposed method requires only a single input image and a target text (the desired edit). It operates on real images, and does not require any additional inputs (such as image masks or additional views of the object). Our method, which we call "Imagic", leverages a pre-trained text-to-image diffusion model for this task. It produces a text embedding that aligns with both the input image and the target text, while fine-tuning the diffusion model to capture the image-specific appearance. We demonstrate the quality and versatility of our method on numerous inputs from various domains, showcasing a plethora of high quality complex semantic image edits, all within a single unified framework.

Motivation & Objective

  • Enable text-based semantic edits on a single real high-resolution image without auxiliary inputs.
  • Achieve complex non-rigid edits (pose, composition) aligned to a target text while preserving image fidelity.
  • Demonstrate a semantically meaningful embedding interpolation between the input-image representation and the target edit.
  • Introduce a challenging benchmark (TEdBench) for evaluating textual editing methods.

Proposed method

  • Use a pre-trained text-to-image diffusion model to edit real images conditioned on a text prompt.
  • Optimize the target text embedding to reconstruct the input image using a denoising objective.
  • Fine-tune the diffusion model (and auxiliary upscalers) to better match the input image at the optimized embedding.
  • Linearly interpolate between the optimized image-embedding and the target-text embedding to obtain an edit embedding.
  • Run the diffusion process conditioned on the interpolated embedding to produce the edited image; optionally apply super-resolution.

Experimental results

Research questions

  • RQ1Can complex non-rigid edits be applied to a single real image using only a text prompt and one input image?
  • RQ2Does optimizing a text embedding and fine-tuning the diffusion model enable high fidelity to the original image while achieving target-text alignment?
  • RQ3Is a linear interpolation between an image-representing embedding and a target-edit embedding semantically meaningful for editing?
  • RQ4How does Imagic perform relative to existing single-image editing methods on a challenging benchmark?
  • RQ5What is the effect of different editing intensities (eta) on fidelity and text alignment?

Key findings

  • Imagic achieves high fidelity to the input image while aligning with the target text for complex edits.
  • The method enables edits such as posture and composition changes on real images within a single framework.
  • TEdBench shows human raters prefer Imagic over SDEdit, DDIB, and Text2LIVE for editing quality ( >70% preference).
  • A three-stage process (embedding optimization, model fine-tuning, and embedding interpolation) is essential for quality edits.
  • Fine-tuning the diffusion model is crucial for reconstructing the input image and enabling meaningful interpolation.
  • The approach is demonstrated with Imagen and Stable Diffusion across diverse domains.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.