SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.10772 · ICCV · 2025

FlowTok: Flowing Seamlessly Across Text and Image Tokens

Qihang Yu, Liang-Chieh Chen, Qihao Liu, Ju He

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 3 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/2503.10772.json · badge: /api/ran/2503.10772.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
bytedance/1d-tokenizer marked official in Papers with Code
Papers with Code archive
6 ran · 3 no recorded run
FunctionStatusWhere it lives
Conv2dSame Ran
ran on a synthesized input · constructed an object; no result was computed
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("9c740c7fb2d9eb1a")
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, Conv2dSame: 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
import math

torch.manual_seed(0)

# Conv2dSame is a subclass of nn.Conv2d, so we need to provide all Conv2d parameters
# The __init__ signature of nn.Conv2d is:
# Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, 
#        groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)

ARGS = {
    'in_channels': 3,
    'out_channels': 16,
    'kernel_size': 3,
    'stride': 1,
    'padding': 0,
    'dilation': 1,
    'groups': 1,
    'bias': True,
    'padding_mode': 'zeros',
    'device': None,
    'dtype': None,
}
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 Conv2dSame — 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 Conv2dSame 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
DiagonalGaussianDistribution Ran
ran on a synthesized input · constructed an object; no result was computed
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("656f15a0445c5293")
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, DiagonalGaussianDistribution: the run constructed the object and did not call it, so no result was computed. 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 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 a small parameters tensor with shape [B, 2*C, *]
# B=2 (batch size), C=4 (embedding dimension), so 2*C=8
# Adding spatial dimensions for completeness: [2, 8, 3]
batch_size = 2
embedding_dim = 4
spatial_dim = 3

parameters = torch.randn(batch_size, 2 * embedding_dim, spatial_dim)

ARGS = {
    "parameters": parameters,
    "deterministic": False,
}
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 DiagonalGaussianDistribution — 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 DiagonalGaussianDistribution 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
ResidualAttentionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("f9805e2cf90696a2")
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, ResidualAttentionBlock: 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
from collections import OrderedDict

torch.manual_seed(0)

# Define ARGS dict with all parameters for ResidualAttentionBlock.__init__
ARGS = {
    'd_model': 4,
    'n_head': 2,
    'mlp_ratio': 4.0,
    'act_layer': nn.GELU,
    'norm_layer': nn.LayerNorm,
}
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 ResidualAttentionBlock — 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 ResidualAttentionBlock 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
ResnetBlock Ran
ran on a synthesized input · constructed an object; no result was computed
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("34247def2368ea75")
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, ResnetBlock: 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
import math
import torch.nn.functional as F

torch.manual_seed(0)

