NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DiffEditor: Boosting Accuracy and Flexibility on Diffusion-based Image Editing

Chong Mou, Xintao Wang, Jiechong Song, Ying Shan, Jian Zhang

Abstract

Diffusion-based image editing has seen significant progress, yet achieving precise, fine-grained control remains a challenge. Existing methods often suffer from a "rigidity" problem, where deterministic sampling limits the model's ability to generate new content, or "editing leakage," where local edits inadvertently alter global image features. We present DiffEditor, a framework that leverages image prompts and a hybrid Regional SDE/ODE sampling strategy to enhance both accuracy and flexibility in tasks such as object dragging, resizing, and moving.

Introduction

Large-scale Text-to-Image (T2I) diffusion models excel at generation but struggle with precise editing. Recent "drag-style" tools allow point-based manipulation but face two primary hurdles. First, reliance on deterministic ODE sampling to maintain consistency often results in a lack of flexibility, preventing the model from "imagining" necessary new content (e.g., teeth when opening a mouth). Second, gradient-based guidance frequently causes "editing leakage," where artifacts appear in unedited regions.

Overview of DiffEditor's editing capabilities, including object moving, resizing, dragging, and pasting.

Methodology

DiffEditor introduces several technical innovations to bridge the gap between consistency and generative flexibility:

  • Image Prompt Encoder: Utilizing a CLIP-based encoder and a QFormer, DiffEditor incorporates visual references alongside text prompts. This provides a "visual anchor," ensuring texture and identity consistency that text alone cannot capture, especially for complex objects like food or specific characters.
  • Regional SDE/ODE Sampling: To balance consistency and flexibility, the framework employs a hybrid sampling strategy. Deterministic ODE sampling is used for background regions to ensure stability, while stochastic SDE sampling is applied to the edited region. This "loosens" the model's constraints, allowing it to generate harmonious new content within the edit mask.
  • Regional Score-based Gradient Guidance: To prevent leakage, editing gradients are strictly masked. The energy function driving the "drag" operation only influences latent pixels within the user-defined mask, protecting the rest of the image from artifacts.
  • Time Travel Strategy: DiffEditor utilizes deterministic DDIM inversion to perform "rollbacks" during the diffusion process. This allows the model multiple iterations to refine fine details without introducing the blurriness often associated with random noise rollbacks.

Experimental Results

The framework was evaluated on the CelebA-HQ dataset for face manipulation and various high-resolution images for object-level tasks.

Detailed view of content dragging using landmark points on a face.

Performance Metrics

DiffEditor demonstrates superior performance compared to existing baselines like DragDiff and DragonDiff:

  • Accuracy: In 68-point landmark manipulation on CelebA-HQ, DiffEditor achieved a Mean Squared Error (MSE) of 11.52, significantly outperforming DragonDiff (13.94) and DragDiff (17.32).
  • Visual Fidelity: The model achieved an FID score of 33.02/33.10, indicating high image quality and minimal artifacts compared to its predecessors.
  • Efficiency: DiffEditor is significantly faster than fine-tuning-based methods. It requires only ~3.5 seconds of preparation and ~13.8 seconds for inference, whereas methods like DragGAN require 40-50 seconds of model fine-tuning per image.

Conclusion

DiffEditor successfully addresses the limitations of rigidity and editing leakage in diffusion-based editing. By combining image prompts with regional stochasticity, it enables precise, high-quality manipulations across a variety of tasks. While current limitations include a lack of 3D spatial reasoning for complex geometric transformations, DiffEditor sets a new standard for efficient and accurate fine-grained image editing.

Summary updated

BibTeX
@inproceedings{mou2024diffeditor,
  author = {Chong Mou and Xintao Wang and Jiechong Song and Ying Shan and Jian Zhang},
  title = {{DiffEditor: Boosting Accuracy and Flexibility on Diffusion-based Image Editing}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure