SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.07509 · 2023

PEEKABOO: Interactive Video Generation via Masked-Diffusion

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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; 7 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/2312.07509.json · badge: /api/ran/2312.07509.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
microsoft/peekaboo canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
FunctionStatusWhere it lives
calculate_ap50 Ran
ran, honoured the contract we drafted
microsoft/peekaboo/eval/get_metrics.py
code served (permissive licence) · get_code("1566830f72260e5d")
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 float64, ndim 0, dtype family float; 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 numpy as np

# Create small binary masks for testing
# mask1: ground truth mask, shape (2, 4, 3) - batch of 2, spatial dims 4x3
mask1 = np.random.randint(0, 2, size=(2, 4, 3)).astype(bool)

# mask2: predicted mask, shape (2, 4, 3) - batch of 2, spatial dims 4x3
mask2 = np.random.randint(0, 2, size=(2, 4, 3)).astype(bool)

# Ensure at least one prediction has non-zero elements for meaningful test
mask2[0, 0, 0] = True
mask2[1, 1, 1] = True

ARGS = {
    "mask1": mask1,
    "mask2": mask2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
calculate_iou Ran
ran, honoured the contract we drafted
microsoft/peekaboo/eval/get_metrics.py
code served (permissive licence) · get_code("26588212300d1a39")
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 float64, ndim 0, dtype family float; 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 numpy as np

# Create two small binary masks for IoU calculation
mask1 = np.array([
    [1, 0, 1, 0],
    [0, 1, 1, 0]
], dtype=bool)

mask2 = np.array([
    [1, 1, 0, 0],
    [0, 1, 0, 1]
], dtype=bool)

ARGS = {
    "mask1": mask1,
    "mask2": mask2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
generate_video Ran
ran; our contract draft was wrong, not the code
microsoft/peekaboo/src/app_modelscope.py
code served (permissive licence) · get_code("d2ebbed228aeea81")
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 (2, 3, 256, 256) 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

torch.manual_seed(0)

class MockPipeline(nn.Module):
    """Mock diffusion pipeline that accepts the expected parameters."""
    def __init__(self):
        super().__init__()
        self.config = {}
    
    def __call__(self, prompt, num_frames=24, latents=None, num_inference_steps=50, 
                 frozen_mask=None, frozen_steps=0, latents_all_input=None, 
                 custom_attention_mask=None, fg_prompt=None, make_attention_mask_2d=False,
                 attention_mask_block_diagonal=False, height=256, width=256, output_type='pil'):
        """Returns a mock output object with frames attribute."""
        # Create mock frames output
        if output_type == 'latent':
            frames = torch.randn(2, 4, 4, 4)  # batch, channels, height, width
        else:
            frames = torch.randn(2, 3, 256, 256)  # batch of images
        
        class Output:
            pass
        
        output = Output()
        output.frames = frames
        return output

# Create mock pipe
pipe = MockPipeline()

# Create tensors with distinct shapes to probe dimensions
latents = torch.randn(2, 4, 8, 8)  # batch=2, channels=4, spatial=8x8
fg_masks = torch.randint(0, 2, (2, 1, 8, 8))  # batch=2, single channel mask
fg_masked_latents = torch.randn(2, 4, 8, 8)  # same shape as latents
custom_attention_mask = torch.ones(2, 3, 16)  # batch=2, seq_len=3, features=16

overall_prompt = "a beautiful scene with a cat"
fg_prompt = "a cat running"

ARGS = {
    'pipe': pipe,
    'overall_prompt': overall_prompt,
    'latents': latents,
    'get_latents': False,
    'num_frames': 24,
    'num_inference_steps': 50,
    'fg_masks': fg_masks,
    'fg_masked_latents': fg_masked_latents,
    'frozen_steps': 0,
    'custom_attention_mask': custom_attention_mask,
    'fg_prompt': fg_prompt,
}
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 4, dtype family float, shape (2, 3, 256, 256) — shape (2, 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
generate_video Ran
ran; our contract draft was wrong, not the code
microsoft/peekaboo/src/generate.py
code served (permissive licence) · get_code("a9a2ab113db66971")
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 (24, 3, 320, 576) 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

torch.manual_seed(0)

class MockPipeline(nn.Module):
    """Mock video generation pipeline that mimics diffusers API"""
    def __init__(self):
        super().__init__()
        self.config = {}
    
    def __call__(self, prompt, num_frames=24, latents=None, num_inference_steps=50, 
                 frozen_mask=None, frozen_steps=0, latents_all_input=None, 
                 custom_attention_mask=None, fg_prompt=None, make_attention_mask_2d=False,
                 attention_mask_block_diagonal=False, height=320, width=576, output_type='pt'):
        # Return a mock output object with frames attribute
        if output_type == 'latent':
            # Return latent space frames
            frames = torch.randn(num_frames, 4, 40, 72)
        else:
            # Return pixel space frames
            frames = torch.randn(num_frames, 3, height, width)
        
        class Output:
            pass
        
        output = Output()
        output.frames = frames
        return output

# Create mock pipeline
pipe = MockPipeline()

# Create input tensors
overall_prompt = "a beautiful landscape with mountains"
num_frames = 24
latents = torch.randn(1, 4, 40, 72)  # (batch, channels, height, width) in latent space
fg_masks = torch.randint(0, 2, (num_frames, 1, 40, 72), dtype=torch.float32)
fg_masked_latents = torch.randn(num_frames, 4, 40, 72)
custom_attention_mask = torch.ones(num_frames, 64, 64)
fg_prompt = "foreground object"

# Define all arguments
ARGS = {
    "pipe": pipe,
    "overall_prompt": overall_prompt,
    "latents": latents,
    "get_latents": False,
    "num_frames": 24,
    "num_inference_steps": 50,
    "fg_masks": fg_masks,
    "fg_masked_latents": fg_masked_latents,
    "frozen_steps": 0,
    "custom_attention_mask": custom_attention_mask,
    "fg_prompt": fg_prompt,
    "height": 320,
    "width": 576,
}
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 4, dtype family float, shape (24, 3, 320, 576) — shape (24, 3, 320, 576) 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
get_centroid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/peekaboo/eval/get_metrics.py
code served (permissive licence) · get_code("b4675e3fc23b05c2")
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 ndarray, ndim 2, dtype family float, shape (2, 2) 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 numpy as np

# The function takes a mask and performs operations on it
# mask is used with:
# - np.sum(mask, axis=-1) and np.sum(mask, axis=-2)
# - np.cumsum operations
# - np.argmax operations
# So mask should be a numpy array with at least 2 dimensions

# Create a small binary mask (batch_size=2, height=4, width=3)
# This represents 2 masks of shape (4, 3)
mask = np.random.randint(0, 2, size=(2, 4, 3)).astype(np.float32)

ARGS = {
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) 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
image_mod Ran
ran; our contract draft was wrong, not the code
microsoft/peekaboo/src/app_modelscope.py
code served (permissive licence) · get_code("c7dedf190706d4fc")
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
from PIL import Image
import numpy as np

# Create a small PIL Image object
# PIL Image.rotate() is the method being called
image_array = np.zeros((4, 3, 3), dtype=np.uint8)  # 4x3 image, 3 channels (RGB)
image = Image.fromarray(image_array, mode='RGB')

ARGS = {
    'image': image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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
interpolate_points Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/peekaboo/src/app_modelscope.py
code served (permissive licence) · get_code("31b35eebe3fc998d")
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 list, ndim 2, dtype family float; 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 numpy as np

# Analyze the function:
# - points: needs to support len(), indexing, iteration
# - target_length: integer
# The function works with lists of numeric values (numpy arrays or scalars)

# Create test data with points as a list of numpy arrays/scalars
points = [np.array([1.0, 2.0, 3.0]), 
          np.array([4.0, 5.0, 6.0]), 
          np.array([7.0, 8.0, 9.0])]
target_length = 5

ARGS = {
    "points": points,
    "target_length": target_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list 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
rescale_noise_cfg Ran
ran; our contract draft was wrong, not the code
microsoft/peekaboo/src/models/sd_pipeline.py
code served (permissive licence) · get_code("bea2d776a332f2b0")
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 4, dtype family float, shape (2, 4, 3, 3) 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)

# Create small tensors with distinct dimensions
# noise_cfg: shape (batch=2, channels=4, height=3, width=3)
noise_cfg = torch.randn(2, 4, 3, 3)

# noise_pred_text: shape (batch=2, channels=4, height=3, width=3)
noise_pred_text = torch.randn(2, 4, 3, 3)

# guidance_rescale: float between 0 and 1
guidance_rescale = 0.7

ARGS = {
    "noise_cfg": noise_cfg,
    "noise_pred_text": noise_pred_text,
    "guidance_rescale": guidance_rescale,
}
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 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) 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
tensor2vid Ran
ran; our contract draft was wrong, not the code
microsoft/peekaboo/src/models/pipelines.py
code served (permissive licence) · get_code("92e264414f3052da")
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 list, ndim 4, 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
import numpy as np

torch.manual_seed(0)

# The function expects:
# - video: torch.Tensor with shape (i, c, f, h, w) where:
#   i = batch size (number of images)
#   c = channels (3 for RGB)
#   f = frames
#   h = height
#   w = width
# - mean: list of floats (default [0.5, 0.5, 0.5])
# - std: list of floats (default [0.5, 0.5, 0.5])

# Create a small video tensor: (batch=2, channels=3, frames=4, height=5, width=6)
video = torch.rand(2, 3, 4, 5, 6)

# Default mean and std for normalization
mean = [0.5, 0.5, 0.5]
std = [0.5, 0.5, 0.5]

ARGS = {
    'video': video,
    'mean': mean,
    'std': std
}
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 list, ndim 4, dtype family int — a list 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
convert Not yet run
unverified (harvested, no recorded run)
microsoft/peekaboo/src/gradio_utils.py
code served (permissive licence) · get_code("192bc68fdc627de2")
How it ran

no invocation recorded.

create_video Not yet run
unverified (harvested, no recorded run)
microsoft/peekaboo/src/gradio_utils.py
code served (permissive licence) · get_code("21887b4a542f7643")
How it ran

no invocation recorded.

get_frames Not yet run
unverified (harvested, no recorded run)
microsoft/peekaboo/src/gradio_utils.py
code served (permissive licence) · get_code("1e153f05cb2ea751")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 2 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.

FunctionAlso present inEarliest-datedOthers named
rescale_noise_cfg 62 other papers
7 dated earlier, 3 the same month, 52 later
2206.02779 (2022-06)
Blended Latent Diffusion
2304.06720 (2023-04)
Expressive Text-to-Image Generation with Rich Text
2309.06380 (2023-09)
InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation
and 59 more not named here
tensor2vid 2 other papers
1 dated earlier, 1 later
2309.15818 (2023-09)
Show-1: Marrying Pixel and Latent Diffusion Models for Text-to-Video Generation
2404.06666 (2024-04)
SafeGen: Mitigating Sexually Explicit Content Generation in Text-to-Image Models
create_video 1 other paper
1 dated earlier
2304.01186 (2023-04)
Follow Your Pose: Pose-Guided Text-to-Video Generation using Pose-Free 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

Modern video generation models like Sora have achieved remarkable success in producing high-quality videos. However, a significant limitation is their inability to offer interactive control to users, a feature that promises to open up unprecedented applications and creativity. In this work, we introduce the first solution to equip diffusion-based video generation models with spatio-temporal control. We present Peekaboo, a novel masked attention module, which seamlessly integrates with current video generation models offering control without the need for additional training or inference overhead. To facilitate future research, we also introduce a comprehensive benchmark for interactive video generation. This benchmark offers a standardized framework for the community to assess the efficacy of emerging interactive video generation models. Our extensive qualitative and quantitative assessments reveal that Peekaboo achieves up to a 3.8x improvement in mIoU over baseline models, all while maintaining the same latency. Code and benchmark are available on the webpage.

For agents

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

get_harvested_code_for_paper("2312.07509")
get_code_for_paper("2312.07509")
have("2312.07509")

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

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

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

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

Connect an agent — have() is free.