SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.09399 · 2024

OmniTokenizer: A Joint Image-Video Tokenizer for Visual Generation

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 3 failures of our instrument; 0 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2406.09399.json · badge: /api/ran/2406.09399.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
foundationvision/omnitokenizer canonical (classifier label)
classifier basis: classifier_2025
4 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
divisible_by Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from ZhangXInFD/soundstorm-speechtokenizer
pointer only · get_code("856d86b39c6005b4")
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.

calculate_fvd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
foundationvision/omnitokenizer/evaluation/common_metrics_on_video_quality/calculate_fvd.py
code served (permissive licence) · get_code("07bca1f7d65cae68")
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 torch
import torch.nn as nn
from unittest.mock import Mock, patch

torch.manual_seed(0)

# Create mock I3D model that accepts video tensors
class MockI3D(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(1024, 400)
    
    def forward(self, x):
        # x shape: (batch, channel, time, height, width)
        # Return feature vectors of shape (batch, 400)
        batch_size = x.shape[0]
        return torch.randn(batch_size, 400)

# Create mock functions for FVD calculation
def mock_load_i3d_pretrained(device='cpu'):
    return MockI3D().to(device)

def mock_get_fvd_feats(videos, i3d, device='cpu'):
    # videos shape: (batch, channel, time, height, width)
    with torch.no_grad():
        feats = i3d(videos.to(device))
    return feats

def mock_frechet_distance(feats1, feats2):
    # Return a scalar FVD score
    return float(torch.mean((feats1 - feats2) ** 2).item())

# Patch the imports before defining ARGS
import sys
from unittest.mock import MagicMock

# Create mock modules
mock_styleganv_module = MagicMock()
mock_styleganv_module.get_fvd_feats = mock_get_fvd_feats
mock_styleganv_module.load_i3d_pretrained = mock_load_i3d_pretrained
mock_styleganv_module.frechet_distance = mock_frechet_distance

mock_videogpt_module = MagicMock()
mock_videogpt_module.load_i3d_pretrained = mock_load_i3d_pretrained
mock_videogpt_module.get_fvd_logits = mock_get_fvd_feats
mock_videogpt_module.frechet_distance = mock_frechet_distance

# Patch the module imports
sys.modules['common_metrics_on_video_quality'] = MagicMock()
sys.modules['common_metrics_on_video_quality.fvd'] = MagicMock()
sys.modules['common_metrics_on_video_quality.fvd.styleganv'] = MagicMock()
sys.modules['common_metrics_on_video_quality.fvd.styleganv.fvd'] = mock_styleganv_module
sys.modules['common_metrics_on_video_quality.fvd.videogpt'] = MagicMock()
sys.modules['common_metrics_on_video_quality.fvd.videogpt.fvd'] = mock_videogpt_module

# Create test video tensors
# Shape: (batch_size, channels, time, height, width)
# Using batch=2, channels=3, time=16, height=4, width=5 for distinct dimensions
videos1 = torch.randn(2, 3, 16, 4, 5)
videos2 = torch.randn(2, 3, 16, 4, 5)

ARGS = {
    'videos1': videos1,
    'videos2': videos2,
    'device': 'cpu',
    'method': 'styleganv'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
common_metrics_on_video_quality, torch, tqdm — 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
logits_laplace Ran
ran; our contract draft was wrong, not the code
foundationvision/omnitokenizer/OmniTokenizer/omnitokenizer.py
code served (permissive licence) · get_code("3cf68464859086b1")
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 0, dtype family float, shape () 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.functional as F

torch.manual_seed(0)

# x and x_recons should be tensors that can be added, multiplied, and compared
# The function performs element-wise operations and computes L1 loss
# So they should have the same shape and be float tensors

x = torch.randn(2, 4, dtype=torch.float32)
x_recons = torch.randn(2, 4, dtype=torch.float32)
logit_laplace_eps = 0.1

ARGS = {
    "x": x,
    "x_recons": x_recons,
    "logit_laplace_eps": logit_laplace_eps,
}
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 0, dtype family float, shape () — shape () 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
pair Ran
ran, honoured the contract we drafted
foundationvision/omnitokenizer/OmniTokenizer/omnitokenizer.py
code served (permissive licence) · get_code("6d5ab71931a90677")
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 tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

def pair(val):
    ret = (val, val) if not isinstance(val, tuple) else val
    assert len(ret) == 2
    return ret

ARGS = {
    "val": 5
}
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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
trans Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
foundationvision/omnitokenizer/evaluation/common_metrics_on_video_quality/calculate_fvd.py
code served (permissive licence) · get_code("33b7df59642bf5f9")
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 5, dtype family float, shape (2, 3, 1, 3, 5) 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)

# The function expects a tensor x with shape requirements:
# - x.shape[-3] can be 1 or 3 (it checks if it's 1 and repeats to 3)
# - x needs to be at least 5D to support permute(0, 2, 1, 3, 4)
# - x.permute expects dimensions: (batch, channel, depth, height, width)

# Create a 5D tensor with shape (batch=2, channels=1, depth=4, height=3, width=5)
# This will trigger the repeat branch since shape[-3] == 4 (depth) != 1
# Actually, let me reconsider: shape[-3] refers to the third-from-last dimension
# For shape (2, 1, 4, 3, 5): shape[-3] is 4 (not 1)
# For shape (2, 1, 1, 3, 5): shape[-3] is 1 (triggers repeat)

x = torch.randn(2, 1, 1, 3, 5)

ARGS = {
    "x": x
}
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 5, dtype family float, shape (2, 3, 1, 3, 5) — shape (2, 3, 1, 3, 5) 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 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 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
divisible_by 17 other papers
11 dated earlier, 6 later · 5 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2203.07852 (2022-03)
Block-Recurrent Transformers
and 14 more not named here
trans 3 other papers
3 later
2411.15262 (2024-11)
MovieBench: A Hierarchical Movie Level Dataset for Long Video Generation
2411.16468 (2024-11)
Efficient Video Face Enhancement with Enhanced Spatial-Temporal Consistency
2506.00329 (2025-06)
Foresight: Adaptive Layer Reuse for Accelerated and High-Quality Text-to-Video Generation
pair 1 other paper
1 later
2410.11758 (2024-10)
Latent Action Pretraining from Videos

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

Tokenizer, serving as a translator to map the intricate visual data into a compact latent space, lies at the core of visual generative models. Based on the finding that existing tokenizers are tailored to image or video inputs, this paper presents OmniTokenizer, a transformer-based tokenizer for joint image and video tokenization. OmniTokenizer is designed with a spatial-temporal decoupled architecture, which integrates window and causal attention for spatial and temporal modeling. To exploit the complementary nature of image and video data, we further propose a progressive training strategy, where OmniTokenizer is first trained on image data on a fixed resolution to develop the spatial encoding capacity and then jointly trained on image and video data on multiple resolutions to learn the temporal dynamics. OmniTokenizer, for the first time, handles both image and video inputs within a unified framework and proves the possibility of realizing their synergy. Extensive experiments demonstrate that OmniTokenizer achieves state-of-the-art (SOTA) reconstruction performance on various image and video datasets, e.g., 1.11 reconstruction FID on ImageNet and 42 reconstruction FVD on UCF-101, beating the previous SOTA methods by 13% and 26%, respectively. Additionally, we also show that when integrated with OmniTokenizer, both language model-based approaches and diffusion models can realize advanced visual synthesis performance, underscoring the superiority and versatility of our method. Code is available at https://github.com/FoundationVision/OmniTokenizer.

For agents

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

get_harvested_code_for_paper("2406.09399")
get_code_for_paper("2406.09399")
have("2406.09399")

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

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

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

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

Connect an agent — have() is free.