SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.04277 · NeurIPS · 2024

VideoTetris: Towards Compositional Text-to-Video Generation

Yuan Gao, Ling Yang, Pengfei Wan, Xintao Wang, Bin Cui, Ye Tian, Di Zhang, Zhaochen Yu, Haotian Yang, Yufan Deng, Jingmin Chen, Xin Tao

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 (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 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/2406.04277.json · badge: /api/ran/2406.04277.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
yangling0818/videotetris canonical (classifier label)
classifier basis: census
5 ran · 3 no recorded run
YangLing0818/VideoTetris canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ad_short_gen Ran
ran, honoured the contract we drafted
yangling0818/videotetris/long/t2v_enhanced/model_func.py
code served (permissive licence) · get_code("ea5ebc1fccaecd97")
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 4, dtype family float, shape (16, 3, 256, 256) as a later run recorded it. 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, 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
import torchvision.transforms as transforms
from PIL import Image

torch.manual_seed(0)

# Create a mock ad_model that mimics the behavior expected by ad_short_gen
class MockAdModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(1, 1)
    
    def __call__(self, prompt, negative_prompt=None, num_frames=16, 
                 num_inference_steps=25, generator=None, guidance_scale=7.5):
        # Return a mock output with frames attribute
        # Create dummy PIL images
        frames = [Image.new('RGB', (128, 128), color=(73, 109, 137)) 
                  for _ in range(num_frames)]
        
        class FramesOutput:
            def __init__(self, frames_list):
                self.frames = [frames_list]
        
        return FramesOutput(frames)

# Create a mock generator
class MockGenerator:
    pass

# Create instances
ad_model = MockAdModel()
inference_generator = MockGenerator()
prompt = "A beautiful sunset over the ocean"

ARGS = {
    "prompt": prompt,
    "ad_model": ad_model,
    "inference_generator": inference_generator,
    "t": 25,
    "device": "cpu"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — 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 (16, 3, 256, 256) — shape (16, 3, 256, 256) 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
add_margin Ran
ran; our contract draft was wrong, not the code
yangling0818/videotetris/long/t2v_enhanced/inference_utils.py
code served (permissive licence) · get_code("095f09e68e8de65c")
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 Image. 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.

from PIL import Image

# Create a simple PIL Image
pil_img = Image.new('RGB', (100, 80), color=(255, 0, 0))

# Define margins
top = 10
right = 20
bottom = 15
left = 25

# Define border color
color = (0, 0, 255)

ARGS = {
    'pil_img': pil_img,
    'top': top,
    'right': right,
    'bottom': bottom,
    'left': left,
    'color': color
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
legacy_transformation Ran
ran; our contract draft was wrong, not the code
yangling0818/videotetris/long/t2v_enhanced/inference_utils.py
code served (permissive licence) · get_code("2fefafd463091638")
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 yaml
from copy import deepcopy

# Construct a minimal YAML-like config dict that the function expects
cfg = {
    'trainer': {
        'devices': '0',
        'num_nodes': 2
    },
    'model': {
        'inference_params': {
            'batch_size': 4,
            'max_length': 512
        }
    }
}

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
remove_value Ran
ran; our contract draft was wrong, not the code
yangling0818/videotetris/long/t2v_enhanced/inference_utils.py
code served (permissive licence) · get_code("9d04b073bb0e55c8")
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 numpy as np

# Construct test data for remove_value function
# The function takes a dictionary and a key (x) to remove from it recursively

# Create a nested dictionary structure
test_dictionary = {
    "keep_me": "value1",
    "remove_me": "value2",
    "nested": {
        "keep_nested": "value3",
        "remove_me": "value4",
        "deeply_nested": {
            "remove_me": "value5",
            "keep_deep": "value6"
        }
    },
    "another_key": "value7"
}

# The key to remove
key_to_remove = "remove_me"

ARGS = {
    "dictionary": test_dictionary,
    "x": key_to_remove
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
sdxl_image_gen Ran
ran, honoured the contract we drafted
yangling0818/videotetris/long/t2v_enhanced/model_func.py
code served (permissive licence) · get_code("9fd4368f1cc738db")
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 Image. 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 PIL import Image


class MockSDXLModel(nn.Module):
    """Mock SDXL model that returns a simple image."""
    
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 10)
    
    def forward(self, prompt):
        # Return an object with an images attribute containing a list
        # The function accesses .images[0]
        mock_image = Image.new('RGB', (64, 64), color='red')
        
        class Output:
            def __init__(self, img):
                self.images = [img]
        
        return Output(mock_image)


torch.manual_seed(0)

# Create the mock SDXL model
sdxl_model = MockSDXLModel()

# Create arguments
ARGS = {
    "prompt": "a beautiful landscape",
    "sdxl_model": sdxl_model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
zero_module Ran
ran; our contract draft was wrong, not the code
YangLing0818/VideoTetris/long/t2v_enhanced/model/diffusers_conditional/models/controlnet/controlnet.py
code served (permissive licence) · get_code("52ed01399226d3df")
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 SimpleModule. 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
from torch import nn

torch.manual_seed(0)

# Create a simple module with parameters
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.conv = nn.Conv1d(2, 5, 3)
    
    def forward(self, x):
        return x

module = SimpleModule()

ARGS = {
    "module": module,
    "reset": True
}
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 SimpleModule — a SimpleModule output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModule 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
auto_str Not yet run
unverified (harvested, no recorded run)
yangling0818/videotetris/long/t2v_enhanced/model/pl_module_params_controlnet.py
code served (permissive licence) · get_code("e4b3bfff9427f7f7")
How it ran

no invocation recorded.

gaussian_smoothing_kernel Not yet run
unverified (harvested, no recorded run)
yangling0818/videotetris/long/t2v_enhanced/model/video_noise_generator.py
code served (permissive licence) · get_code("3e997c19843d1786")
How it ran

no invocation recorded.

ms_short_gen Not yet run
unverified (harvested, no recorded run)
yangling0818/videotetris/long/t2v_enhanced/model_func.py
code served (permissive licence) · get_code("a2613130a496d371")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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

Diffusion models have demonstrated great success in text-to-video (T2V) generation. However, existing methods may face challenges when handling complex (long) video generation scenarios that involve multiple objects or dynamic changes in object numbers. To address these limitations, we propose VideoTetris, a novel framework that enables compositional T2V generation. Specifically, we propose spatio-temporal compositional diffusion to precisely follow complex textual semantics by manipulating and composing the attention maps of denoising networks spatially and temporally. Moreover, we propose an enhanced video data preprocessing to enhance the training data regarding motion dynamics and prompt understanding, equipped with a new reference frame attention mechanism to improve the consistency of auto-regressive video generation. Extensive experiments demonstrate that our VideoTetris achieves impressive qualitative and quantitative results in compositional T2V generation.

For agents

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

get_harvested_code_for_paper("2406.04277")
get_code_for_paper("2406.04277")
have("2406.04277")

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

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

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

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

Connect an agent — have() is free.