SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.11410 · 2023

Subject-Diffusion:Open Domain Personalized Text-to-Image Generation without Test-time Fine-tuning

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 4 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/2307.11410.json · badge: /api/ran/2307.11410.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
OPPO-Mente-Lab/Subject-Diffusion canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
FunctionStatusWhere it lives
add_module_args Ran
ran; our contract draft was wrong, not the code
OPPO-Mente-Lab/Subject-Diffusion/model_utils.py
code served (permissive licence) · get_code("3bb14723b94dbad9")
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 MockArgumentParser. 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 argparse
import torch

torch.manual_seed(0)

class MockArgumentParser:
    def __init__(self):
        self.groups = {}
    
    def add_argument_group(self, name):
        group = MockArgumentGroup(name)
        self.groups[name] = group
        return group

class MockArgumentGroup:
    def __init__(self, name):
        self.name = name
        self.arguments = {}
    
    def add_argument(self, name, default=None, type=None):
        self.arguments[name] = {'default': default, 'type': type}
        return self

parent_args = MockArgumentParser()

ARGS = {
    'parent_args': parent_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 MockArgumentParser — a MockArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockArgumentParser 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
custom_decoder Ran
ran, honoured the contract we drafted
OPPO-Mente-Lab/Subject-Diffusion/custom_dataset.py
code served (permissive licence) · get_code("791cc02a10597101")
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 PngImageFile. 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 io
import PIL.Image
import numpy as np

# Create a small PNG image in memory
png_image = PIL.Image.new('L', (4, 3))
png_bytes = io.BytesIO()
png_image.save(png_bytes, format='PNG')
png_data = png_bytes.getvalue()

# Create a small JPG image in memory
jpg_image = PIL.Image.new('RGB', (4, 3))
jpg_bytes = io.BytesIO()
jpg_image.save(jpg_bytes, format='JPEG')
jpg_data = jpg_bytes.getvalue()

ARGS = {
    'key': 'image.png',
    'data': png_data
}
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 PngImageFile — a PngImageFile output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PngImageFile output the recorded ndim 2 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
is_valid_bbox Ran
ran; our contract draft was wrong, not the code
OPPO-Mente-Lab/Subject-Diffusion/custom_dataset.py
code served (permissive licence) · get_code("1bcf7e8c5b5dbb4e")
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 bool, 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
import numpy as np

torch.manual_seed(0)

# Create a mask tensor with shape [1, height, width]
# The mask contains different color/class indices
mask = torch.zeros(1, 10, 12, dtype=torch.long)

# Add some distinct regions to the mask
# Region 0 (background): most of the mask
mask[0, :, :] = 0

# Region 1 (object): a rectangular region
mask[0, 2:6, 3:8] = 1

# Region 2 (another object): smaller region
mask[0, 1:3, 1:4] = 2

# Create a bounding box [x_min, y_min, x_max, y_max]
# This bbox should contain the regions with colors 1 and 2
bbox = torch.tensor([1.0, 1.0, 9.0, 7.0], dtype=torch.float32)

ARGS = {
    "mask": mask,
    "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 bool, 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
numpy_to_pil Ran
ran, violated the contract we drafted
OPPO-Mente-Lab/Subject-Diffusion/utils.py
code served (permissive licence) · get_code("b552e39bb399319c")
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 numpy as np
from PIL import Image

# Create a small batch of images with shape (batch, height, width, channels)
# Using normalized values in range [0, 1] as expected by the function
batch_size = 2
height = 4
width = 3
channels = 3

# Create a batch of RGB images with values in [0, 1]
images_rgb = np.random.rand(batch_size, height, width, channels).astype('float32')

ARGS = {
    'images': images_rgb
}
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 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
get_default_update_params Not yet run
unverified (harvested, no recorded run)
OPPO-Mente-Lab/Subject-Diffusion/model_utils.py
code served (permissive licence) · get_code("7db516620082545a")
How it ran

no invocation recorded.

load_clip Not yet run
unverified (harvested, no recorded run)
OPPO-Mente-Lab/Subject-Diffusion/utils.py
code served (permissive licence) · get_code("9e127980111732d8")
How it ran

no invocation recorded.

load_config Not yet run
unverified (harvested, no recorded run)
OPPO-Mente-Lab/Subject-Diffusion/utils.py
code served (permissive licence) · get_code("5cb0da1c3320f58c")
How it ran

no invocation recorded.

replace_clip_embeddings Not yet run
unverified (harvested, no recorded run)
OPPO-Mente-Lab/Subject-Diffusion/replace_clip_embedding.py
code served (permissive licence) · get_code("c32854253998ea81")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
numpy_to_pil 4 other papers
1 dated earlier, 3 later
2210.09477 (2022-10)
UniTune: Text-Driven Image Editing by Fine Tuning a Diffusion Model on a Single Image
2308.12038 (2023-08)
Large Multilingual Models Pivot Zero-Shot Multimodal Learning across Languages
2407.11451 (2024-07)
Isometric Representation Learning for Disentangled Latent Space of Diffusion Models
and 1 more not named here

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

Recent progress in personalized image generation using diffusion models has been significant. However, development in the area of open-domain and non-fine-tuning personalized image generation is proceeding rather slowly. In this paper, we propose Subject-Diffusion, a novel open-domain personalized image generation model that, in addition to not requiring test-time fine-tuning, also only requires a single reference image to support personalized generation of single- or multi-subject in any domain. Firstly, we construct an automatic data labeling tool and use the LAION-Aesthetics dataset to construct a large-scale dataset consisting of 76M images and their corresponding subject detection bounding boxes, segmentation masks and text descriptions. Secondly, we design a new unified framework that combines text and image semantics by incorporating coarse location and fine-grained reference image control to maximize subject fidelity and generalization. Furthermore, we also adopt an attention control mechanism to support multi-subject generation. Extensive qualitative and quantitative results demonstrate that our method outperforms other SOTA frameworks in single, multiple, and human customized image generation. Please refer to our \href{https://oppo-mente-lab.github.io/subject_diffusion/}{project page}

For agents

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

get_harvested_code_for_paper("2307.11410")
get_code_for_paper("2307.11410")
have("2307.11410")

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

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

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

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

Connect an agent — have() is free.