SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.17694 · 2024

AniPortrait: Audio-Driven Synthesis of Photorealistic Portrait Animation

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 2 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/2403.17694.json · badge: /api/ran/2403.17694.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
scutzzj/aniportrait canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
collate_fn Ran
ran; our contract draft was wrong, not the code
scutzzj/aniportrait/src/dataset/dataset_face.py
code served (permissive licence) · get_code("3c6f442fbc45ccb4")
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

torch.manual_seed(0)

# Create sample data items that match the structure expected by collate_fn
# Each item is a dict with the required keys

data_item_1 = {
    'pixel_values': torch.randn(3, 4, 4),  # 3 channels, 4x4 image
    'pixel_values_pose': torch.randn(3, 4, 4),  # 3 channels, 4x4 pose image
    'clip_ref_image': torch.randn(1, 5, 6),  # 1 item, 5x6 (will be concatenated)
    'pixel_values_ref_img': torch.randn(3, 4, 4),  # 3 channels, 4x4 ref image
    'drop_image_embeds': 0.0,  # scalar value for dropping
    'pixel_values_ref_pose': torch.randn(3, 4, 4),  # 3 channels, 4x4 ref pose
}

data_item_2 = {
    'pixel_values': torch.randn(3, 4, 4),
    'pixel_values_pose': torch.randn(3, 4, 4),
    'clip_ref_image': torch.randn(1, 5, 6),
    'pixel_values_ref_img': torch.randn(3, 4, 4),
    'drop_image_embeds': 1.0,
    'pixel_values_ref_pose': torch.randn(3, 4, 4),
}

data = [data_item_1, data_item_2]

