SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.18551 · CVPR · 2024

Attention Calibration for Disentangled Text-to-Image Personalization

Zhe Wang, Mengping Yang, Yanbing Zhang, Qin Zhou

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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 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/2403.18551.json · badge: /api/ran/2403.18551.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
monalissaa/disendiff canonical (classifier label)
classifier basis: census
3 ran · 4 no recorded run
Monalissaa/DisenDiff community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
CDAttentionStore Ran
ran on a synthesized input
Monalissaa/DisenDiff/src/attention_controllers.py
code served (permissive licence) · get_code("2ba0d66eaa1687b5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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 math

class CDAttentionStore:

    @staticmethod
    def get_empty_store():
        return {8: [], 16: [], 32: [], 64: []}

    def __call__(self, attn, is_cross: bool=True, place_in_unet: str=None):
        key = math.sqrt(attn.shape[1])
        self.step_store[key].append(attn)
        return

    def between_steps(self):
        self.step_store = self.get_empty_store()

    def reset(self):
        self.step_store = self.get_empty_store()

    def __init__(self):
        self.step_store = self.get_empty_store()


INIT_ARGS = {}

ARGS = {
    'attn': torch.randn(2, 64, 4),
    'is_cross': True,
    'place_in_unet': 'mid'
}

METHOD = '__call__'

if __name__ == '__main__':
    store = CDAttentionStore(**INIT_ARGS)
    store(**ARGS)
    print("Execution successful")
    print(f"Step store keys: {store.step_store.keys()}")
    print(f"Stored attention shapes: {[attn.shape for attn in store.step_store[8.0]]}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
collate_fn Ran
ran; our contract draft was wrong, not the code
monalissaa/disendiff/src/diffusers_data_pipeline.py
code served (permissive licence) · get_code("31b8b7196c34d874")
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)

# Create example dictionaries that match what collate_fn expects
examples = [
    {
        'instance_prompt_ids': torch.tensor([[1, 2, 3, 4]]),  # shape (1, 4) for cat
        'instance_images': torch.randn(3, 8, 8),  # shape (3, 8, 8) for stack
        'mask': torch.ones(1, 8, 8),  # shape (1, 8, 8) for stack
        'class_prompt_ids': torch.tensor([[5, 6, 7, 8]]),
        'class_images': torch.randn(3, 8, 8),
        'class_mask': torch.ones(1, 8, 8),
    },
    {
        'instance_prompt_ids': torch.tensor([[9, 10, 11, 12]]),
        'instance_images': torch.randn(3, 8, 8),
        'mask': torch.ones(1, 8, 8),
        'class_prompt_ids': torch.tensor([[13, 14, 15, 16]]),
        'class_images': torch.randn(3, 8, 8),
        'class_mask': torch.ones(1, 8, 8),
    }
]

ARGS = {
    'examples': examples,
    'with_prior_preservation': 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 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 Ran
ran; our contract draft was wrong, not the code
monalissaa/disendiff/src/diffusers_data_pipeline.py
code served (permissive licence) · get_code("9a06e6a953d84b4d")
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 float, shape (8, 8, 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.

from PIL import Image
import numpy as np

# Create a small PIL Image object (3x4 RGB image)
image = Image.new('RGB', (3, 4), color=(100, 150, 200))

# Define parameters
scale = 8
resample = Image.BILINEAR

# Construct the arguments dictionary
ARGS = {
    'image': image,
    'scale': scale,
    'resample': resample
}
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 ndarray, ndim 3, dtype family float, shape (8, 8, 3) — shape (8, 8, 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
text_under_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
monalissaa/disendiff/sample.py
code served (permissive licence) · get_code("3ac63e51754d948b")
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 (120, 80, 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
from typing import Tuple

# Create a small valid image: height=100, width=80, channels=3 (RGB)
image = np.random.randint(0, 256, size=(100, 80, 3), dtype=np.uint8)

# Define text to place under the image
text = "Sample Text"

# Define text color as RGB tuple (blue in this case)
text_color = (255, 0, 0)

ARGS = {
    "image": image,
    "text": text,
    "text_color": text_color,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 (120, 80, 3) — shape (120, 80, 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
build_model Not yet run
unverified (harvested, no recorded run)
monalissaa/disendiff/clip/model.py
code served (permissive licence) · get_code("7ecaa1ab867d461d")
How it ran

no invocation recorded.

gdupdateWexact Not yet run
unverified (harvested, no recorded run)
monalissaa/disendiff/src/composenW.py
code served (permissive licence) · get_code("844fb2cc091364b4")
How it ran

no invocation recorded.

import_model_class_from_model_name_or_path Not yet run
unverified (harvested, no recorded run)
monalissaa/disendiff/src/diffusers_training.py
code served (permissive licence) · get_code("2f00b39db5a81466")
How it ran

no invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
monalissaa/disendiff/src/diffusers_training.py
code served (permissive licence) · get_code("3a8e786a49a73ff3")
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, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 4 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
build_model 119 other papers
58 dated earlier, 6 the same month, 48 later, 5 same year, order not determinable, 2 undated
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2104.14294 (2021-04)
Emerging Properties in Self-Supervised Vision Transformers
and 116 more not named here
import_model_class_from_model_name_or_path 24 other papers
10 dated earlier, 13 later, 1 same year, order not determinable
2212.04489 (2022-12)
SINE: SINgle Image Editing with Text-to-Image Diffusion Models
2306.06874 (2023-06)
VillanDiffusion: A Unified Backdoor Attack Framework for Diffusion Models
2306.07280 (2023-06)
Controlling Text-to-Image Diffusion by Orthogonal Finetuning
and 21 more not named here
text_under_image 14 other papers
8 dated earlier, 2 the same month, 3 later, 1 same year, order not determinable
2307.12493 (2023-07)
TF-ICON: Diffusion-Based Training-Free Cross-Domain Image Composition
2307.14352 (2023-07)
General Image-to-Image Translation with One-Shot Image Guidance
2309.14494 (2023-09)
Free-Bloom: Zero-Shot Text-to-Video Generator with LLM Director and LDM Animator
and 11 more not named here
collate_fn 2 other papers
2 later
2405.17532 (2024-05)
ClassDiffusion: More Aligned Personalization Tuning with Explicit Class Guidance
2412.15320 (2024-12)
Multi-concept Model Immunization through Differentiable Model Merging

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

𝑽 𝟏 * man and 𝑽 𝟐 * woman …wearing headphones …in times square Van Gogh style of … …with long beard 𝑽 𝟏 * man …wearing glasses …with the night sky Watercolor painting of… …with blond hair 𝑽 𝟐 * woman Inference Independent Concepts Inference Combined Concepts 𝑽 𝟏 * man and 𝑽 𝟐 * woman …wearing sunglasses …at a beach Manga drawing of… …shaking hands Figure 1. Given one individual image from specific users, our proposed method is capable of producing customized images for each concept contained in the input image, e.g., given a single input image with a man and a woman, our method excels in achieving innovative renditions of both combined (left) and independent (right) concepts, without compromising the fidelity and identity preservation, and more importantly, manifesting satisfactory interactive generation conditioned by various text prompts. Note that we employ notation V * i to denote the modifier of the i-th concept. Our code and data will be publicly available at: https://github.com/Monalissaa/DisenDiff.

For agents

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

get_harvested_code_for_paper("2403.18551")
get_code_for_paper("2403.18551")
have("2403.18551")

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

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

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

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

Connect an agent — have() is free.