Abstract
Image editing typically requires a trade-off between the semantic flexibility of text prompts and the spatial precision of drag-based interfaces. This paper introduces CLIPDrag, a framework that fuses these two modalities to provide both a "map" and a "compass" for AI-driven image manipulation. By leveraging text to resolve the spatial ambiguity of drag points and implementing a novel Fast Point Tracking (FPT) mechanism, CLIPDrag achieves superior editing quality and nearly double the inference speed of previous state-of-the-art models.
Introduction
Current image editing techniques generally fall into two categories: text-based and drag-based. Text-based editing offers intuitive semantic control but lacks fine-grained spatial precision. Conversely, drag-based editing allows users to manipulate specific pixels by dragging "handle" points to "target" locations. However, drag-based methods often suffer from mathematical ambiguity—where a single drag motion could represent multiple semantic changes—and slow optimization processes. CLIPDrag addresses these limitations by combining global text guidance with local point-based constraints.
Methodology
The CLIPDrag framework consists of three primary innovations:
- Global-Local Motion Supervision (GLMS): This module disentangles gradients from CLIP-based text loss into Identity and Edit components. By projecting the text gradient relative to the drag gradient, GLMS ensures that text guidance supports the physical movement defined by the user's drag points rather than conflicting with it.
- Fast Point Tracking (FPT): To improve efficiency, FPT optimizes the tracking of handle points by masking candidate points that are further from the target than the current position. This prevents optimization "loops" and significantly accelerates the process.
- Identity-Preserving Finetuning: The model utilizes Low-Rank Adaptation (LoRA) on the input image prior to editing to maintain the specific features and identity of the original subject.
Experiments and Results
Evaluated on the DRAGBENCH dataset, CLIPDrag demonstrates significant improvements over baseline models such as DragDiffusion and StableDrag. CLIPDrag achieves an average inference time of 47.8 seconds on a 3090 GPU, compared to 80.3 seconds for DragDiffusion and 72.3 seconds for StableDrag.
Furthermore, it maintains higher image fidelity and lower mean distance to target points across various iteration counts. Qualitative results show that CLIPDrag successfully performs complex semantic edits, such as changing a facial expression, while strictly adhering to user-defined spatial boundaries.
Conclusion
CLIPDrag represents a significant step forward in interactive image editing by successfully merging text and drag signals. The integration of global semantic context helps resolve local spatial ambiguities, while the FPT mechanism ensures high performance. While challenges remain in handling conflicting instructions between text and drag inputs, CLIPDrag provides a robust foundation for future research in multi-modal image and video editing.
Summary updated