SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2012.09841 · 2020

Taming Transformers for High-Resolution Image Synthesis

Robin Rombach, Patrick Esser

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2012.09841.json · badge: /api/ran/2012.09841.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
CompVis/taming-transformers canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
joanrod/ocr-vqgan extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
adopt_weight Ran
ran, honoured the contract we drafted
joanrod/ocr-vqgan/taming/modules/losses/vqperceptual.py
pointer only (licence: NONE) · get_code("7439a9d4c6be04b0")
How it ran

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

bchw_to_st Ran
ran; our contract draft was wrong, not the code
CompVis/taming-transformers/scripts/sample_conditional.py
code served (permissive licence) · get_code("6ca974beb2276abf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned ndarray, ndim 4, dtype family float, shape (2, 5, 7, 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 numpy as np

torch.manual_seed(0)

# Create a tensor in BCHW format (Batch, Channel, Height, Width)
# Using distinct dimensions: batch=2, channels=3, height=5, width=7
x = torch.randn(2, 3, 5, 7)

ARGS = {'x': x}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 4, dtype family float, shape (2, 5, 7, 3) — shape (2, 5, 7, 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
disabled_train Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from zhouc20/LatentGraphDiffusion
pointer only · get_code("4cb732f513d69dfd")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

hinge_d_loss Ran
ran; our contract draft was wrong, not the code
joanrod/ocr-vqgan/taming/modules/losses/vqperceptual.py
pointer only (licence: NONE) · get_code("22a83df891d750c6")
How it ran

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

single_image_to_torch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CompVis/taming-transformers/scripts/sample_conditional.py
code served (permissive licence) · get_code("d2bff574a971c670")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (1, 3, 6, 8) 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 image as a numpy array (height=6, width=8, channels=3)
# Simulating an RGB image with values in [0, 255]
image = np.random.randint(0, 256, size=(6, 8, 3), dtype=np.uint8)

ARGS = {
    'x': image,
    'permute': True
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 4, dtype family float, shape (1, 3, 6, 8) — shape (1, 3, 6, 8) 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
vanilla_d_loss Ran
ran; our contract draft was wrong, not the code
joanrod/ocr-vqgan/taming/modules/losses/vqperceptual.py
pointer only (licence: NONE) · get_code("263c54290c553ddd")
How it ran

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

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, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 later) and 2 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
disabled_train 173 other papers
173 later · 5 only as an assembly brick
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2112.02815 (2021-12)
Make It Move: Controllable Image-to-Video Generation with Text Descriptions
and 170 more not named here
hinge_d_loss 15 other papers
15 later
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
2305.13607 (2023-05)
Not All Image Regions Matter: Masked Vector Quantization for Autoregressive Image Generation
and 12 more not named here
vanilla_d_loss 11 other papers
11 later
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
2305.13607 (2023-05)
Not All Image Regions Matter: Masked Vector Quantization for Autoregressive Image Generation
and 8 more not named here
adopt_weight 9 other papers
1 dated earlier, 8 later
2004.13166 (2020-04)
A Disentangling Invertible Interpretation Network for Explaining Latent Representations
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
and 6 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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Designed to learn long-range interactions on sequential data, transformers continue to show state-of-the-art results on a wide variety of tasks. In contrast to CNNs, they contain no inductive bias that prioritizes local interactions. This makes them expressive, but also computationally infeasible for long sequences, such as high-resolution images. We demonstrate how combining the effectiveness of the inductive bias of CNNs with the expressivity of transformers enables them to model and thereby synthesize high-resolution images. We show how to (i) use CNNs to learn a contextrich vocabulary of image constituents, and in turn (ii) utilize transformers to efficiently model their composition within high-resolution images. Our approach is readily applied to conditional synthesis tasks, where both non-spatial information, such as object classes, and spatial information, such as segmentations, can control the generated image. In particular, we present the first results on semanticallyguided synthesis of megapixel images with transformers and obtain the state of the art among autoregressive models on class-conditional ImageNet. Code and pretrained models can be found at https://git.io/JnyvK.

For agents

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

get_harvested_code_for_paper("2012.09841")
get_code_for_paper("2012.09841")
have("2012.09841")

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

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

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

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

Connect an agent — have() is free.