SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.12872 · NeurIPS · 2024

From Text to Pose to Image: Improving Diffusion Model Control and Quality

Clément Bonnet, Ariel Lee, Raive Franck, Wertel Raive, Antoine Tamano, Raive Tanguy, Cizain Raive, Pablo Raive

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 (3 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-23; 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/2411.12872.json · badge: /api/ran/2411.12872.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
clement-bonnet/text-to-pose canonical (classifier label)
classifier basis: classifier_2025
8 ran · 3 no recorded run
FunctionStatusWhere it lives
CausalSelfAttention Ran
ran on a synthesized input · constructed an object; no result was computed
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("023c96154955c6a3")
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 an instance of its own class, CausalSelfAttention: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create instance arguments for CausalSelfAttention
embed_dim = 8
num_heads = 2
dropout = 0.1

# Create the model instance
model = nn.Module()  # placeholder, will be replaced

# Create input tensor: (batch_size=2, sequence_length=4, embed_dim=8)
x = torch.randn(2, 4, 8)

# Create padding mask: (batch_size=2, sequence_length=4)
# True means position is valid, False means padding
padding_mask = torch.ones(2, 4, dtype=torch.bool)

ARGS = {
    'embed_dim': embed_dim,
    'num_heads': num_heads,
    'dropout': dropout,
}

# For forward method call, we need x and padding_mask
# But since the rules ask for __init__ parameters, ARGS above is correct
# If we need to test forward() as well:
forward_args = {
    'x': x,
    'padding_mask': padding_mask,
}
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 CausalSelfAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CausalSelfAttention 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
PoseBodiesDict Ran
ran on a synthesized input
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("0ba7b9be8f372eca")
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 numpy as np

# Create sample data for PoseBodiesDict
candidate = np.random.rand(2, 18, 3).astype(np.float32)  # batch_size=2, num_joints=18, (x,y,confidence)
subset = np.array([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1.0],
                    [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 2.0]], dtype=np.float32)

ARGS = {
    "candidate": candidate,
    "subset": subset
}
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 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
PoseDict Ran
ran on a synthesized input
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("f2654aebe02ac7c2")
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 numpy as np

# Construct the PoseBodiesDict
bodies_dict = {
    'candidate': np.random.rand(2, 4).astype(np.float32),
    'subset': np.random.rand(3, 5).astype(np.float32)
}

# Construct the PoseDict
ARGS = {
    'bodies': bodies_dict,
    'faces': np.random.rand(2, 6).astype(np.float32),
    'hands': np.random.rand(2, 7).astype(np.float32)
}
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 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
T2PSample Ran
ran on a synthesized input · constructed an object; no result was computed
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("a29bd54e5b52c32f")
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 an instance of its own class, T2PSample: the run constructed the object and did not call it, so no result was computed. 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)

# Create small tensors for each field
batch_size = 2
bbox_dim = 4
body_dim = 5
face_dim = 6
hand_dim = 7
pose_mask_dim = 8
image_ratio_dim = 3
input_ids_dim = 10

bboxes = torch.randn(batch_size, bbox_dim)
bodies = torch.randn(batch_size, body_dim)
faces = torch.randn(batch_size, face_dim)
hands = torch.randn(batch_size, hand_dim)
pose_mask = torch.randn(batch_size, pose_mask_dim)
image_ratio = torch.randn(batch_size, image_ratio_dim)
input_ids = torch.randint(0, 100, (batch_size, input_ids_dim))
uuid = "test-uuid-001"

ARGS = {
    "bboxes": bboxes,
    "bodies": bodies,
    "faces": faces,
    "hands": hands,
    "pose_mask": pose_mask,
    "image_ratio": image_ratio,
    "input_ids": input_ids,
    "uuid": uuid,
}
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 T2PSample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a T2PSample 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
TransformerLayer Ran
ran on a synthesized input · constructed an object; no result was computed
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("17aeb94103ec6da9")
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 an instance of its own class, TransformerLayer: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Define ARGS with all parameters for TransformerLayer
ARGS = {
    "embed_dim": 4,
    "num_heads": 2,
    "dropout": 0.1,
    "mlp_dim_factor": 2,
    "cross_embed_dim": 3,
}
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 TransformerLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerLayer 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_device Ran
ran, honoured the contract we drafted
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("0f906a50a669c77e")
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, 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 numpy as np

torch.manual_seed(0)

# Create a small tensor
tensor_input = torch.randn(2, 4)

# Create a small numpy array
numpy_input = np.random.randn(2, 4)

# Create a CPU device
device = torch.device('cpu')

# Optional dtype
dtype = torch.float32

ARGS = {
    'x': tensor_input,
    'device': device,
    'dtype': dtype
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
_to_numpy Ran
ran, honoured the contract we drafted
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("4622271331855d00")
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 (2, 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 numpy as np

torch.manual_seed(0)

# The function takes one parameter 'x' which can be either a torch.Tensor or np.ndarray
# It checks the type and calls .cpu().numpy() if it's a Tensor, otherwise returns as-is

# Test case 1: torch.Tensor (most complex case - exercises the isinstance and .cpu().numpy() path)
tensor_input = torch.randn(2, 4)

# Test case 2: numpy.ndarray (exercises the else path)
numpy_input = np.random.randn(2, 4)

ARGS = {
    "x": tensor_input
}
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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
_unsqueeze Ran
ran; our contract draft was wrong, not the code
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("0d31a62464b7a4b6")
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 3, dtype family float, shape (1, 2, 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 numpy as np

torch.manual_seed(0)

# Create a small torch tensor
torch_tensor = torch.randn(2, 4)

# Create a small numpy array
numpy_array = np.random.randn(2, 4)

# Test with torch tensor
ARGS = {
    "x": torch_tensor,
    "dim": 0
}
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 3, dtype family float, shape (1, 2, 4) — shape (1, 2, 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
T2PTransformer Not yet run
unverified (harvested, no recorded run)
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("f245bd7aee3e82c1")
How it ran

no invocation recorded.

tempered_sampling Not yet run
unverified (harvested, no recorded run)
clement-bonnet/text-to-pose/t2p/sampling.py
code served (permissive licence) · get_code("3772a310fcc48bc7")
How it ran

no invocation recorded.

tempered_sampling Not yet run
unverified (harvested, no recorded run)
clement-bonnet/text-to-pose/t2p/model.py
code served (permissive licence) · get_code("363591a993ed83b2")
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 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

In the last two years, text-to-image diffusion models have become extremely popular. As their quality and usage increase, a major concern has been the need for better output control. In addition to prompt engineering, one effective method to improve the controllability of diffusion models has been to condition them on additional modalities such as image style, depth map, or keypoints. This forms the basis of ControlNets or Adapters. When attempting to apply these methods to control human poses in outputs of text-to-image diffusion models, two main challenges have arisen. The first challenge is generating poses following a wide range of semantic text descriptions, for which previous methods involved searching for a pose within a dataset of (caption, pose) pairs. The second challenge is conditioning image generation on a specified pose while keeping both high aesthetic and high pose fidelity. In this article, we fix these two main issues by introducing a text-to-pose (T2P) generative model alongside a new sampling algorithm, and a new pose adapter that incorporates more pose keypoints for higher pose fidelity. Together, these two new state-of-the-art models enable, for the first time, a generative text-to-pose-to-image framework for higher pose control in diffusion models. We release all models and the code used for the experiments at https://github.com/clement-bonnet/text-to-pose.

For agents

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

get_harvested_code_for_paper("2411.12872")
get_code_for_paper("2411.12872")
have("2411.12872")

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

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

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

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

Connect an agent — have() is free.