SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.12557 · 2024

One Step Diffusion via Shortcut Models

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 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/2410.12557.json · badge: /api/ran/2410.12557.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
kvfrans/shortcut-models canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
leffff/FlowModels extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
generate Ran
ran; our contract draft was wrong, not the code
leffff/FlowModels/flow_models/generation.py
code served (permissive licence) · get_code("950ef8f57521a359")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class MockDiffusionModel(nn.Module):
    def __init__(self, latent_dim=4, hidden_dim=8):
        super().__init__()
        self.linear = nn.Linear(latent_dim + 1, latent_dim)  # x_t + t
    
    def forward(self, x_t, t, encoder_hidden_states=None):
        # x_t shape: (bs, latent_dim)
        # t shape: (bs,)
        # encoder_hidden_states: (bs, seq_len, hidden_dim)
        bs = x_t.shape[0]
        t_expanded = t.unsqueeze(-1)  # (bs, 1)
        x_t_with_t = torch.cat([x_t, t_expanded], dim=-1)  # (bs, latent_dim + 1)
        output = self.linear(x_t_with_t)  # (bs, latent_dim)
        
        # Return an object with .sample attribute
        class Output:
            def __init__(self, sample):
                self.sample = sample
        
        return Output(output)

# Build a minimal VAE decoder that satisfies the function's usage
class MockVAEDecoder(nn.Module):
    def __init__(self, latent_dim=4, image_channels=3):
        super().__init__()
        self.linear = nn.Linear(latent_dim, latent_dim)
    
    def decode(self, x):
        # x shape: (bs, latent_dim)
        output = self.linear(x)  # (bs, latent_dim)
        
        # Return an object with .sample attribute
        class Output:
            def __init__(self, sample):
                self.sample = sample
        
        return Output(output)

# Instantiate models
model = MockDiffusionModel(latent_dim=4, hidden_dim=8)
vae = MockVAEDecoder(latent_dim=4, image_channels=3)

# Create input tensors
batch_size = 2
latent_dim = 4
seq_len = 5
hidden_dim = 8

x_0 = torch.randn(batch_size, latent_dim)
encoder_hidden_states = torch.randn(batch_size, seq_len, hidden_dim)

ARGS = {
    'model': model,
    'vae': vae,
    'x_0': x_0,
    'encoder_hidden_states': encoder_hidden_states,
    'n_steps': 10,
    'device': 'cpu'
}
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 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
generate_euler Ran
ran; our contract draft was wrong, not the code
leffff/FlowModels/flow_models/generation.py
code served (permissive licence) · get_code("308823fac3064b2c")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that matches the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x_t, t_prev, encoder_hidden_states=None):
        # The function calls .sample on the output
        # So we need to return an object with a .sample attribute
        output = self.linear(x_t)
        
        class Output:
            def __init__(self, sample):
                self.sample = sample
        
        return Output(output)

# Build a minimal VAE that matches the function's usage
class MinimalVAE(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def decode(self, x):
        # The function calls .sample on the decode output
        output = self.linear(x)
        
        class Output:
            def __init__(self, sample):
                self.sample = sample
        
        return Output(output)

model = MinimalModel()
vae = MinimalVAE()

# x_0: batch_size=2, latent_dim=4
x_0 = torch.randn(2, 4)

# encoder_hidden_states: batch_size=2, seq_len=3, hidden_dim=5
encoder_hidden_states = torch.randn(2, 3, 5)

ARGS = {
    'model': model,
    'vae': vae,
    'x_0': x_0,
    'encoder_hidden_states': encoder_hidden_states,
    'n_steps': 10,
    'device': 'cpu'
}
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 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
generate_midpoint Ran
ran; our contract draft was wrong, not the code
leffff/FlowModels/flow_models/generation.py
code served (permissive licence) · get_code("3c249ceb7aed3145")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

class MockDiffusionModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t, encoder_hidden_states=None):
        # Returns an object with .sample attribute
        output = self.linear(x)
        class Output:
            def __init__(self, sample):
                self.sample = sample
        return Output(output)

class MockVAE(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def decode(self, x):
        output = self.linear(x)
        class Output:
            def __init__(self, sample):
                self.sample = sample
        return Output(output)

model = MockDiffusionModel()
vae = MockVAE()
x_0 = torch.randn(2, 4)  # batch_size=2, latent_dim=4
encoder_hidden_states = torch.randn(2, 3, 5)  # batch_size=2, seq_len=3, hidden_dim=5
n_steps = 10
device = 'cpu'

ARGS = {
    'model': model,
    'vae': vae,
    'x_0': x_0,
    'encoder_hidden_states': encoder_hidden_states,
    'n_steps': n_steps,
    'device': device,
}
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 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
modulate Ran
ran, violated the contract we drafted
kvfrans/shortcut-models/model.py
code served (permissive licence) · get_code("8bc124524abd3bbc")
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 torch.nn as nn

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# x: shape (2, 4) - batch size 2, feature dimension 4
x = torch.randn(2, 4)

# shift: shape (2,) - batch size 2, one shift value per sample
shift = torch.randn(2)

# scale: shape (2,) - batch size 2, one scale value per sample
scale = torch.randn(2)

ARGS = {
    "x": x,
    "shift": shift,
    "scale": scale,
}
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 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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 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
generate 1 other paper
1 dated earlier
2309.06380 (2023-09)
InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation
modulate 1 other paper
1 dated earlier
2406.05753 (2024-06)
Grounding Continuous Representations in Geometry: Equivariant Neural Fields

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

Diffusion models and flow-matching models have enabled generating diverse and realistic images by learning to transfer noise to data. However, sampling from these models involves iterative denoising over many neural network passes, making generation slow and expensive. Previous approaches for speeding up sampling require complex training regimes, such as multiple training phases, multiple networks, or fragile scheduling. We introduce shortcut models, a family of generative models that use a single network and training phase to produce high-quality samples in a single or multiple sampling steps. Shortcut models condition the network not only on the current noise level but also on the desired step size, allowing the model to skip ahead in the generation process. Across a wide range of sampling step budgets, shortcut models consistently produce higher quality samples than previous approaches, such as consistency models and reflow. Compared to distillation, shortcut models reduce complexity to a single network and training phase and additionally allow varying step budgets at inference time.

For agents

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

get_harvested_code_for_paper("2410.12557")
get_code_for_paper("2410.12557")
have("2410.12557")

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

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

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

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

Connect an agent — have() is free.