SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.15769 · NeurIPS · 2024

FastDrag: Manipulate Anything in One Step

Jian Guan, Xuanjia Zhao, Congyi Fan, Dongli Xu, Youtian Lin, Haiwei Pan, Pengming Feng

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2405.15769.json · badge: /api/ran/2405.15769.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
XuanjiaZ/FastDrag canonical (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
check_handle_reach_target Ran
ran; our contract draft was wrong, not the code
XuanjiaZ/FastDrag/utils/drag_utils.py
code served (permissive licence) · get_code("a43f655fb03112d9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects two iterables of points that can be subtracted and have a .norm() method
# These should be tensors or objects that support these operations
# We'll create two lists of small tensors to represent handle points and target points

handle_points = [
    torch.tensor([1.0, 2.0, 3.0, 4.0]),
    torch.tensor([5.0, 6.0, 7.0, 8.0])
]

target_points = [
    torch.tensor([1.5, 2.5, 3.5, 4.5]),
    torch.tensor([5.5, 6.5, 7.5, 8.5])
]

ARGS = {
    "handle_points": handle_points,
    "target_points": target_points
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
interpolate_feature_patch Ran
ran; our contract draft was wrong, not the code
XuanjiaZ/FastDrag/utils/drag_utils.py
code served (permissive licence) · get_code("8ae3b1ed253e0c6f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 3, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a feature tensor with shape (batch, channels, height, width)
# Using distinct dimensions: batch=2, channels=4, height=8, width=6
feat = torch.randn(2, 4, 8, 6)

# Create coordinate tensors for y1, y2, x1, x2
# These should be scalar or small tensors representing patch coordinates
y1 = torch.tensor(1.5)
y2 = torch.tensor(4.2)
x1 = torch.tensor(1.3)
x2 = torch.tensor(3.8)

ARGS = {
    "feat": feat,
    "y1": y1,
    "y2": y2,
    "x1": x1,
    "x2": x2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 2) — shape (2, 4, 3, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
point_tracking Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
XuanjiaZ/FastDrag/utils/drag_utils.py
code served (permissive licence) · get_code("aaf9fd71daa69ae4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Build a small stand-in class for args
class Args:
    def __init__(self):
        self.r_p = 2  # radius for point tracking neighborhood

# Create feature tensors
# F0 and F1: shape (batch, channels, height, width)
# Using distinct dimensions: batch=2, channels=4, height=8, width=6
F0 = torch.randn(2, 4, 8, 6)
F1 = torch.randn(2, 4, 8, 6)

# Create handle_points as list of lists (mutable, will be modified in-place)
# Each point is [row, col]
handle_points = [[3.5, 2.5], [5.2, 4.1]]

# Create handle_points_init as list of lists
# These are the initial positions before tracking
handle_points_init = [[3.0, 2.0], [5.0, 4.0]]

# Create args object
args = Args()

ARGS = {
    "F0": F0,
    "F1": F1,
    "handle_points": handle_points,
    "handle_points_init": handle_points_init,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
XuanjiaZ/FastDrag/drag_bench_evaluation/run_fast_drag.py
code served (permissive licence) · get_code("b6f9c54d3eaa1c8a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (1, 3, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a small test image as numpy array
# Shape: (height, width, channels) with values in range [0, 255]
image = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8).astype(np.float32)

# Determine device
device = torch.device('cpu')

ARGS = {
    'image': image,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 4, 3) — shape (1, 3, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
drag_diffusion_update Not yet run
unverified (harvested, no recorded run)
XuanjiaZ/FastDrag/utils/drag_utils.py
code served (permissive licence) · get_code("f6c4a71dae1c6163")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
preprocess_image 4 other papers
2 dated earlier, 2 later
2305.10973 (2023-05)
Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold
2404.01050 (2024-04)
Drag Your Noise: Interactive Point-based Editing via Diffusion Semantic Propagation
2407.17843 (2024-07)
DragText: Rethinking Text Embedding in Point-based Image Editing
and 1 more not named here
check_handle_reach_target
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2401.06442 (2024-01)
RotationDrag: Point-based Image Editing with Rotated Diffusion Features
2404.01050 (2024-04)
Drag Your Noise: Interactive Point-based Editing via Diffusion Semantic Propagation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Drag-based image editing using generative models provides precise control over image contents, enabling users to manipulate anything in an image with a few clicks. However, prevailing methods typically adopt n-step iterations for latent semantic optimization to achieve drag-based image editing, which is time-consuming and limits practical applications. In this paper, we introduce a novel one-step dragbased image editing method, i.e., FastDrag, to accelerate the editing process. Central to our approach is a latent warpage function (LWF), which simulates the behavior of a stretched material to adjust the location of individual pixels within the latent space. This innovation achieves one-step latent semantic optimization and hence significantly promotes editing speeds. Meanwhile, null regions emerging after applying LWF are addressed by our proposed bilateral nearest neighbor interpolation (BNNI) strategy. This strategy interpolates these regions using similar features from neighboring areas, thus enhancing semantic integrity. Additionally, a consistency-preserving strategy is introduced to maintain the consistency between the edited and original images by adopting semantic information from the original image, saved as key and value pairs in self-attention module during diffusion inversion, to guide the diffusion sampling. Our FastDrag is validated on the DragBench dataset, demonstrating substantial improvements in processing time over existing methods, while achieving enhanced editing performance. Project

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.15769")
get_code_for_paper("2405.15769")
have("2405.15769")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2405.15769.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2405.15769.svg)](https://syntology.ai/paper/2405.15769)

Connect an agent — have() is free.