SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.09853 · NeurIPS · 2022

MCVD: Masked Conditional Video Diffusion for Prediction, Generation, and Interpolation

Christopher Pal, Vikram Voleti, Alexia Jolicoeur-Martineau, Polytechnique Montreal

arXiv · PDF · Open in the Atlas

Code that ran

7 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 3 failures of our instrument; 9 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/2205.09853.json · badge: /api/ran/2205.09853.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
voletiv/mcvd-pytorch canonical (classifier label)
classifier basis: classifier_2025
6 ran · 5 no recorded run
showlab/FAR community
Papers with Code archive
1 ran · 4 no recorded run
FunctionStatusWhere it lives
AdaLayerNormZeroSingle Ran
ran on a synthesized input · constructed an object; no result was computed
showlab/FAR/far/models/far_model.py
code served (permissive licence) · get_code("c9e28313aeb3f410")
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, AdaLayerNormZeroSingle: 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

torch.manual_seed(0)

# Define the class exactly as provided
class AdaLayerNormZeroSingle(nn.Module):
    """
    Norm layer adaptive layer norm zero (adaLN-Zero).

    Parameters:
        embedding_dim (`int`): The size of each embedding vector.
        num_embeddings (`int`): The size of the embeddings dictionary.
    """

    def __init__(self, embedding_dim: int, norm_type='layer_norm', bias=True):
        super().__init__()
        self.silu = nn.SiLU()
        self.linear = nn.Linear(embedding_dim, 3 * embedding_dim, bias=bias)
        if norm_type == 'layer_norm':
            self.norm = nn.LayerNorm(embedding_dim, elementwise_affine=False, eps=1e-06)
        else:
            raise ValueError(f"Unsupported `norm_type` ({norm_type}) provided. Supported ones are: 'layer_norm', 'fp32_layer_norm'.")

    def forward(self, x: torch.Tensor, emb=None):
        emb = self.linear(self.silu(emb))
        shift_msa, scale_msa, gate_msa = emb.chunk(3, dim=-1)
        x = self.norm(x) * (1 + scale_msa) + shift_msa
        return (x, gate_msa)


# Create small tensors for testing
batch_size = 2
embedding_dim = 4

# Create input tensor x: shape (batch_size, embedding_dim)
x = torch.randn(batch_size, embedding_dim)

# Create embedding tensor emb: shape (batch_size, embedding_dim)
emb = torch.randn(batch_size, embedding_dim)

# Define ARGS dictionary with all constructor parameters
ARGS = {
    'embedding_dim': embedding_dim,
    'norm_type': 'layer_norm',
    'bias': True,
}
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 AdaLayerNormZeroSingle — 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 AdaLayerNormZeroSingle 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
Nin Ran
ran on a synthesized input
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("fe8eda2d3c77b1ce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 5, 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 math
import torch
import torch.nn as nn

class Nin(nn.Module):
    """ Shared weights """

    def __init__(self, channel_in: int, channel_out: int, init_scale=1.0):
        super().__init__()
        self.channel_out = channel_out
        self.weights = nn.Parameter(torch.zeros(channel_out, channel_in), requires_grad=True)
        torch.nn.init.xavier_uniform_(self.weights, math.sqrt(1e-10 if init_scale == 0.0 else init_scale))
        self.bias = nn.Parameter(torch.zeros(channel_out), requires_grad=True)
        torch.nn.init.zeros_(self.bias)

    def forward(self, x):
        bs, _, width, _ = x.shape
        res = torch.bmm(self.weights.repeat(bs, 1, 1), x.flatten(2)) + self.bias.unsqueeze(0).unsqueeze(-1)
        return res.view(bs, self.channel_out, width, width)


INIT_ARGS = {
    "channel_in": 4,
    "channel_out": 3,
    "init_scale": 1.0,
}

ARGS = {
    "x": torch.randn(2, 4, 5, 5),
}

if __name__ == "__main__":
    model = Nin(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 3, 5, 5)")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float, shape (2, 3, 5, 5) — shape (2, 3, 5, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Normalize Ran
ran; our contract draft was wrong, not the code
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("7a5794dd00d68985")
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 GroupNorm. 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)

ARGS = {
    "num_channels": 32
}
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 GroupNorm — a GroupNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GroupNorm 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
Swish Ran
ran on a synthesized input
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("d0fc586d0b8f1592")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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

class Swish(nn.Module):
    """
    Swish out-performs Relu for deep NN (more than 40 layers). Although, the performance of relu and swish model
    degrades with increasing batch size, swish performs better than relu.
    https://jmlb.github.io/ml/2017/12/31/swish_activation_function/ (December 31th 2017)
    """

    @staticmethod
    def forward(x):
        return x * torch.sigmoid(x)


INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 4)
}

