SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.10973 · 2023

Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 6 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2305.10973.json · badge: /api/ran/2305.10973.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
opengvlab/internchat canonical (classifier label)
classifier basis: census
5 ran · 5 no recorded run
XingangPan/DragGAN canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
adriaciurana/DragGAN reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
HWC3 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
opengvlab/internchat/iGPT/models/image.py
code served (permissive licence) · get_code("f9ec7d70add02b6f")
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 ndarray, ndim 3, dtype family int, shape (4, 5, 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 numpy as np

# Test case 1: 3-channel RGB image (most common case)
x_rgb = np.random.randint(0, 256, size=(4, 5, 3), dtype=np.uint8)

# Test case 2: 1-channel grayscale image
x_gray = np.random.randint(0, 256, size=(4, 5, 1), dtype=np.uint8)

# Test case 3: 4-channel RGBA image
x_rgba = np.random.randint(0, 256, size=(4, 5, 4), dtype=np.uint8)

# Test case 4: 2D image (will be expanded to 3D with 1 channel)
x_2d = np.random.randint(0, 256, size=(4, 5), dtype=np.uint8)

# Use the RGB case as the primary test
ARGS = {
    "x": x_rgb
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 5, 3) — shape (4, 5, 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
cdist_p_norm Ran
ran; our contract draft was wrong, not the code
adriaciurana/DragGAN/drag_gan/drag_gan.py
code served (permissive licence) · get_code("041298a0743a4d18")
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 3, dtype family float, shape (2, 3, 5) 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)

# Construct tensors for x and y
# The function expects:
# - x: shape (batch, channels, *spatial_dims) -> will be reshaped to (batch, channels, -1)
# - y: shape (batch, channels, *spatial_dims) -> will be reshaped to (batch, channels, -1)
# Let's use batch=2, channels=4, and spatial dimension of 3 for x and 5 for y to be distinct

x = torch.randn(2, 4, 3)  # batch=2, channels=4, spatial=3
y = torch.randn(2, 4, 5)  # batch=2, channels=4, spatial=5

p = 1  # p-norm parameter

ARGS = {
    "x": x,
    "y": y,
    "p": p,
}
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 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) 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
clear_state Ran
ran; our contract draft was wrong, not the code
XingangPan/DragGAN/visualizer_drag_gradio.py
pointer only (licence: NOASSERTION) · get_code("98587987bd524213")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, XingangPan/DragGAN (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cut_frame_to_8 Ran
ran on a synthesized input
opengvlab/internchat/iGPT/models/load_internvideo.py
code served (permissive licence) · get_code("c9a1d42f7d41bd39")
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 ndarray, ndim 1, dtype family int, shape (8,) 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 numpy as np

def cut_frame_to_8(data):
    index = np.linspace(0, len(data) - 1, 8).astype(int)
    return data[index]

# Create sample data with sufficient length to sample 8 points
data = np.arange(100)

ARGS = {
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (8,) — shape (8,) 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
generate_motion_direction Ran
ran; our contract draft was wrong, not the code
adriaciurana/DragGAN/drag_gan/drag_gan.py
code served (permissive licence) · get_code("ab68dcffd2812b42")
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, 1, 1, 4) 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
from torch.nn import functional as Functional

torch.manual_seed(0)

# Create small tensors for p and t
# Both should have shape (batch_size, ..., dim)
# The function uses: t - p (element-wise subtraction)
# Functional.normalize(t - p, dim=-1) normalizes along last dimension
# Result is indexed with [:, None, None, :] so we need last dim to be meaningful
batch_size = 2
feature_dim = 4

p = torch.randn(batch_size, feature_dim)
t = torch.randn(batch_size, feature_dim)

magnitude_direction = 0.1

ARGS = {
    "p": p,
    "t": t,
    "magnitude_direction": magnitude_direction
}
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, 1, 1, 4) — shape (2, 1, 1, 4) 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
generate_motion_samples Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
adriaciurana/DragGAN/drag_gan/drag_gan.py
code served (permissive licence) · get_code("2b6be89728b77648")
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, 5, 5, 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)

# p: torch.Tensor - position tensor, shape (batch_size, 2)
# The function reshapes it to (batch_size, 1, 1, 2), so it needs 2D coordinates
p = torch.randn(2, 2)

# r: torch.Tensor - radius tensor, shape (batch_size,)
# The function iterates over r, so it should have one radius per batch element
r = torch.tensor([0.3, 0.5])

# samples: int - number of samples in each dimension (default 5)
samples = 5

