SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.03290 · CVPR · 2024

InstanceDiffusion: Instance-level Control for Image Generation

Ishan Misra, Trevor Darrell, Xudong Wang, Rohit Girdhar, Meta Genai, Sai Rambhatla

arXiv · PDF · Open in the Atlas

Code that ran

17 of 18 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, 3 violated it and 0 have no contract verdict; 12 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/2402.03290.json · badge: /api/ran/2402.03290.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
frank-xwang/InstanceDiffusion canonical (classifier label)
classifier basis: census
17 ran · 1 no recorded run
FunctionStatusWhere it lives
batch_to_device Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/dataset/jsondataset.py
code served (permissive licence) · get_code("6a31c83c41f11b71")
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 torch

torch.manual_seed(0)

# Construct a batch dictionary with various tensor types and nested structures
batch = {
    "simple_tensor": torch.randn(2, 4),
    "another_tensor": torch.randn(3, 5),
    "list_of_dicts": [
        {
            "nested_tensor_1": torch.randn(2, 4),
            "nested_tensor_2": torch.randn(3, 5),
            "non_tensor_value": "string"
        },
        {
            "nested_tensor_3": torch.randn(2, 4),
            "non_tensor": 42
        }
    ],
    "regular_value": 123,
    "another_list": [1, 2, 3]
}

device = "cpu"