ARGS = {'data': data}
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 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
compute_snr Ran
ran; our contract draft was wrong, not the code
scutzzj/aniportrait/train_stage_1.py
code served (permissive licence) · get_code("16309f96889a07a1")
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 1, dtype family float, shape (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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockNoiseScheduler:
    """Minimal noise scheduler with alphas_cumprod attribute"""
    def __init__(self, num_timesteps=1000):
        # Create a simple decreasing schedule for alphas_cumprod
        # Shape: (num_timesteps,)
        self.alphas_cumprod = torch.linspace(1.0, 0.1, num_timesteps)

# Create noise scheduler
noise_scheduler = MockNoiseScheduler(num_timesteps=1000)

# Create timesteps tensor
# Shape: (2,) - batch of 2 timesteps
timesteps = torch.tensor([10, 50], dtype=torch.long)

ARGS = {
    "noise_scheduler": noise_scheduler,
    "timesteps": timesteps,
}
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 1, dtype family float, shape (2,) — shape (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
decode_latents Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
scutzzj/aniportrait/train_stage_2.py
code served (permissive licence) · get_code("2c02b3b459122f59")
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 5, dtype family float, shape (2, 3, 3, 5, 6) 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
from einops import rearrange

torch.manual_seed(0)

class MockVAEDecoder(nn.Module):
    """Minimal VAE decoder that returns a sample tensor."""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def decode(self, latent):
        # latent shape: (1, 4, 3, 5) - (batch, channels, height, width)
        # output should be a sample with shape (1, 3, 3, 5) - (batch, 3 channels, height, width)
        batch_size = latent.shape[0]
        height = latent.shape[2]
        width = latent.shape[3]
        # Return a mock output with 3 channels (RGB-like)
        output = torch.randn(batch_size, 3, height, width)
        
        class DecodedOutput:
            def __init__(self, sample):
                self.sample = sample
        
        return DecodedOutput(output)

vae = MockVAEDecoder()

# Create latents tensor with shape (batch=2, channels=4, frames=3, height=5, width=6)
latents = torch.randn(2, 4, 3, 5, 6)

ARGS = {
    "vae": vae,
    "latents": latents,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 5, dtype family float, shape (2, 3, 3, 5, 6) — shape (2, 3, 3, 5, 6) 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_mask_from_lengths Ran
ran; our contract draft was wrong, not the code
scutzzj/aniportrait/src/audio_models/torch_utils.py
code served (permissive licence) · get_code("3c0feaae421deaa6")
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, 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 torch

torch.manual_seed(0)

# Create a small tensor of lengths
# Using batch size 2, with varying sequence lengths
lengths = torch.tensor([3, 5], dtype=torch.long)

# max_len will be None to test the default behavior
max_len = None

ARGS = {
    "lengths": lengths,
    "max_len": max_len,
}
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, 5) — shape (2, 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
init_biased_mask Ran
ran, honoured the contract we drafted
scutzzj/aniportrait/src/audio_models/pose_model.py
code served (permissive licence) · get_code("aa7ccd5a0450ec8f")
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 3, dtype family float, shape (8, 16, 16) 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

torch.manual_seed(0)

ARGS = {
    "n_head": 8,
    "max_seq_len": 16,
    "period": 4,
}
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 3, dtype family float, shape (8, 16, 16) — shape (8, 16, 16) 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
linear_interpolation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
scutzzj/aniportrait/src/audio_models/torch_utils.py
code served (permissive licence) · get_code("4007212e0e5fa312")
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 3, dtype family float, shape (2, 5, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small feature tensor
# Shape: (batch_size, channels, sequence_length)
# Using distinct sizes: batch=2, channels=4, seq_length=3
features = torch.randn(2, 4, 3)

# Define the target sequence length to interpolate to
seq_len = 5

ARGS = {
    "features": features,
    "seq_len": seq_len,
}
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 3, dtype family float, shape (2, 5, 3) — shape (2, 5, 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
mish Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
scutzzj/aniportrait/src/audio_models/mish.py
code served (permissive licence) · get_code("e8af53cde1de7240")
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; 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 torch.nn.functional as F

torch.manual_seed(0)

# The mish function takes a single parameter 'input' which should be a tensor
# The function applies element-wise operations: input * tanh(softplus(input))
# So input should be a tensor of any shape

input_tensor = torch.randn(2, 4)

ARGS = {
    "input": input_tensor
}
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 — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
torch_dfs Ran
ran; our contract draft was wrong, not the code
scutzzj/aniportrait/src/models/mutual_self_attention.py
code served (permissive licence) · get_code("e55f24470648724c")
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. 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)

# Build a small model with a hierarchical structure
# The function calls model.children(), so we need a model with child modules
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Sequential(
            nn.Linear(3, 2),
            nn.ReLU()
        )
        self.layer3 = nn.Linear(2, 1)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        x = self.layer3(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 — a list 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
zero_module Ran
ran; our contract draft was wrong, not the code
scutzzj/aniportrait/src/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
enc_dec_mask Not yet run
unverified (harvested, no recorded run)
scutzzj/aniportrait/src/audio_models/pose_model.py
code served (permissive licence) · get_code("fd4cbd132a7b01e2")
How it ran

no invocation recorded.

get_motion_module Not yet run
unverified (harvested, no recorded run)
scutzzj/aniportrait/src/models/motion_module.py
code served (permissive licence) · get_code("525d02f457ec7c07")
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, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 4 the same month, 6 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
zero_module 196 other papers
105 dated earlier, 13 the same month, 77 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
get_motion_module 11 other papers
5 dated earlier, 1 the same month, 5 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
compute_snr 9 other papers
1 dated earlier, 2 the same month, 5 later, 1 undated
2311.17918 (2023-11)
Driving into the Future: Multiview Visual Forecasting and Planning with World Model for Autonomous Driving
2403.10094 (2024-03)
RangeLDM: Fast Realistic LiDAR Point Cloud Generation
2403.12931 (2024-03)
You Only Sample Once: Taming One-Step Text-To-Image Synthesis by Self-Cooperative Diffusion GANs
and 6 more not named here
torch_dfs 9 other papers
1 the same month, 8 later
2403.14781 (2024-03)
Champ: Controllable and Consistent Human Image Animation with 3D Parametric Guidance
2405.11794 (2024-05)
ViViD: Video Virtual Try-on using Diffusion Models
2405.13722 (2024-05)
LightningDrag: Lightning Fast and Accurate Drag-based Image Editing Emerging from Videos
and 6 more not named here
mish 5 other papers
5 dated earlier
1603.06937 (2016-03)
Stacked Hourglass Networks for Human Pose Estimation
1610.02357 (2016-10)
Xception: Deep Learning with Depthwise Separable Convolutions
1908.08681 (2019-08)
Mish: A Self Regularized Non-Monotonic Activation Function
and 2 more not named here
init_biased_mask 4 other papers
3 dated earlier, 1 later
2112.05329 (2021-12)
FaceFormer: Speech-Driven 3D Facial Animation with Transformers
2303.11089 (2023-03)
EmoTalk: Speech-Driven Emotional Disentanglement for 3D Face Animation
2306.10799 (2023-06)
SelfTalk: A Self-Supervised Commutative Training Diagram to Comprehend 3D Talking Faces
and 1 more not named here
decode_latents 1 other paper
1 later
2410.24037 (2024-10)
TPC: Test-time Procrustes Calibration for Diffusion-based Human Image Animation

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

In this study, we propose AniPortrait, a novel framework for generating high-quality animation driven by audio and a reference portrait image. Our methodology is divided into two stages. Initially, we extract 3D intermediate representations from audio and project them into a sequence of 2D facial landmarks. Subsequently, we employ a robust diffusion model, coupled with a motion module, to convert the landmark sequence into photorealistic and temporally consistent portrait animation. Experimental results demonstrate the superiority of AniPortrait in terms of facial naturalness, pose diversity, and visual quality, thereby offering an enhanced perceptual experience. Moreover, our methodology exhibits considerable potential in terms of flexibility and controllability, which can be effectively applied in areas such as facial motion editing or face reenactment. We release code and model weights at https://github.com/scutzzj/AniPortrait

For agents

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

get_harvested_code_for_paper("2403.17694")
get_code_for_paper("2403.17694")
have("2403.17694")

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

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

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

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

Connect an agent — have() is free.