LightningDrag: Lightning Fast and Accurate Drag-based Image Editing Emerging from Videos
Yujun Shi, Jun Hao Liew, Hanshu Yan, Vincent Y. F. Tan, Jiashi Feng
TL;DR
LightningDrag tackles the sluggish and accuracy-limited drag-based image editing by reframing the task as conditional generation powered by a latent diffusion backbone, an appearance encoder for identity preservation, and a point-embedding mechanism that encodes user drag instructions into attention. It learns from large-scale video supervision to model realistic object motion and deformation, enabling high-quality edits in ~1s without latent optimization during inference. The approach demonstrates superior accuracy and speed on DragBench, supports test-time refinements like noise priors and CFG-guided point following, and offers practical drag-engineering techniques such as point augmentation and sequential dragging. While built on Stable Diffusion 1.5, the authors show potential improvements via diffusion-model scaling and acceleration methods, underscoring substantial practical impact for fast, controllable image editing.
Abstract
Accuracy and speed are critical in image editing tasks. Pan et al. introduced a drag-based image editing framework that achieves pixel-level control using Generative Adversarial Networks (GANs). A flurry of subsequent studies enhanced this framework's generality by leveraging large-scale diffusion models. However, these methods often suffer from inordinately long processing times (exceeding 1 minute per edit) and low success rates. Addressing these issues head on, we present LightningDrag, a rapid approach enabling high quality drag-based image editing in ~1 second. Unlike most previous methods, we redefine drag-based editing as a conditional generation task, eliminating the need for time-consuming latent optimization or gradient-based guidance during inference. In addition, the design of our pipeline allows us to train our model on large-scale paired video frames, which contain rich motion information such as object translations, changing poses and orientations, zooming in and out, etc. By learning from videos, our approach can significantly outperform previous methods in terms of accuracy and consistency. Despite being trained solely on videos, our model generalizes well to perform local shape deformations not presented in the training data (e.g., lengthening of hair, twisting rainbows, etc.). Extensive qualitative and quantitative evaluations on benchmark datasets corroborate the superiority of our approach. The code and model will be released at https://github.com/magic-research/LightningDrag.
