SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.10373 · 2023

TokenFlow: Consistent Diffusion Features for Consistent Video Editing

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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, 1 violated it and 3 have no contract verdict; 1 failure of our instrument; 1 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/2307.10373.json · badge: /api/ran/2307.10373.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
omerbt/tokenflow community (classifier label)
classifier basis: plan_row
5 ran · 1 no recorded run
FunctionStatusWhere it lives
batch_cosine_sim Ran
ran on a synthesized input
omerbt/tokenflow/util.py
code served (permissive licence) · get_code("d5664e9029e72b35")
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 2, dtype family float, shape (2, 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 two sets of embeddings
# x: batch_size=2, embedding_dim=4
x = torch.randn(2, 4)

# y: batch_size=3, embedding_dim=4 (different batch size to show distinction)
y = torch.randn(3, 4)

ARGS = {
    "x": x,
    "y": y,
}
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 2, dtype family float, shape (2, 3) — shape (2, 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
get_timesteps Ran
ran; our contract draft was wrong, not the code
omerbt/tokenflow/preprocess.py
code served (permissive licence) · get_code("0063341ea11f0fa7")
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. 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)

# Create a minimal scheduler mock that has a timesteps attribute
class MockScheduler:
    def __init__(self, num_timesteps=50):
        # Create a tensor of timesteps in descending order (typical for diffusion schedulers)
        self.timesteps = torch.tensor(list(range(num_timesteps - 1, -1, -1)), dtype=torch.long)

scheduler = MockScheduler(num_timesteps=50)
num_inference_steps = 50
strength = 0.8
device = "cpu"

ARGS = {
    "scheduler": scheduler,
    "num_inference_steps": num_inference_steps,
    "strength": strength,
    "device": device
}
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 — a tuple output has no array shape of its own; none is 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
isinstance_str Ran
ran, violated the contract we drafted
omerbt/tokenflow/util.py
code served (permissive licence) · get_code("cd5d5067de871c97")
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 bool, 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 as nn

torch.manual_seed(0)

# Create a simple object to test isinstance_str
class CustomClass:
    pass

class DerivedClass(CustomClass):
    pass

# Create an instance of DerivedClass
obj = DerivedClass()

# Test with a class name that exists in the MRO
cls_name_valid = "DerivedClass"

# Test with a class name that exists in parent MRO
cls_name_parent = "CustomClass"

# Test with a class name that doesn't exist
cls_name_invalid = "NonExistentClass"

# Also test with built-in types
tensor = torch.randn(2, 4)
cls_name_tensor = "Tensor"

# Construct ARGS for the function
ARGS = {
    "x": obj,
    "cls_name": cls_name_valid
}
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 bool, 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
load_imgs Ran
ran on a synthesized input
omerbt/tokenflow/util.py
code served (permissive licence) · get_code("2d5a5ea3e1c511ce")
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 (3, 3, 5, 5) 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 torchvision.transforms as T
import os
import tempfile
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a temporary directory with test images
temp_dir = tempfile.mkdtemp()

# Create 3 small test images (5x5 RGB images)
for i in range(3):
    img_array = np.random.randint(0, 256, (5, 5, 3), dtype=np.uint8)
    img_pil = Image.fromarray(img_array)
    img_path = os.path.join(temp_dir, f'{i:05d}.jpg')
    img_pil.save(img_path)

ARGS = {
    'data_path': temp_dir,
    'n_frames': 3,
    'device': 'cpu',
    'pil': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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 (3, 3, 5, 5) — shape (3, 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: none by the harness; any seed is in the setup block
load_source_latents_t Ran
ran on a synthesized input
omerbt/tokenflow/tokenflow_utils.py
code served (permissive licence) · get_code("d1bae111aff83ba8")
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 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 os
import tempfile

torch.manual_seed(0)

# Create a temporary directory to act as latents_path
temp_dir = tempfile.mkdtemp()

# Create a sample latent tensor (batch=2, dim=4)
sample_latent = torch.randn(2, 4)

# Save a sample latent file at t=0
latents_0_path = os.path.join(temp_dir, 'noisy_latents_0.pt')
torch.save(sample_latent, latents_0_path)

# Define arguments
ARGS = {
    't': 0,
    'latents_path': temp_dir,
}
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 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
register_conv_injection Not yet run
unverified (harvested, no recorded run)
omerbt/tokenflow/tokenflow_utils.py
code served (permissive licence) · get_code("3a20f2ae91de3dde")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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, 2 later) and 4 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
isinstance_str 10 other papers
1 dated earlier, 9 later
2303.17604 (2023-03)
Token Merging for Fast Stable Diffusion
2312.02212 (2023-12)
Portrait Diffusion: Training-free Face Stylization with Chain-of-Painting
2312.10656 (2023-12)
VidToMe: Video Token Merging for Zero-Shot Video Editing
and 7 more not named here
get_timesteps 2 other papers
1 dated earlier, 1 later
2211.12572 (2022-11)
Plug-and-Play Diffusion Features for Text-Driven Image-to-Image Translation
2310.01506 (2023-10)
Direct Inversion: Boosting Diffusion-based Editing with 3 Lines of Code

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

The generative AI revolution has recently expanded to videos. Nevertheless, current state-of-the-art video models are still lagging behind image models in terms of visual quality and user control over the generated content. In this work, we present a framework that harnesses the power of a text-to-image diffusion model for the task of text-driven video editing. Specifically, given a source video and a target text-prompt, our method generates a high-quality video that adheres to the target text, while preserving the spatial layout and motion of the input video. Our method is based on a key observation that consistency in the edited video can be obtained by enforcing consistency in the diffusion feature space. We achieve this by explicitly propagating diffusion features based on inter-frame correspondences, readily available in the model. Thus, our framework does not require any training or fine-tuning, and can work in conjunction with any off-the-shelf text-to-image editing method. We demonstrate state-of-the-art editing results on a variety of real-world videos. Webpage: https://diffusion-tokenflow.github.io/

For agents

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

get_harvested_code_for_paper("2307.10373")
get_code_for_paper("2307.10373")
have("2307.10373")

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

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

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

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

Connect an agent — have() is free.