ARGS = {
    "batch": batch,
    "device": device
}
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 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
close_contour Ran
ran, violated the contract we drafted
frank-xwang/InstanceDiffusion/dataset/decode_item.py
code served (permissive licence) · get_code("24680b34da633bbd")
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 2, dtype family float, shape (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 numpy as np

# Create a valid contour as a numpy array
# A contour should be a 2D array where each row is a point (e.g., x, y coordinates)
# Using shape (4, 2) - 4 points with 2 coordinates each
contour = np.array([
    [0.0, 0.0],
    [1.0, 0.0],
    [1.0, 1.0],
    [0.5, 0.5]
])

ARGS = {
    "contour": contour
}
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 2, dtype family float, shape (5, 2) — shape (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
complete_mask Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/inference.py
code served (permissive licence) · get_code("2fac02c349935452")
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 2, dtype family float, shape (1, 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

torch.manual_seed(0)

# The function takes has_mask and max_objs as parameters
# has_mask can be None, an int, a float, or an iterable
# max_objs is used to create a tensor of shape (1, max_objs)

# Test case: has_mask as a list of values
has_mask = [1.0, 0.5, 0.8]
max_objs = 3

ARGS = {
    "has_mask": has_mask,
    "max_objs": max_objs
}
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 2, dtype family float, shape (1, 3) — shape (1, 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
convert_coco_box Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
frank-xwang/InstanceDiffusion/eval_local.py
code served (permissive licence) · get_code("0226083d79fbec56")
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 1, dtype family float; 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)

# Create a bounding box in COCO format: [x, y, width, height]
bbox = [10.0, 20.0, 30.0, 40.0]

# Create image info dict with width and height
img_info = {
    'width': 640,
    'height': 480
}

ARGS = {
    'bbox': bbox,
    'img_info': img_info
}
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 1, dtype family float — 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
create_ema Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/utils/model.py
code served (permissive licence) · get_code("8336fe993ab97e1e")
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 tuple. 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 torch
import torch.nn as nn
from copy import deepcopy

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model,
    "enable_ema": True
}
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 tuple — a tuple output has no array shape of its own; none is 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
decode_base64_to_pillow Ran
ran, honoured the contract we drafted
frank-xwang/InstanceDiffusion/dataset/decode_item.py
code served (permissive licence) · get_code("0ededb39dd4d5702")
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 base64
from io import BytesIO
from PIL import Image
import numpy as np

# Create a small RGB image
img = Image.new('RGB', (4, 3), color=(255, 0, 0))

# Convert to base64
buffer = BytesIO()
img.save(buffer, format='PNG')
buffer.seek(0)
image_b64 = base64.b64encode(buffer.read()).decode('utf-8')

ARGS = {
    'image_b64': image_b64
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — 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
decode_tensor_from_string Ran
ran, honoured the contract we drafted
frank-xwang/InstanceDiffusion/dataset/decode_item.py
code served (permissive licence) · get_code("ad34702f4726aa2e")
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 1, dtype family float, shape (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
import base64
import numpy as np

torch.manual_seed(0)

# Create a small numpy array and encode it to base64
original_array = np.array([1.0, 2.0, 3.0, 4.0], dtype='float32')
arr_str = base64.b64encode(original_array.tobytes()).decode('utf-8')

ARGS = {
    'arr_str': arr_str,
    'use_tensor': True
}
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 Tensor, ndim 1, dtype family float, shape (4,) — shape (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
draw_box Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/dataset/base_dataset.py
code served (permissive licence) · get_code("8191ff51c4b074ff")
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.

from PIL import Image
import torch

# Create a small PIL Image object
img = Image.new('RGB', (100, 100), color='white')

# Create boxes as a list of bounding boxes
# Each box is [x1, y1, x2, y2]
boxes = [
    [10, 10, 30, 30],
    [40, 40, 70, 70],
    [20, 60, 50, 90]
]

ARGS = {
    'img': img,
    'boxes': boxes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — 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
encode_tensor_as_string Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/dataset-generation/submitit_automatic_label_ram_save_json.py
code served (permissive licence) · get_code("6de5057cb6ed75b0")
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 str. 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)

# Test case 1: numpy array
numpy_arr = np.random.randn(2, 4).astype(np.float32)

# Test case 2: torch tensor
torch_tensor = torch.randn(2, 4)

# Use the numpy array as the main test input
ARGS = {
    "arr": numpy_arr
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_clip_feature_text Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
frank-xwang/InstanceDiffusion/dataset-generation/submitit_automatic_label_ram_save_json.py
code served (permissive licence) · get_code("0d1f144ac0ae3d6b")
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 2, dtype family float, shape (1, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

class MockTextModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.text_embedding = nn.Linear(10, 4)
    
    def forward(self, input_ids, attention_mask, pixel_values):
        # Simulate a minimal CLIP-like model
        batch_size = input_ids.shape[0]
        pooler_output = self.text_embedding(torch.randn(batch_size, 10))
        
        # Return object with text_model_output.pooler_output
        class TextModelOutput:
            def __init__(self, pooler_output):
                self.pooler_output = pooler_output
        
        class Output:
            def __init__(self, pooler_output):
                self.text_model_output = TextModelOutput(pooler_output)
        
        return Output(pooler_output)

class MockProcessor:
    def __call__(self, text, return_tensors=None, padding=False):
        # Return tokenized inputs with required keys
        batch_size = 1
        seq_length = 8
        return {
            'input_ids': torch.randint(0, 1000, (batch_size, seq_length)),
            'attention_mask': torch.ones(batch_size, seq_length, dtype=torch.long),
        }

model = MockTextModel()
processor = MockProcessor()
input_text = "a photo of a cat"

ARGS = {
    'model': model,
    'processor': processor,
    'input': input_text,
}
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 2, dtype family float, shape (1, 4) — shape (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
get_point_from_box Ran
ran, violated the contract we drafted
frank-xwang/InstanceDiffusion/eval_local.py
code served (permissive licence) · get_code("dbb0b3758a575e0e")
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 1, dtype family float; 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
import numpy as np

torch.manual_seed(0)

# The function takes a bbox (bounding box) parameter
# It expects bbox to be indexable with 4 elements: bbox[0], bbox[1], bbox[2], bbox[3]
# These represent x0, y0, x1, y1 coordinates

# Create a simple bbox as a list or array with 4 elements
bbox = [10.0, 20.0, 50.0, 80.0]

ARGS = {
    "bbox": bbox
}
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 list, ndim 1, dtype family float — 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_text Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
frank-xwang/InstanceDiffusion/dataset-generation/submitit_automatic_label_ram_save_json.py
code served (permissive licence) · get_code("cc40c350f2fdbdf0")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockProcessor:
    """Stand-in processor that mimics a text processor like CLIPProcessor"""
    def __call__(self, text=None, return_tensors=None, padding=None):
        # Return a dict with input_ids and attention_mask
        # Simulate tokenization output
        batch_size = 1
        seq_length = 5
        return {
            'input_ids': torch.randint(0, 1000, (batch_size, seq_length)),
            'attention_mask': torch.ones(batch_size, seq_length, dtype=torch.long)
        }

processor = MockProcessor()
input_text = "A photo of a cat"

ARGS = {
    'processor': processor,
    'input': input_text
}
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 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
rescale_box Ran
ran, violated the contract we drafted
frank-xwang/InstanceDiffusion/inference.py
code served (permissive licence) · get_code("1b3923351aeaafb3")
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 1, dtype family float; 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)

# bbox is indexed with [0], [1], [2], [3] - it's a list or array-like with 4 elements
# width and height are used as divisors - they should be numeric
bbox = [100, 200, 50, 75]  # [x, y, width_of_box, height_of_box]
width = 640  # image width
height = 480  # image height

ARGS = {
    "bbox": bbox,
    "width": width,
    "height": height,
}
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 1, dtype family float — 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
rescale_points Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/eval_local.py
code served (permissive licence) · get_code("075b026765e25e3e")
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 1, dtype family float; 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# rescale_points(point, width, height)
# - point: indexed with [0] and [1], so needs at least 2 elements (list, tuple, or array)
# - width: used in division as float(width)
# - height: used in division as float(height)

point = [100, 200]
width = 400
height = 600

ARGS = {
    "point": point,
    "width": width,
    "height": height
}
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 list, ndim 1, dtype family float — 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
sub_batch Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/dataset/jsondataset.py
code served (permissive licence) · get_code("c9b050c82d78f83d")
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 torch
import numpy as np

torch.manual_seed(0)

# The function takes a batch dict and num parameter
# It iterates over keys in batch and slices each value using [0:num]
# This means batch values should be indexable (tensors, lists, arrays, etc.)

batch = {
    'input_ids': torch.randn(2, 4),
    'attention_mask': torch.randn(2, 4),
    'labels': torch.randn(2, 4)
}

num = 1

ARGS = {
    'batch': batch,
    'num': num
}
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
to_valid Ran
ran; our contract draft was wrong, not the code
frank-xwang/InstanceDiffusion/dataset/base_dataset.py
code served (permissive licence) · get_code("08fa56c4d4f18a91")
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 tuple. 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 torch

torch.manual_seed(0)

# Define arguments for to_valid function
# Parameters: x0, y0, x1, y1, image_size, min_box_size

ARGS = {
    "x0": 10,
    "y0": 20,
    "x1": 100,
    "y1": 150,
    "image_size": 256,
    "min_box_size": 0.01
}
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 tuple — a tuple output has no array shape of its own; none is 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
to_valid_scribbles Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
frank-xwang/InstanceDiffusion/dataset/base_dataset.py
code served (permissive licence) · get_code("ce28a1eb6ea4fde7")
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 1, 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - scribbles: a list/array that is indexed with integers (scribbles[i*2], scribbles[i*2+1])
#   and supports assignment, len(), and arithmetic operations
# - image_size: a scalar used for min/max comparison
# The function modifies scribbles in-place and returns it

# Create a simple list of scribble coordinates (pairs of x,y values)
# Using a list that can be modified in-place
scribbles = [5, 10, -2, 15, 8, -5, 20, 25]
image_size = 100

ARGS = {
    "scribbles": scribbles,
    "image_size": image_size
}
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 list, ndim 1, 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
load_ckpt Not yet run
unverified (harvested, no recorded run)
frank-xwang/InstanceDiffusion/utils/model.py
code served (permissive licence) · get_code("37960ce701410505")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 0 later) and 17 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
close_contour 2 other papers
1 dated earlier, 1 the same month
2002.09576 (2020-02)
UnMask: Adversarial Detection and Defense Through Robust Feature Alignment
2402.07633 (2024-02)
Complete Instances Mining for Weakly Supervised Instance Segmentation

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

Image Caption: An image depicting in the morning. A brown cute teddy bear, a purple cute teddy bear, a yellow cute teddy bear, a blue cute teddy bear all standing side by side on a red brick road. The scene should be set in front of Pink Castle with clear blue sky overhead, punctuated by fluffy white clouds, and trees with green leaves. The pink castle should loom majestically in the background. Instance Captions: 1-4) A brown/purple/yellow/blue teddy bear; 5) a red brick road; 6) Pink Castle; 7-8) green leaves; 9-10) fluffy white clouds Image Caption: Craft an oil painting: Picture a seaside garden drenched in radiant hues of roses, lilies, and lavender, transitioning gracefully into the expansive azure ocean and blue sky. Integrate a weathered, rustic pathway with steps that invite viewers towards the water's edge, complemented by a prominent bouquet of flowers and plants. Instance Captions: 1-19) roses; 20) sky; 21) ocean; 22) pathway with steps; 23) bouquet of flowers; 24) plant; 25-26) plants

For agents

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

get_harvested_code_for_paper("2402.03290")
get_code_for_paper("2402.03290")
have("2402.03290")

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

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

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

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

Connect an agent — have() is free.