class Conv2dSame(nn.Conv2d):

    def calc_same_pad(self, i: int, k: int, s: int, d: int) -> int:
        return max((math.ceil(i / s) - 1) * s + (k - 1) * d + 1 - i, 0)

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        ih, iw = x.size()[-2:]
        pad_h = self.calc_same_pad(i=ih, k=self.kernel_size[0], s=self.stride[0], d=self.dilation[0])
        pad_w = self.calc_same_pad(i=iw, k=self.kernel_size[1], s=self.stride[1], d=self.dilation[1])
        if pad_h > 0 or pad_w > 0:
            x = F.pad(x, [pad_w // 2, pad_w - pad_w // 2, pad_h // 2, pad_h - pad_h // 2])
        return super().forward(x)

class ResnetBlock(nn.Module):

    def __init__(self, in_channels: int, out_channels: int=None, dropout_prob: float=0.0):
        super().__init__()
        self.in_channels = in_channels
        self.out_channels = out_channels
        self.out_channels_ = self.in_channels if self.out_channels is None else self.out_channels
        self.norm1 = nn.GroupNorm(num_groups=32, num_channels=in_channels, eps=1e-06, affine=True)
        self.conv1 = Conv2dSame(self.in_channels, self.out_channels_, kernel_size=3, bias=False)
        self.norm2 = nn.GroupNorm(num_groups=32, num_channels=self.out_channels_, eps=1e-06, affine=True)
        self.dropout = nn.Dropout(dropout_prob)
        self.conv2 = Conv2dSame(self.out_channels_, self.out_channels_, kernel_size=3, bias=False)
        if self.in_channels != self.out_channels_:
            self.nin_shortcut = Conv2dSame(self.out_channels_, self.out_channels_, kernel_size=1, bias=False)

    def forward(self, hidden_states):
        residual = hidden_states
        hidden_states = self.norm1(hidden_states)
        hidden_states = F.silu(hidden_states)
        hidden_states = self.conv1(hidden_states)
        hidden_states = self.norm2(hidden_states)
        hidden_states = F.silu(hidden_states)
        hidden_states = self.dropout(hidden_states)
        hidden_states = self.conv2(hidden_states)
        if self.in_channels != self.out_channels_:
            residual = self.nin_shortcut(hidden_states)
        return hidden_states + residual

ARGS = {
    "in_channels": 32,
    "out_channels": 64,
    "dropout_prob": 0.1,
}
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 ResnetBlock — 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 ResnetBlock 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
TiTokDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("b3a00367dff48d07")
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, TiTokDecoder: 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
from collections import OrderedDict

torch.manual_seed(0)

class MockConfig:
    def __init__(self):
        self.dataset = MockDatasetConfig()
        self.model = MockModelConfig()

class MockDatasetConfig:
    def __init__(self):
        self.preprocessing = MockPreprocessingConfig()

class MockPreprocessingConfig:
    def __init__(self):
        self.crop_size = 16

class MockModelConfig:
    def __init__(self):
        self.vq_model = MockVQModelConfig()

class MockVQModelConfig:
    def __init__(self):
        self.vit_dec_patch_size = 4
        self.vit_dec_model_size = 'small'
        self.num_latent_tokens = 4
        self.token_size = 8
        self.is_legacy = True
    
    def get(self, key, default=None):
        if key == 'is_legacy':
            return self.is_legacy
        return default

config = MockConfig()

ARGS = {
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TiTokDecoder — 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 TiTokDecoder 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
VectorQuantizer Ran
ran on a synthesized input · constructed an object; no result was computed
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("c604f5049ddf0f34")
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, VectorQuantizer: the run constructed the object and did not call it, so no result was computed. 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 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 a minimal VectorQuantizer instance
vq = nn.Module()

# Define ARGS - all parameters for VectorQuantizer.__init__
ARGS = {
    'codebook_size': 16,
    'token_size': 8,
    'commitment_cost': 0.25,
    'use_l2_norm': False,
    'clustering_vq': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
accelerate, einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VectorQuantizer — 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 VectorQuantizer 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
TiTok Not yet run
unverified (harvested, no recorded run)
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("2f5ef3dff7b3cad2")
How it ran

no invocation recorded.

TiTokEncoder Not yet run
unverified (harvested, no recorded run)
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("f96834950f20c5e0")
How it ran

no invocation recorded.

UpsamplingBlock Not yet run
unverified (harvested, no recorded run)
bytedance/1d-tokenizer/modeling/titok.py
code served (permissive licence) · get_code("66a99516de4e95bd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 3 the same month, 3 later) and 6 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
Conv2dSame
brick of this paper's assembly: helper
2 other papers
1 the same month, 1 later · 1 only as an assembly brick
2503.13026 (2025-03)
HiMTok: Learning Hierarchical Mask Tokens for Image Segmentation with Large Multimodal Model
2601.03955 (2026-01)
ResTok: Learning Hierarchical Residuals in 1D Visual Tokenizers for Autoregressive Image Generation
ResnetBlock
brick of this paper's assembly: helper
2 other papers
1 the same month, 1 later · 1 only as an assembly brick
2503.13026 (2025-03)
HiMTok: Learning Hierarchical Mask Tokens for Image Segmentation with Large Multimodal Model
2601.03955 (2026-01)
ResTok: Learning Hierarchical Residuals in 1D Visual Tokenizers for Autoregressive Image Generation
UpsamplingBlock
brick of this paper's assembly: helper
2 other papers
1 the same month, 1 later · 1 only as an assembly brick
2503.13026 (2025-03)
HiMTok: Learning Hierarchical Mask Tokens for Image Segmentation with Large Multimodal Model
2601.03955 (2026-01)
ResTok: Learning Hierarchical Residuals in 1D Visual Tokenizers for Autoregressive Image Generation

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

html Figure 1. Text-to-Image Generation Results by FlowTok. FlowTok projects both text and images into a unified, compact 1D latent space, enabling direct flow matching between 1D tokens and facilitating the efficient generation of diverse, high-fidelity images.

For agents

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

get_harvested_code_for_paper("2503.10772")
get_code_for_paper("2503.10772")
have("2503.10772")

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

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

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

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

Connect an agent — have() is free.