SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.19327 · 2023

Cones 2: Customizable Image Synthesis with Multiple Subjects

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 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 3 have no contract verdict; 1 failure of our instrument; 2 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.19327.json · badge: /api/ran/2305.19327.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
ali-vilab/cones-v2 community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
FunctionStatusWhere it lives
collate_fn Ran
ran; our contract draft was wrong, not the code
ali-vilab/cones-v2/train_cones2.py
code served (permissive licence) · get_code("abb46f51790a26a8")
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 torch.utils.checkpoint

torch.manual_seed(0)

# Build examples for the collate_fn
# Each example needs 'instance_prompt_ids' (tensor) and 'instance_images' (tensor)
examples = [
    {
        'instance_prompt_ids': torch.tensor([[1, 2, 3, 4]]),  # shape (1, 4)
        'instance_images': torch.randn(3, 4, 4),  # shape (3, 4, 4) - 3 channels, 4x4 image
    },
    {
        'instance_prompt_ids': torch.tensor([[5, 6, 7, 8]]),  # shape (1, 4)
        'instance_images': torch.randn(3, 4, 4),  # shape (3, 4, 4)
    },
]

ARGS = {
    'examples': examples
}
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
downsampling Ran
ran on a synthesized input
ali-vilab/cones-v2/utils.py
code served (permissive licence) · get_code("2745abf40636bfd8")
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 (2, 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 torch.nn.functional as F

torch.manual_seed(0)

# Create a small image tensor
# The function expects img to be a 2D or 3D tensor (will be unsqueezed twice)
# Let's create a 2D tensor of shape (4, 3)
img = torch.randn(4, 3)

# Define downsampling dimensions
w = 2
h = 3

ARGS = {
    'img': img,
    'w': w,
    'h': h
}
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 (2, 3) — shape (2, 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
image_grid Ran
ran on a synthesized input
ali-vilab/cones-v2/utils.py
code served (permissive licence) · get_code("7c1982eae7c0e2d9")
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

torch.manual_seed(0)

# Create small test images with distinct dimensions
# The function calls .size on images[0], and iterates through images
# It uses PIL Image objects with 'RGB' mode
img1 = Image.new('RGB', size=(4, 3))
img2 = Image.new('RGB', size=(4, 3))
img3 = Image.new('RGB', size=(4, 3))
img4 = Image.new('RGB', size=(4, 3))

images = [img1, img2, img3, img4]

ARGS = {
    'images': images,
    'rows': 2,
    'cols': 2
}
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
latents_to_images Ran
ran on a synthesized input
ali-vilab/cones-v2/utils.py
code served (permissive licence) · get_code("9d31edafee1de047")
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 4, 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 torch.nn as nn
from PIL import Image

torch.manual_seed(0)

class MockVAEDecoder(nn.Module):
    """Minimal VAE decoder that implements the decode method."""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 192)  # 4 latent dims -> 192 features for reshaping
    
    def decode(self, scaled_latents):
        """
        Takes scaled latents and returns an object with a .sample attribute.
        The sample should be a tensor of shape (batch, channels, height, width).
        """
        batch_size = scaled_latents.shape[0]
        # Output shape: (batch_size, 3, 8, 8) for RGB images
        output = torch.randn(batch_size, 3, 8, 8)
        
        class DecoderOutput:
            def __init__(self, sample):
                self.sample = sample
        
        return DecoderOutput(output)

# Create VAE instance
vae = MockVAEDecoder()

# Create latents tensor: (batch_size=2, channels=4, height=2, width=2)
latents = torch.randn(2, 4, 2, 2)

# Scale factor parameter
scale_factor = 0.18215

ARGS = {
    "vae": vae,
    "latents": latents,
    "scale_factor": scale_factor,
}
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 list, ndim 4, 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
import_model_class_from_model_name_or_path Not yet run
unverified (harvested, no recorded run)
ali-vilab/cones-v2/train_cones2.py
pointer only (licence: MIT); the stored copy get_code serves, from KU-VGI/APDM, is pointer only (licence: NONE) · get_code("0eb3e94e8635150e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from KU-VGI/APDM, 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.

parse_args Not yet run
unverified (harvested, no recorded run)
ali-vilab/cones-v2/train_cones2.py
code served (permissive licence) · get_code("bd6d532381e6253d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 1 the same month, 2 later) and 4 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
import_model_class_from_model_name_or_path 13 other papers
13 later
2307.06949 (2023-07)
HyperDreamBooth: HyperNetworks for Fast Personalization of Text-to-Image Models
2311.18815 (2023-11)
IMMA: Immunizing text-to-image Models against Malicious Adaptation
2312.00084 (2023-12)
Can Protective Perturbation Safeguard Personal Data from Being Exploited by Stable Diffusion?
and 10 more not named here
collate_fn 2 other papers
1 the same month, 1 later
2305.20086 (2023-05)
Understanding and Mitigating Copying in Diffusion Models
2312.00084 (2023-12)
Can Protective Perturbation Safeguard Personal Data from Being Exploited by Stable Diffusion?

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 images with user-specified subjects has received growing attention due to its practical applications. Despite the recent success in single subject customization, existing algorithms suffer from high training cost and low success rate along with increased number of subjects. Towards controllable image synthesis with multiple subjects as the constraints, this work studies how to efficiently represent a particular subject as well as how to appropriately compose different subjects. We find that the text embedding regarding the subject token already serves as a simple yet effective representation that supports arbitrary combinations without any model tuning. Through learning a residual on top of the base embedding, we manage to robustly shift the raw subject to the customized subject given various text conditions. We then propose to employ layout, a very abstract and easy-to-obtain prior, as the spatial guidance for subject arrangement. By rectifying the activations in the cross-attention map, the layout appoints and separates the location of different subjects in the image, significantly alleviating the interference across them. Both qualitative and quantitative experimental results demonstrate our superiority over state-of-the-art alternatives under a variety of settings for multi-subject customization.

For agents

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

get_harvested_code_for_paper("2305.19327")
get_code_for_paper("2305.19327")
have("2305.19327")

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

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

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

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

Connect an agent — have() is free.