if __name__ == '__main__':
    model = Swish(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Upsample Ran
ran on a synthesized input
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("be28d1c32d65462b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 6, 10) 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 math
import torch
import torch.nn as nn

def default_init(module, scale):
    if scale == 0:
        scale = 1e-10
    torch.nn.init.xavier_uniform_(module.weight, math.sqrt(scale))
    torch.nn.init.zeros_(module.bias)

def init_weights(module, scale=1, module_is_list=False):
    if module_is_list:
        for module_ in module.modules():
            if isinstance(module_, nn.Conv2d) or isinstance(module_, nn.Linear):
                default_init(module_, scale)
    elif isinstance(module, nn.Conv2d) or isinstance(module, nn.Linear):
        default_init(module, scale)

class Upsample(nn.Module):

    def __init__(self, channel):
        super().__init__()
        self.up = nn.Upsample(scale_factor=2, mode='nearest')
        self.conv = nn.Conv2d(channel, channel, kernel_size=3, stride=1, padding=1)
        init_weights(self.conv)

    def forward(self, x):
        return self.conv(self.up(x))


INIT_ARGS = {
    'channel': 4
}

ARGS = {
    'x': torch.randn(2, 4, 3, 5)
}

if __name__ == '__main__':
    model = Upsample(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float, shape (2, 4, 6, 10) — shape (2, 4, 6, 10) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
get_timestep_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("e3f5c3d286e3e169")
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
import math

torch.manual_seed(0)

# The function expects:
# - timesteps: a 1D tensor of timestep indices
# - embedding_dim: an integer for the embedding dimension

# Create a small 1D tensor of timesteps (batch size 2)
timesteps = torch.tensor([0, 5], dtype=torch.long)

# Set embedding dimension (use 4 as specified for tiny tensors)
embedding_dim = 4

ARGS = {
    "timesteps": timesteps,
    "embedding_dim": embedding_dim,
}
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
partialclass Ran
ran; our contract draft was wrong, not the code
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("61098cd5c9624563")
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 functools
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple base class to demonstrate partialclass
class SimpleModel(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim):
        super().__init__()
        self.linear1 = nn.Linear(input_dim, hidden_dim)
        self.linear2 = nn.Linear(hidden_dim, output_dim)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Set up arguments for partialclass
# partialclass takes: cls, *args, **kwds
cls_arg = SimpleModel
args_tuple = (4, 8)  # input_dim, hidden_dim as positional args
kwds_dict = {"output_dim": 3}  # output_dim as keyword arg

ARGS = {
    "cls": cls_arg,
    "args": args_tuple,
    "kwds": kwds_dict
}
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 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
AdaLayerNormContinuous Not yet run
unverified (harvested, no recorded run)
showlab/FAR/far/models/far_model.py
code served (permissive licence) · get_code("87c3ba7dfa415456")
How it ran

no invocation recorded.

AttnBlock Not yet run
unverified (harvested, no recorded run)
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("608ce50c0a254bf3")
How it ran

no invocation recorded.

FAR Not yet run
unverified (harvested, no recorded run)
showlab/FAR/far/models/far_model.py
code served (permissive licence) · get_code("c7f7d4ff2a1ca090")
How it ran

no invocation recorded.

FAR_AttnProcessor2_0 Not yet run
unverified (harvested, no recorded run)
showlab/FAR/far/models/far_model.py
code served (permissive licence) · get_code("f9bd59c7c4009713")
How it ran

no invocation recorded.

FAR_TransformerBlock Not yet run
unverified (harvested, no recorded run)
showlab/FAR/far/models/far_model.py
code served (permissive licence) · get_code("dd2836a2627dc893")
How it ran

no invocation recorded.

ResnetBlock Not yet run
unverified (harvested, no recorded run)
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("b50ef756a12bcec1")
How it ran

no invocation recorded.

UNet Not yet run
unverified (harvested, no recorded run)
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("25b5bc70ae8eb1fe")
How it ran

no invocation recorded.

default_init Not yet run
unverified (harvested, no recorded run)
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("90b0411e98af1284")
How it ran

no invocation recorded.

init_weights Not yet run
unverified (harvested, no recorded run)
voletiv/mcvd-pytorch/models/unet.py
code served (permissive licence) · get_code("356ce7450c78eec0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 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, 1 later) and 14 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
partialclass
brick of this paper's assembly: helper
5 other papers
2 dated earlier, 3 later · 1 only as an assembly brick
1906.01618 (2019-06)
Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Representations
2009.05475 (2020-09)
Adversarial score matching and improved sampling for image generation
2210.05927 (2022-10)
Efficient Adversarial Training without Attacking: Worst-Case-Aware Robust Reinforcement Learning
and 2 more not named here
Normalize
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2009.05475 (2020-09)
Adversarial score matching and improved sampling for 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

Video prediction is a challenging task. The quality of video frames from current state-of-the-art (SOTA) generative models tends to be poor and generalization beyond the training data is difficult. Furthermore, existing prediction frameworks are typically not capable of simultaneously handling other video-related tasks such as unconditional generation or interpolation. In this work, we devise a generalpurpose framework called Masked Conditional Video Diffusion (MCVD) for all of these video synthesis tasks using a probabilistic conditional score-based denoising diffusion model, conditioned on past and/or future frames. We train the model in a manner where we randomly and independently mask all the past frames or all the future frames. This novel but straightforward setup allows us to train a single model that is capable of executing a broad range of video tasks, specifically: future/past prediction -when only future/past frames are masked; unconditional generation -when both past and future frames are masked; and interpolation -when neither past nor future frames are masked. Our experiments show that this approach can generate high-quality frames for diverse types of videos. Our MCVD models are built from simple non-recurrent 2D-convolutional architectures, conditioning on blocks of frames and generating blocks of frames. We generate videos of arbitrary lengths autoregressively in a block-wise manner. Our approach yields SOTA results across standard video prediction and interpolation benchmarks, with computation times for training models measured in 1-12 days using ≤ 4 GPUs.

For agents

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

get_harvested_code_for_paper("2205.09853")
get_code_for_paper("2205.09853")
have("2205.09853")

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

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

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

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

Connect an agent — have() is free.