SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.05199 · 2022

MAGVIT: Masked Generative Video Transformer

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 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, 0 violated it and 9 have no contract verdict; 1 failure of our instrument; 0 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/2212.05199.json · badge: /api/ran/2212.05199.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
google-research/magvit canonical (classifier label)
classifier basis not recorded on the link
10 ran · 0 no recorded run
FunctionStatusWhere it lives
frame_interpolation_cond Ran
ran on a synthesized input
google-research/magvit/videogvt/train_lib/cond_utils.py
code served (permissive licence) · get_code("1a792a8e5a6e134c")
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 jax.numpy as jnp

# Create minimal valid arguments for frame_interpolation_cond
batch_size = 2
num_frames = 10
height = 4
width = 3
channels = 5
cond_frames = 2
cond_latent_frames = 1
latent_t = 8
latent_h = 2
latent_w = 2

# Construct input_video: [batch, T, H, W, C]
input_video = jnp.ones((batch_size, num_frames, height, width, channels), dtype=jnp.float32)

# Define all keyword arguments
ARGS = {
    'input_video': input_video,
    'cond_frames': cond_frames,
    'cond_padding': 'interpolate',
    'cond_latent_frames': cond_latent_frames,
    'latent_shape': (latent_t, latent_h, latent_w),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
frame_prediction_cond Ran
ran on a synthesized input
google-research/magvit/videogvt/train_lib/cond_utils.py
code served (permissive licence) · get_code("0f46f383ab81bf4b")
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 jax.numpy as jnp
import jax

jax.config.update("jax_platform_name", "cpu")

# Construct minimal valid arguments
batch_size = 2
time_steps = 8
height = 4
width = 3
channels = 2
latent_time = 4
latent_height = 2
latent_width = 2

# Create input video: [batch, T, H, W, C]
input_video = jnp.ones((batch_size, time_steps, height, width, channels), dtype=jnp.float32)

# Number of condition frames (must be > 0 and < t)
cond_frames = 3

# Padding method for masked frames
cond_padding = "constant"

# Number of latent frames as condition
cond_latent_frames = 2

# 3D shape of latent code [L_T, L_H, L_W]
latent_shape = (latent_time, latent_height, latent_width)

# Whether condition is prefix or inside latent code
prefix_condition = False

ARGS = {
    "input_video": input_video,
    "cond_frames": cond_frames,
    "cond_padding": cond_padding,
    "cond_latent_frames": cond_latent_frames,
    "latent_shape": latent_shape,
    "prefix_condition": prefix_condition,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
get_norm_layer Ran
ran on a synthesized input
google-research/magvit/videogvt/models/model_utils.py
code served (permissive licence) · get_code("b87899e786e53909")
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 partial. 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 functools
import jax
import jax.numpy as jnp
from jax import random
import flax.linen as nn

# Test the function with different norm_type values
ARGS = {
    'norm_type': 'LN',
    'dtype': jnp.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
l2_normalize Ran
ran; our contract draft was wrong, not the code
google-research/magvit/videogvt/models/vqvae.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from google-research/xmcgan_image_generation, is pointer only (licence: NONE) · get_code("6355c1dcf1ced438")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from google-research/xmcgan_image_generation, 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.

latent_frame_prediction_cond Ran
ran on a synthesized input
google-research/magvit/videogvt/train_lib/cond_utils.py
code served (permissive licence) · get_code("d73c517c7648170b")
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 jax.numpy as jnp

# Construct input_video: shape (bs, t, h, w, c)
# Using tiny dimensions: batch=2, time=3, height=4, width=5, channels=3
bs, t, h, w, c = 2, 3, 4, 5, 3
input_video = jnp.ones((bs, t, h, w, c), dtype=jnp.float32)

# Construct latent_shape: tuple of (latent_time, latent_height, latent_width)
# Using distinct sizes: 6, 7, 8
latent_shape = (6, 7, 8)

# Construct cond_latent_frames: number of conditioning frames
cond_latent_frames = 2

ARGS = {
    'input_video': input_video,
    'cond_latent_frames': cond_latent_frames,
    'latent_shape': latent_shape,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
sinusoidal_init Ran
ran on a synthesized input
google-research/magvit/videogvt/models/transformer_lm.py
code served (permissive licence) · get_code("0fd41694a130f120")
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 function. 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 jax.numpy as jnp

# Define ARGS dictionary with all parameters for sinusoidal_init
ARGS = {
    "max_len": 512,
    "min_scale": 1.0,
    "max_scale": 10000.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
tensorflow_style_avg_pooling Ran
ran on a synthesized input
google-research/magvit/videogvt/models/model_utils.py
code served (permissive licence) · get_code("38e696a22dc81a6f")
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 ArrayImpl, ndim 4, dtype family float, shape (2, 2, 1, 1) 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 jax
import jax.numpy as jnp

# Set seed for reproducibility
jax.config.update('jax_platform_name', 'cpu')

# Create a small input tensor: (batch=2, height=4, width=3, channels=1)
x = jnp.ones((2, 4, 3, 1), dtype=jnp.float32)

# Define window shape for 2D pooling: (height=2, width=2)
window_shape = (2, 2)

# Define strides to match window dimensions: (stride_h=2, stride_w=2)
strides = (2, 2)

# Define padding mode
padding = 'VALID'

ARGS = {
    'x': x,
    'window_shape': window_shape,
    'strides': strides,
    'padding': padding
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 4, dtype family float, shape (2, 2, 1, 1) — shape (2, 2, 1, 1) 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
truncated_normal Ran
ran on a synthesized input
google-research/magvit/videogvt/models/simplified_bert.py
code served (permissive licence) · get_code("4d2dd72078f90cca")
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 function. 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 jax
import jax.numpy as jnp

# Set seed for reproducibility
key = jax.random.PRNGKey(0)

# Define arguments for truncated_normal function
ARGS = {
    "stddev": 0.5,
    "dtype": jnp.float32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
truncated_normal Ran
ran on a synthesized input
google-research/magvit/videogvt/models/t5_bert.py
code served (permissive licence) · get_code("0c839479ca2b7173")
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 function. 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 jax
import jax.numpy as jnp

# Create the ARGS dictionary with valid arguments for truncated_normal
ARGS = {
    "stddev": 0.5,
    "dtype": jnp.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
vmap_t_dim Ran
ran on a synthesized input
google-research/magvit/videogvt/models/model_utils.py
code served (permissive licence) · get_code("ac4f595178d50862")
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 type. 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 flax.linen as nn
from typing import Type

# Define a minimal nn.Module to pass to vmap_t_dim
class SimpleModel(nn.Module):
    """Minimal Flax model for testing vmap_t_dim."""
    
    def setup(self):
        self.dense = nn.Dense(features=3)
    
    def __call__(self, x):
        return self.dense(x)

# The function vmap_t_dim takes a Type[nn.Module] as its only parameter
# It wraps the module with nn.vmap, vmapping over the T dimension (axis 1)
# The module parameter must be a class (Type), not an instance

ARGS = {
    'module': SimpleModel
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
tensorflow_style_avg_pooling 2 other papers
2 later
2302.05496 (2023-02)
MaskSketch: Unpaired Structure-guided Masked Image Generation
2306.04675 (2023-06)
Exposing flaws of generative model evaluation metrics and their unfair treatment of diffusion models
l2_normalize 1 other paper
1 dated earlier
2101.04702 (2021-01)
Cross-Modal Contrastive Learning for Text-to-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-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

We introduce the MAsked Generative VIdeo Transformer, MAGVIT, to tackle various video synthesis tasks with a single model. We introduce a 3D tokenizer to quantize a video into spatial-temporal visual tokens and propose an embedding method for masked video token modeling to facilitate multi-task learning. We conduct extensive experiments to demonstrate the quality, efficiency, and flexibility of MAGVIT. Our experiments show that (i) MAGVIT performs favorably against state-of-the-art approaches and establishes the best-published FVD on three video generation benchmarks, including the challenging Kinetics-600. (ii) MAGVIT outperforms existing methods in inference time by two orders of magnitude against diffusion models and by 60x against autoregressive models. (iii) A single MAGVIT model supports ten diverse generation tasks and generalizes across videos from different visual domains. The source code and trained models will be released to the public at https://magvit.cs.cmu.edu.

For agents

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

get_harvested_code_for_paper("2212.05199")
get_code_for_paper("2212.05199")
have("2212.05199")

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

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

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

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

Connect an agent — have() is free.