ARGS = {
    "p": p,
    "r": r,
    "samples": samples,
}
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, 5, 5, 2) — shape (2, 5, 5, 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
get_index Ran
ran on a synthesized input
opengvlab/internchat/iGPT/models/load_internvideo.py
code served (permissive licence) · get_code("5fe54c4dbc1d90f2")
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 ndarray, ndim 1, dtype family int, shape (8,) 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 numpy as np

ARGS = {
    "num_frames": 100,
    "num_segments": 8
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (8,) — shape (8,) 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
load_image Ran
ran, honoured the contract we drafted
opengvlab/internchat/iGPT/models/husky.py
code served (permissive licence) · get_code("4552e857b0cf7ef7")
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 Image. The image it ran in was not recorded. If your copy returns the same type 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 requests
from PIL import Image
from io import BytesIO
from unittest.mock import Mock, patch

# Create a small test image in memory
img = Image.new('RGB', (10, 10), color='red')
img_bytes = BytesIO()
img.save(img_bytes, format='PNG')
img_bytes.seek(0)

# Mock the requests.get to return our test image
mock_response = Mock()
mock_response.content = img_bytes.getvalue()

# Test with a URL
test_url = 'https://example.com/test.png'

ARGS = {
    'image_file': test_url
}

# Patch requests.get for the function call
import sys
sys.modules['requests'].get = Mock(return_value=mock_response)
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, requests — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
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
make_batch Ran
ran on a synthesized input
opengvlab/internchat/iGPT/models/inpainting.py
code served (permissive licence) · get_code("eba3cd2d932aa5b3")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np
import torch

torch.manual_seed(0)

# Create a small test image (height=4, width=3, channels=3)
image = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Create a small test mask (height=4, width=3)
mask = np.random.randint(0, 256, size=(4, 3), dtype=np.uint8)

# Use CPU device
device = 'cpu'

ARGS = {
    'image': image,
    'mask': mask,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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)
this paper's copy was not recorded; identical code first harvested from XuanjiaZ/FastDrag
pointer only · get_code("b6f9c54d3eaa1c8a")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

reverse_point_pairs Ran
ran, honoured the contract we drafted
XingangPan/DragGAN/visualizer_drag_gradio.py
pointer only (licence: NOASSERTION) · get_code("85ecb3cb5eeb8bc5")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, XingangPan/DragGAN (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_gpu_memory Not yet run
unverified (harvested, no recorded run)
opengvlab/internchat/iGPT/models/husky.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from smile-data/smile, is pointer only (licence: NONE) · get_code("fe66d0280e436155")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from smile-data/smile, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

inflate_weight Not yet run
unverified (harvested, no recorded run)
opengvlab/internchat/iGPT/models/intern_action.py
code served (permissive licence) · get_code("bdec7f112532de68")
How it ran

no invocation recorded.

intern_action_b16 Not yet run
unverified (harvested, no recorded run)
opengvlab/internchat/iGPT/models/intern_action.py
code served (permissive licence) · get_code("2f3ae791e3e47c92")
How it ran

no invocation recorded.

intern_action_l14 Not yet run
unverified (harvested, no recorded run)
opengvlab/internchat/iGPT/models/intern_action.py
code served (permissive licence) · get_code("7f82b5688fdb1bca")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
opengvlab/internchat/iGPT/models/husky.py
code served (permissive licence) · get_code("cbc8841e1bf04835")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 6 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 6 later) and 10 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
load_image 85 other papers
1 dated earlier, 84 later
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2307.10490 (2023-07)
Abusing Images and Sounds for Indirect Instruction Injection in Multi-Modal LLMs
2308.06595 (2023-08)
VisIT-Bench: A Benchmark for Vision-Language Instruction Following Inspired by Real-World Use
and 82 more not named here
HWC3 18 other papers
2 the same month, 16 later
2305.16322 (2023-05)
Uni-ControlNet: All-in-One Control to Text-to-Image Diffusion Models
2305.17098 (2023-05)
ControlVideo: Conditional Control for One-shot Text-driven Video Editing and Beyond
2308.09592 (2023-08)
StableVideo: Text-driven Consistency-aware Diffusion Video Editing
and 15 more not named here
get_gpu_memory 7 other papers
7 later
2307.12981 (2023-07)
3D-LLM: Injecting the 3D World into Large Language Models
2308.03279 (2023-08)
UniversalNER: TARGETED DISTILLATION FROM LARGE LANGUAGE MODELS FOR OPEN NAMED ENTITY RECOGNITION
2308.11534 (2023-08)
PlatoLM: Teaching LLMs in Multi-Round Dialogue via a User Simulator
and 4 more not named here
preprocess_image 4 other papers
4 later
2404.01050 (2024-04)
Drag Your Noise: Interactive Point-based Editing via Diffusion Semantic Propagation
2405.15769 (2024-05)
FastDrag: Manipulate Anything in One Step
2407.17843 (2024-07)
DragText: Rethinking Text Embedding in Point-based Image Editing
and 1 more not named here
inflate_weight 2 other papers
2 later
2311.17005 (2023-11)
MVBench: A Comprehensive Multi-modal Video Understanding Benchmark
2403.09626 (2024-03)
Video Mamba Suite: State Space Model as a Versatile Alternative for Video Understanding
reverse_point_pairs 1 other paper
1 later
2310.19512 (2023-10)
VideoCrafter1: Open Diffusion Models for High-Quality Video Generation

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-23.

Repositories linked to this paper

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

Abstract

Synthesizing visual content that meets users' needs often requires flexible and precise controllability of the pose, shape, expression, and layout of the generated objects. Existing approaches gain controllability of generative adversarial networks (GANs) via manually annotated training data or a prior 3D model, which often lack flexibility, precision, and generality. In this work, we study a powerful yet much less explored way of controlling GANs, that is, to "drag" any points of the image to precisely reach target points in a user-interactive manner, as shown in Fig.1. To achieve this, we propose DragGAN, which consists of two main components: 1) a feature-based motion supervision that drives the handle point to move towards the target position, and 2) a new point tracking approach that leverages the discriminative generator features to keep localizing the position of the handle points. Through DragGAN, anyone can deform an image with precise control over where pixels go, thus manipulating the pose, shape, expression, and layout of diverse categories such as animals, cars, humans, landscapes, etc. As these manipulations are performed on the learned generative image manifold of a GAN, they tend to produce realistic outputs even for challenging scenarios such as hallucinating occluded content and deforming shapes that consistently follow the object's rigidity. Both qualitative and quantitative comparisons demonstrate the advantage of DragGAN over prior approaches in the tasks of image manipulation and point tracking. We also showcase the manipulation of real images through GAN inversion.

For agents

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

get_harvested_code_for_paper("2305.10973")
get_code_for_paper("2305.10973")
have("2305.10973")

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

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

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

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

Connect an agent — have() is free.