SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12908 · NeurIPS · 2024

RealCompo: Balancing Realism and Compositionality Improves Text-to-Image Diffusion Models

Minkai Xu, Ling Yang, Yujiu Yang, Bin Cui, Ye Tian, Zhaochen Yu, Xinchen Zhang, Yaqi Cai, Kai-Ni Wang, Jiake Xie, Yong Tang

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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 0 have no contract verdict; 8 failures of our instrument; 3 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.12908.json · badge: /api/ran/2402.12908.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
yangling0818/realcompo canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
YangLing0818/RealCompo canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
mlpc-ucsd/TokenCompose community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
alpha_generator Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
YangLing0818/RealCompo/inference_layout.py
pointer only (licence: NONE) · get_code("b3e1f7172e4955ae")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, YangLing0818/RealCompo 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. A run is recorded.

diffusion_step Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yangling0818/realcompo/keypoint_model/attention.py
pointer only (licence: NONE); the stored copy get_code serves, from TFNTF/PostEdit, is pointer only (licence: NONE) · get_code("a042902caede448b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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. A run is recorded.

get_img Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yangling0818/realcompo/utils/loss_function.py
pointer only (licence: NONE) · get_code("19a9b6b29f7e63dc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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. A run is recorded.

get_img2 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yangling0818/realcompo/utils/loss_function.py
pointer only (licence: NONE) · get_code("3fdd69d43a21557a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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. A run is recorded.

get_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yangling0818/realcompo/utils/loss_function.py
pointer only (licence: NONE) · get_code("5fb5a9556099674c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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. A run is recorded.

latent2image Ran
ran; our contract draft was wrong, not the code
yangling0818/realcompo/keypoint_model/attention.py
pointer only (licence: NONE) · get_code("e3c3bb87bbe9b4a7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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. A run is recorded.

text_under_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yangling0818/realcompo/keypoint_model/attention.py
pointer only (licence: NONE) · get_code("fa11e1f8bcafb6d1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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. A run is recorded.

update_template Ran
ran; our contract draft was wrong, not the code
yangling0818/realcompo/get_layout.py
pointer only (licence: NONE) · get_code("b58e6fa98d3a254a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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. A run is recorded.

batch_to_device Not yet run
unverified (harvested, no recorded run)
YangLing0818/RealCompo/inference_layout.py
pointer only (licence: NONE) · get_code("6e5276dc429a7d87")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, YangLing0818/RealCompo 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.

get_layout Not yet run
unverified (harvested, no recorded run)
yangling0818/realcompo/get_layout.py
pointer only (licence: NONE) · get_code("0905b0289949b392")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yangling0818/realcompo 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.

register_attention_control Not yet run
unverified (harvested, no recorded run)
mlpc-ucsd/TokenCompose/train/src/attn_utils.py
code served (permissive licence) · get_code("858ea4d2ddf8fcae")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 3 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
text_under_image 14 other papers
6 dated earlier, 1 the same month, 6 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
latent2image 13 other papers
7 dated earlier, 1 the same month, 4 later, 1 same year, order not determinable
2305.15581 (2023-05)
Unsupervised Semantic Correspondence Using Stable Diffusion
2305.19164 (2023-05)
LANCE: Stress-testing Visual Models by Generating Language-guided Counterfactual Images
2308.06160 (2023-08)
DatasetDM: Synthesizing Data with Perception Annotations Using Diffusion Models
and 10 more not named here
diffusion_step 10 other papers
6 dated earlier, 3 later, 1 same year, order not determinable
2305.19164 (2023-05)
LANCE: Stress-testing Visual Models by Generating Language-guided Counterfactual Images
2308.06160 (2023-08)
DatasetDM: Synthesizing Data with Perception Annotations Using Diffusion Models
2309.14494 (2023-09)
Free-Bloom: Zero-Shot Text-to-Video Generator with LLM Director and LDM Animator
and 7 more not named here
alpha_generator 4 other papers
4 dated earlier
2305.15393 (2023-05)
LayoutGPT: Compositional Visual Planning and Generation with Large Language Models
2308.05095 (2023-08)
LayoutLLM-T2I: Eliciting Layout Guidance from LLM for Text-to-Image Generation
2310.01107 (2023-10)
Ground-A-Video: Zero-shot Grounded Video Editing using Text-to-image 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-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

Diffusion models have achieved remarkable advancements in text-to-image generation. However, existing models still have many difficulties when faced with multiple-object compositional generation. In this paper, we propose RealCompo, a new training-free and transferred-friendly text-to-image generation framework, which aims to leverage the respective advantages of text-to-image models and spatial-aware image diffusion models (e.g., layout, keypoints and segmentation maps) to enhance both realism and compositionality of the generated images. An intuitive and novel balancer is proposed to dynamically balance the strengths of the two models in denoising process, allowing plug-and-play use of any model without extra training. Extensive experiments show that our RealCompo consistently outperforms state-of-the-art text-to-image models and spatial-aware image diffusion models in multiple-object compositional generation while keeping satisfactory realism and compositionality of the generated images. Notably, our RealCompo can be seamlessly extended with a wide range of spatial-aware image diffusion models and stylized diffusion models.

For agents

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

get_harvested_code_for_paper("2402.12908")
get_code_for_paper("2402.12908")
have("2402.12908")

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

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

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

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

Connect an agent — have() is free.