SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.09368 · 2024

Magic-Me: Identity-Specific Video Customized Diffusion

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 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 0 have no contract verdict; 6 failures of our instrument; 5 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/2402.09368.json · badge: /api/ran/2402.09368.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
zhen-dong/magic-me canonical (classifier label)
classifier basis: census
6 ran · 5 no recorded run
FunctionStatusWhere it lives
get_noise_pred_single Ran
ran; our contract draft was wrong, not the code
zhen-dong/magic-me/animatediff/utils/util.py
code served (permissive licence) · get_code("0b088617d5525751")
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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal UNet that accepts latents, t, and encoder_hidden_states
class MiniUNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, latents, t, encoder_hidden_states=None):
        # latents: [batch, channels]
        # t: scalar or tensor
        # encoder_hidden_states: [batch, seq_len, hidden_dim]
        # Return dict with 'sample' key
        noise_pred = self.linear(latents)
        return {'sample': noise_pred}

# Create instances
latents = torch.randn(2, 4)  # batch=2, channels=4
t = torch.tensor(5)  # timestep
context = torch.randn(2, 3, 5)  # batch=2, seq_len=3, hidden_dim=5
unet = MiniUNet()

ARGS = {
    'latents': latents,
    't': t,
    'context': context,
    'unet': unet
}
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
next_step Ran
ran; our contract draft was wrong, not the code
zhen-dong/magic-me/animatediff/utils/util.py
code served (permissive licence) · get_code("4097acc7a5655221")
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 numpy as np

torch.manual_seed(0)

# Create a minimal scheduler mock that has the attributes used by next_step
class DDIMSchedulerMock:
    def __init__(self):
        self.config = type('Config', (), {'num_train_timesteps': 1000})()
        self.num_inference_steps = 50
        # alphas_cumprod needs to be indexable by timestep
        # Create a decreasing sequence of alpha values from 1.0 to near 0
        self.alphas_cumprod = np.linspace(1.0, 0.1, 1000)
        self.final_alpha_cumprod = 0.0

# Create small tensors for model_output and sample
model_output = torch.randn(2, 4)  # batch_size=2, dim=4
sample = torch.randn(2, 4)  # batch_size=2, dim=4

# Create the scheduler
ddim_scheduler = DDIMSchedulerMock()

# Set timestep to something that will work with the scheduler
timestep = 100

ARGS = {
    'model_output': model_output,
    'timestep': timestep,
    'sample': sample,
    'ddim_scheduler': ddim_scheduler
}
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 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
renew_resnet_paths Ran
ran; our contract draft was wrong, not the code
zhen-dong/magic-me/animatediff/utils/convert_from_ckpt.py
code served (permissive licence) · get_code("dfb052a0af48540f")
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 1, 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 torch

# Define the function to be tested
def shave_segments(path, n_shave_prefix_segments=1):
    """
    Removes segments. Positive values shave the first segments, negative shave the last segments.
    """
    if n_shave_prefix_segments >= 0:
        return '.'.join(path.split('.')[n_shave_prefix_segments:])
    else:
        return '.'.join(path.split('.')[:n_shave_prefix_segments])

def renew_resnet_paths(old_list, n_shave_prefix_segments=0):
    """
    Updates paths inside resnets to the new naming scheme (local renaming)
    """
    mapping = []
    for old_item in old_list:
        new_item = old_item.replace('in_layers.0', 'norm1')
        new_item = new_item.replace('in_layers.2', 'conv1')
        new_item = new_item.replace('out_layers.0', 'norm2')
        new_item = new_item.replace('out_layers.3', 'conv2')
        new_item = new_item.replace('emb_layers.1', 'time_emb_proj')
        new_item = new_item.replace('skip_connection', 'conv_shortcut')
        new_item = shave_segments(new_item, n_shave_prefix_segments=n_shave_prefix_segments)
        mapping.append({'old': old_item, 'new': new_item})
    return mapping

# Construct valid arguments
ARGS = {
    'old_list': [
        'module.in_layers.0.weight',
        'module.in_layers.2.bias',
        'module.out_layers.0.weight',
        'module.out_layers.3.bias',
        'module.emb_layers.1.weight',
        'module.skip_connection.weight',
    ],
    'n_shave_prefix_segments': 0
}
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 list, ndim 1, 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
renew_vae_resnet_paths Ran
ran; our contract draft was wrong, not the code
zhen-dong/magic-me/animatediff/utils/convert_from_ckpt.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from tuananhbui89/Erasing-Adversarial-Preservation, is pointer only (licence: NONE) · get_code("c5ec9c13e456a046")
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 tuananhbui89/Erasing-Adversarial-Preservation, 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.

shave_segments Ran
ran; our contract draft was wrong, not the code
zhen-dong/magic-me/animatediff/utils/convert_from_ckpt.py
code served (permissive licence) · get_code("cea0bc82e0c96896")
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 str. 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

torch.manual_seed(0)

# Analyzing the function:
# - path: string parameter that gets split by '.' and rejoined
# - n_shave_prefix_segments: int parameter that controls slicing behavior

