DiffUHaul: A Training-Free Method for Object Dragging in Images

Omri Avrahami, Rinon Gal, Gal Chechik, Ohad Fried, Dani Lischinski, Arash Vahdat, Weili Nie · DOI

Abstract

DiffUHaul is a novel training-free approach for high-fidelity object dragging within images. By leveraging the spatial reasoning of localized diffusion models and introducing a "soft anchoring" technique, it effectively eliminates common artifacts like "ghosting" and identity shifts. Unlike existing methods that require per-image fine-tuning, DiffUHaul offers a robust, efficient solution for seamless object relocation, achieving superior results in both speed and quality.

Introduction

While text-to-image models have achieved remarkable success, precise spatial editing—such as moving an object to a specific new location—remains a significant challenge. Current "object dragging" techniques often suffer from two primary issues: ghosting, where a trace of the object remains at its original position, and identity loss, where the object's appearance changes during the move (e.g., a specific dog breed transforming into another during the relocation).

Identifying the source object (cat) for the dragging operation.

Furthermore, many existing solutions rely on time-consuming per-image optimization (e.g., LoRA), which can take several minutes per edit. DiffUHaul addresses these challenges with a training-free, "plug-and-play" mechanism that operates in seconds, providing a more practical tool for real-world image editing.

Methodology

DiffUHaul is built upon BlobGEN, a localized text-to-image model that utilizes "blobs" (ellipses) to define object regions. The researchers introduced three key technical innovations to enable high-quality dragging without retraining:

Gated Self-Attention Masking

The authors discovered that even in localized models, object features often "leak" between regions during the denoising process. By implementing an inference-time masking technique in the gated self-attention layers, DiffUHaul forces the model to maintain disentangled object representations, preventing unintended feature spillover and ensuring cleaner object separation.

Localized control over multiple objects (cat and rock) within the scene.

Soft Anchoring Mechanism

To preserve the object's identity perfectly, the method employs a two-stage process:

  1. Layout Phase: In early denoising steps, attention features from the source and target locations are blended to establish the new spatial layout.
  2. Detail Phase: In later steps, nearest-neighbor copying is used to map fine-grained textures (like fur or patterns) from the original object to its new position, ensuring high-fidelity reconstruction.

DDPM Self-Attention Bucketing

For real-world images, standard inversion techniques often fail to reconstruct the image accurately under localized control. DiffUHaul overcomes this by adding noise at various scales to the original image, extracting "clean" reference features for each step of the editing process, which stabilizes the reconstruction.

Evaluation and Results

The method was evaluated using a specialized pipeline based on the COCO validation set, comprising over 6,000 samples. Performance was measured using DINOv2 features for identity preservation ("Foreground Similarity") and artifact detection ("Traces"), alongside the Kernel Inception Distance (KID) for realism.

  • Trace Removal: DiffUHaul achieved a "Traces" score of 0.32, significantly outperforming the best baseline (DiffEditor at 0.60), indicating much cleaner removal of the object from its original spot.
  • Identity Preservation: It maintained a high Foreground Similarity of 0.835, compared to 0.738 for DragDiffusion.
  • Efficiency: The process takes approximately 13 seconds on an NVIDIA A100, making it over 10x faster than optimization-based methods like DragDiffusion (~148 seconds).
  • User Preference: Human evaluators preferred DiffUHaul in 76% to 81% of cases across various quality metrics, including realism and overall edit quality.

Discussion and Limitations

While highly effective, DiffUHaul has limitations. It cannot currently handle object rotation; attempting to drag an object into a rotated blob results in stretching rather than turning. It also struggles with extreme resizing and "collisions" where objects overlap unnaturally. Future research may incorporate 3D spatial understanding to address these perspective and rotation challenges, further enhancing the flexibility of training-free image editing.

Summary updated

BibTeX
@inproceedings{avrahami2024diffuhaul,
  author = {Omri Avrahami and Rinon Gal and Gal Chechik and Ohad Fried and Dani Lischinski and Arash Vahdat and Weili Nie},
  title = {{DiffUHaul: A Training-Free Method for Object Dragging in Images}},
  booktitle = {SIGGRAPH Asia},
  year = {2024},
  doi = {10.1145/3680528.3687590},
}
Figure