SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.18128 · NeurIPS · 2024

FlowTurbo: Towards Real-time Flow-Based Image Generation with Velocity Refiner

Wenliang Zhao, Jiwen Lu, Jie Zhou, Xumin Yu, Minglei Shi

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 5 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/2409.18128.json · badge: /api/ran/2409.18128.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
shiml20/FlowTurbo canonical (classifier label)
classifier basis: census
6 ran · 5 no recorded run
FunctionStatusWhere it lives
expand_t_like_x Ran
ran; our contract draft was wrong, not the code
shiml20/FlowTurbo/transport/path.py
pointer only (licence: MIT); the stored copy get_code serves, from poppuppy/secant-expectation, is pointer only (licence: NONE) · get_code("6de57ffd4ee7fee7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from poppuppy/secant-expectation, and GitHub detected no licence in that repository 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_2d_sincos_pos_embed Ran
ran, honoured the contract we drafted
shiml20/FlowTurbo/models_assemble.py
code served (permissive licence) · get_code("c92c27c924b517e8")
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) and returned ndarray, ndim 2, dtype family float, shape (18, 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 numpy as np

# Define ARGS dict with all parameters for get_2d_sincos_pos_embed
ARGS = {
    "embed_dim": 8,
    "grid_size": 4,
    "cls_token": True,
    "extra_tokens": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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 (18, 8) — shape (18, 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
log_state Ran
ran; our contract draft was wrong, not the code
shiml20/FlowTurbo/transport/utils.py
code served (permissive licence) · get_code("e0c9eec71fe93415")
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 str. 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)

# The function log_state takes a state dict and formats it for logging
# It iterates through sorted items and checks if values are objects
# We need to create a state dict with various types of values

class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a state dict with mixed types
state = {
    'model': SimpleModule(),
    'epoch': 42,
    'loss': 3.14159,
    'accuracy': 0.95,
    'batch_size': 32,
    'learning_rate': 0.001,
    'tensor': torch.randn(2, 4),
    'list': [1, 2, 3],
    'string': 'training_run_1',
    'dict_config': {'hidden_dim': 128, 'num_layers': 2},
}

ARGS = {
    'state': state
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
mean_flat Ran
ran; our contract draft was wrong, not the code
shiml20/FlowTurbo/transport/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from poppuppy/secant-expectation, is pointer only (licence: NONE) · get_code("b883daa24762cb05")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from poppuppy/secant-expectation, and GitHub detected no licence in that repository 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.

modulate Ran
ran; our contract draft was wrong, not the code
shiml20/FlowTurbo/models_assemble.py
code served (permissive licence) · get_code("03310bba324ae4fb")
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) 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

torch.manual_seed(0)

# Create small tensors for the modulate function
# x: input tensor with shape (batch_size, feature_dim)
x = torch.randn(2, 4)

# shift: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
shift = torch.randn(2)

# scale: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
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
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
read_statistics Ran
ran; our contract draft was wrong, not the code
shiml20/FlowTurbo/evaluation/fid.py
code served (permissive licence) · get_code("93ea18994bb3e8f9")
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 FIDStatistics. 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
import tempfile
import os

# Create a temporary directory and NPZ file with valid statistics
temp_dir = tempfile.mkdtemp()
npz_path = os.path.join(temp_dir, "test_statistics.npz")

# Create sample statistics data
mu = np.random.randn(4).astype(np.float32)
sigma = np.random.randn(4, 4).astype(np.float32)
sigma = sigma @ sigma.T  # Make it positive semi-definite

# Save to NPZ file
np.savez(npz_path, mu=mu, sigma=sigma)

ARGS = {
    "npz_path": npz_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FIDStatistics — a FIDStatistics output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FIDStatistics 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
create_npz_from_sample_folder Not yet run
unverified (harvested, no recorded run)
shiml20/FlowTurbo/sample_ddp_feature.py
code served (permissive licence) · get_code("fa92e506df16d054")
How it ran

no invocation recorded.

download_model Not yet run
unverified (harvested, no recorded run)
shiml20/FlowTurbo/download.py
code served (permissive licence) · get_code("bea8b7f1f4c6354b")
How it ran

no invocation recorded.

find_model Not yet run
unverified (harvested, no recorded run)
shiml20/FlowTurbo/download.py
code served (permissive licence) · get_code("f53716a25095cc3c")
How it ran

no invocation recorded.

get_2d_sincos_pos_embed_from_grid Not yet run
unverified (harvested, no recorded run)
shiml20/FlowTurbo/models_assemble.py
code served (permissive licence) · get_code("665d8a4e8f673a4c")
How it ran

no invocation recorded.

none_or_str Not yet run
unverified (harvested, no recorded run)
shiml20/FlowTurbo/train_utils.py
code served (permissive licence) · get_code("2fc6fdb85f13dc41")
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, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 4 the same month, 7 later) and 3 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
get_2d_sincos_pos_embed_from_grid 190 other papers
111 dated earlier, 8 the same month, 70 later, 1 same year, order not determinable · 65 only as an assembly brick
1807.10221 (2018-07)
Unified Perceptual Parsing for Scene Understanding
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 187 more not named here
modulate 101 other papers
43 dated earlier, 5 the same month, 52 later, 1 undated · 29 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
and 98 more not named here
get_2d_sincos_pos_embed 69 other papers
31 dated earlier, 2 the same month, 36 later · 12 only as an assembly brick
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
2303.14389 (2023-03)
Masked Diffusion Transformer is a Strong Image Synthesizer
and 66 more not named here
none_or_str 16 other papers
9 dated earlier, 1 the same month, 6 later
1810.01845 (2018-10)
Task-Oriented Hand Motion Retargeting for Dexterous Manipulation Imitation
1909.10893 (2019-09)
Recurrent Independent Mechanisms
2109.11251 (2021-09)
Trust Region Policy Optimisation in Multi-Agent Reinforcement Learning
and 13 more not named here
expand_t_like_x 5 other papers
3 dated earlier, 2 later
2401.08740 (2024-01)
SiT: Exploring Flow and Diffusion-based Generative Models with Scalable Interpolant Transformers
2403.13802 (2024-03)
ZigMa: A DiT-style Zigzag Mamba Diffusion Model
2408.05710 (2024-08)
Efficient Diffusion Transformer with Step-wise Dynamic Attention Mediators
and 2 more not named here
mean_flat 4 other papers
2 dated earlier, 2 later
2401.08740 (2024-01)
SiT: Exploring Flow and Diffusion-based Generative Models with Scalable Interpolant Transformers
2408.05710 (2024-08)
Efficient Diffusion Transformer with Step-wise Dynamic Attention Mediators
2503.21758 (2025-03)
Lumina-Image 2.0: A Unified and Efficient Image Generative Framework
and 1 more not named here
log_state 3 other papers
2 dated earlier, 1 later
2401.08740 (2024-01)
SiT: Exploring Flow and Diffusion-based Generative Models with Scalable Interpolant Transformers
2408.05710 (2024-08)
Efficient Diffusion Transformer with Step-wise Dynamic Attention Mediators
2503.21758 (2025-03)
Lumina-Image 2.0: A Unified and Efficient Image Generative Framework
download_model 1 other paper
1 dated earlier
2401.08740 (2024-01)
SiT: Exploring Flow and Diffusion-based Generative Models with Scalable Interpolant Transformers

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

Building on the success of diffusion models in visual generation, flow-based models reemerge as another prominent family of generative models that have achieved competitive or better performance in terms of both visual quality and inference speed. By learning the velocity field through flow-matching, flow-based models tend to produce a straighter sampling trajectory, which is advantageous during the sampling process. However, unlike diffusion models for which fast samplers are well-developed, efficient sampling of flow-based generative models has been rarely explored. In this paper, we propose a framework called FlowTurbo to accelerate the sampling of flow-based models while still enhancing the sampling quality. Our primary observation is that the velocity predictor's outputs in the flow-based models will become stable during the sampling, enabling the estimation of velocity via a lightweight velocity refiner. Additionally, we introduce several techniques including a pseudo corrector and sample-aware compilation to further reduce inference time. Since FlowTurbo does not change the multi-step sampling paradigm, it can be effectively applied for various tasks such as image editing, inpainting, etc. By integrating FlowTurbo into different flow-based models, we obtain an acceleration ratio of 53.1%∼58.3% on class-conditional generation and 29.8%∼38.5% on text-to-image generation. Notably, FlowTurbo reaches an FID of 2.12 on ImageNet with 100 (ms / img) and FID of 3.93 with 38 (ms / img), achieving the real-time image generation and establishing the new state-of-the-art. Code is available at https://github.com/shiml20/FlowTurbo.

For agents

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

get_harvested_code_for_paper("2409.18128")
get_code_for_paper("2409.18128")
have("2409.18128")

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

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

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

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

Connect an agent — have() is free.