ARGS = {
    'path': 'module.layer.weight.data.value',
    'n_shave_prefix_segments': 1
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
zero_module Ran
ran; our contract draft was wrong, not the code
zhen-dong/magic-me/animatediff/models/motion_module.py
code served (permissive licence) · get_code("4719c763c53be3fe")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple nn.Module with some 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
}
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
convert_lora Not yet run
unverified (harvested, no recorded run)
zhen-dong/magic-me/animatediff/utils/convert_lora_safetensor_to_diffusers.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from bujiazi/motionclone, is pointer only (licence: NONE) · get_code("9736e3792b57e25c")
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 bujiazi/motionclone, 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. No invocation recorded.

get_down_block Not yet run
unverified (harvested, no recorded run)
zhen-dong/magic-me/animatediff/models/unet_blocks.py
code served (permissive licence) · get_code("bdb3b988fb6da325")
How it ran

no invocation recorded.

get_motion_module Not yet run
unverified (harvested, no recorded run)
zhen-dong/magic-me/animatediff/models/motion_module.py
code served (permissive licence) · get_code("5c1d00e789c34628")
How it ran

no invocation recorded.

get_up_block Not yet run
unverified (harvested, no recorded run)
zhen-dong/magic-me/animatediff/models/unet_blocks.py
code served (permissive licence) · get_code("7762c49c7d58bbe2")
How it ran

no invocation recorded.

init_prompt Not yet run
unverified (harvested, no recorded run)
zhen-dong/magic-me/animatediff/utils/util.py
code served (permissive licence) · get_code("a0a4d94af120c56f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 3 the same month, 8 later) and 0 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
zero_module 196 other papers
96 dated earlier, 8 the same month, 91 later, 1 same year, order not determinable · 49 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
and 193 more not named here
init_prompt 14 other papers
13 dated earlier, 1 the same month
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2212.11565 (2022-12)
Tune-A-Video: One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation
2304.01186 (2023-04)
Follow Your Pose: Pose-Guided Text-to-Video Generation using Pose-Free Videos
and 11 more not named here
renew_resnet_paths 14 other papers
7 dated earlier, 7 later
2307.04725 (2023-07)
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2311.03054 (2023-11)
AnyText: Multilingual Visual Text Generation And Editing
and 11 more not named here
shave_segments 14 other papers
7 dated earlier, 7 later
2307.04725 (2023-07)
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2311.03054 (2023-11)
AnyText: Multilingual Visual Text Generation And Editing
and 11 more not named here
get_motion_module 11 other papers
4 dated earlier, 7 later
2310.19512 (2023-10)
VideoCrafter1: Open Diffusion Models for High-Quality Video Generation
2311.00213 (2023-11)
Consistent Video-to-Video Transfer Using Synthetic Dataset
2312.13964 (2023-12)
PIA: Your Personalized Image Animator via Plug-and-Play Modules in Text-to-Image Models
and 8 more not named here
next_step 11 other papers
10 dated earlier, 1 the same month
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2212.11565 (2022-12)
Tune-A-Video: One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation
2304.01186 (2023-04)
Follow Your Pose: Pose-Guided Text-to-Video Generation using Pose-Free Videos
and 8 more not named here
renew_vae_resnet_paths 11 other papers
6 dated earlier, 5 later
2307.04725 (2023-07)
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2311.16933 (2023-11)
SparseCtrl: Adding Sparse Controls to Text-to-Video Diffusion Models
and 8 more not named here
get_noise_pred_single 8 other papers
8 dated earlier
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2212.11565 (2022-12)
Tune-A-Video: One-Shot Tuning of Image Diffusion Models for Text-to-Video Generation
2304.01186 (2023-04)
Follow Your Pose: Pose-Guided Text-to-Video Generation using Pose-Free Videos
and 5 more not named here
convert_lora 5 other papers
4 dated earlier, 1 later
2307.04725 (2023-07)
AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2311.16933 (2023-11)
SparseCtrl: Adding Sparse Controls to Text-to-Video Diffusion Models
and 2 more not named here
get_down_block 2 other papers
1 dated earlier, 1 later
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2405.11794 (2024-05)
ViViD: Video Virtual Try-on using Diffusion Models
get_up_block 2 other papers
1 dated earlier, 1 later
2310.15169 (2023-10)
FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling
2405.11794 (2024-05)
ViViD: Video Virtual Try-on using Diffusion Models

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

Creating content with specified identities (ID) has attracted significant interest in the field of generative models. In the field of text-to-image generation (T2I), subject-driven creation has achieved great progress with the identity controlled via reference images. However, its extension to video generation is not well explored. In this work, we propose a simple yet effective subject identity controllable video generation framework, termed Video Custom Diffusion (VCD). With a specified identity defined by a few images, VCD reinforces the identity characteristics and injects frame-wise correlation at the initialization stage for stable video outputs. To achieve this, we propose three novel components that are essential for high-quality identity preservation and stable video generation: 1) a noise initialization method with 3D Gaussian Noise Prior for better inter-frame stability; 2) an ID module based on extended Textual Inversion trained with the cropped identity to disentangle the ID information from the background 3) Face VCD and Tiled VCD modules to reinforce faces and upscale the video to higher resolution while preserving the identity's features. We conducted extensive experiments to verify that VCD is able to generate stable videos with better ID over the baselines. Besides, with the transferability of the encoded identity in the ID module, VCD is also working well with personalized text-to-image models available publicly. The codes are available at https://github.com/Zhen-Dong/Magic-Me.

For agents

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

get_harvested_code_for_paper("2402.09368")
get_code_for_paper("2402.09368")
have("2402.09368")

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

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

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

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

Connect an agent — have() is free.