SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.04057 · ICML · 2024

Score identity Distillation: Exponentially Fast Distillation of Pretrained Diffusion Models for One-Step Generation

Mingyuan Zhou, Zhendong Wang, Huangjie Zheng, Mingzhang Yin, Hai Huang

arXiv · PDF · Open in the Atlas

Code that ran

10 of 15 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; 4 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 4 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/2404.04057.json · badge: /api/ran/2404.04057.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
mingyuanzhou/SiD canonical (classifier label)
classifier basis: census
10 ran · 5 no recorded run
FunctionStatusWhere it lives
calculate_fid_from_inception_stats Ran
ran, honoured the contract we drafted
mingyuanzhou/SiD/sid_generate.py
code served (permissive licence) · get_code("68b5e143931956cf")
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 float, 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 numpy as np
import scipy.linalg

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample statistics for inception features
# mu and mu_ref are mean vectors (1D arrays)
# sigma and sigma_ref are covariance matrices (2D arrays)

feature_dim = 4

# Generate random mean vectors
mu = np.random.randn(feature_dim).astype(np.float32)
mu_ref = np.random.randn(feature_dim).astype(np.float32)

# Generate random positive semi-definite covariance matrices
# by creating random matrices and multiplying by their transpose
random_matrix = np.random.randn(feature_dim, feature_dim).astype(np.float32)
sigma = np.dot(random_matrix, random_matrix.T)

random_matrix_ref = np.random.randn(feature_dim, feature_dim).astype(np.float32)
sigma_ref = np.dot(random_matrix_ref, random_matrix_ref.T)

ARGS = {
    "mu": mu,
    "sigma": sigma,
    "mu_ref": mu_ref,
    "sigma_ref": sigma_ref,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
compute_distances Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mingyuanzhou/SiD/metrics/sid_precision_recall.py
code served (permissive licence) · get_code("790b320b90341326")
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 small feature tensors
# row_features: used with unsqueeze(0) and cdist, so shape (num_rows, feature_dim)
row_features = torch.randn(2, 4)

# col_features: used with shape[0], unsqueeze(0), cdist, chunk, pad operations
# shape (num_cols, feature_dim)
col_features = torch.randn(3, 4)

# num_gpus: used in range and modulo operations
num_gpus = 1

# rank: used in comparison and indexing operations
rank = 0

# col_batch_size: used in division for batch calculation
col_batch_size = 2

ARGS = {
    "row_features": row_features,
    "col_features": col_features,
    "num_gpus": num_gpus,
    "rank": rank,
    "col_batch_size": col_batch_size,
}
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
file_ext Ran
ran; our contract draft was wrong, not the code
mingyuanzhou/SiD/dataset_tool.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from pdillis/stylegan3-fun, is pointer only (licence: NOASSERTION) · get_code("a2b45afa097b55b6")
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 pdillis/stylegan3-fun, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

get_feature_detector_name Ran
ran; our contract draft was wrong, not the code
mingyuanzhou/SiD/metrics/sid_metric_utils.py
code served (permissive licence) · get_code("c127dc46d6966547")
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 os

def get_feature_detector_name(url):
    return os.path.splitext(url.split('/')[-1])[0]

ARGS = {
    'url': 'https://example.com/path/to/model_weights.pth'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
is_valid_metric Ran
ran, violated the contract we drafted
mingyuanzhou/SiD/metrics/sid_metric_main.py
code served (permissive licence) · get_code("147acc22e758c8e5")
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 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

torch.manual_seed(0)

# The function is_valid_metric checks if a metric is in the _metric_dict
# To make this function executable, we need to:
# 1. Populate the _metric_dict with some metrics
# 2. Pass a metric string that exists in _metric_dict

_metric_dict = {
    "accuracy": lambda x, y: (x == y).float().mean(),
    "loss": lambda x, y: ((x - y) ** 2).mean(),
    "f1_score": lambda x, y: 0.95
}

# Valid metric to pass to is_valid_metric
metric_value = "accuracy"

ARGS = {
    "metric": metric_value
}
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 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
maybe_min Ran
ran, honoured the contract we drafted
mingyuanzhou/SiD/dataset_tool.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from pdillis/stylegan3-fun, is pointer only (licence: NOASSERTION) · get_code("dd1dc700e87f36cc")
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 pdillis/stylegan3-fun, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

parse_int_list Ran
ran, honoured the contract we drafted
mingyuanzhou/SiD/sid_metrics.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from newbeeer/stf, is pointer only (licence: NONE) · get_code("cacd4f6ec202d9b4")
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 newbeeer/stf, 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.

parse_tuple Ran
ran, honoured the contract we drafted
mingyuanzhou/SiD/dataset_tool.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xfetus/fetal-ultrasound-edm2, is pointer only (licence: NONE) · get_code("07b21b35ecb4815c")
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 xfetus/fetal-ultrasound-edm2, 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.

register_metric Ran
ran; our contract draft was wrong, not the code
mingyuanzhou/SiD/metrics/sid_metric_main.py
code served (permissive licence) · get_code("e574c21e7f007b61")
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 function. 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)

# The function register_metric takes one parameter: fn
# It checks that fn is callable, then stores it in a dict
# So we need to provide a callable function

def example_metric_fn():
    """A simple callable function to use as a metric."""
    return 42

ARGS = {
    "fn": example_metric_fn
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
setup_snapshot_image_grid Ran
ran on a synthesized input
mingyuanzhou/SiD/training/sid_training_loop.py
code served (permissive licence) · get_code("41d0a46d745163d4")
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 numpy as np

class MockImageDetails:
    def __init__(self, raw_label):
        self.raw_label = raw_label

class MockTrainingSet:
    def __init__(self, has_labels=False, num_samples=10, img_height=32, img_width=48):
        self.has_labels = has_labels
        self.num_samples = num_samples
        self.img_height = img_height
        self.img_width = img_width
        self.image_shape = (3, img_height, img_width)  # (channels, height, width)
        
        if has_labels:
            self.labels_map = {}
            for i in range(num_samples):
                label = np.array([i % 3], dtype=np.int64)
                self.labels_map[i] = label
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        image = np.random.randn(*self.image_shape).astype(np.float32)
        if self.has_labels:
            label = self.labels_map[idx]
        else:
            label = np.array([], dtype=np.int64)
        return image, label
    
    def get_details(self, idx):
        if self.has_labels:
            label = self.labels_map[idx]
        else:
            label = np.array([], dtype=np.int64)
        return MockImageDetails(label)

# Create training set without labels
training_set_no_labels = MockTrainingSet(has_labels=False, num_samples=10, img_height=32, img_width=48)

ARGS = {
    'training_set': training_set_no_labels,
    'random_seed': 0,
}
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 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
compute_fid Not yet run
unverified (harvested, no recorded run)
mingyuanzhou/SiD/metrics/sid_frechet_inception_distance.py
code served (permissive licence) · get_code("a7058b1ccaa13516")
How it ran

no invocation recorded.

compute_is Not yet run
unverified (harvested, no recorded run)
mingyuanzhou/SiD/metrics/sid_inception_score.py
code served (permissive licence) · get_code("47c7a1249e324f74")
How it ran

no invocation recorded.

compute_kid Not yet run
unverified (harvested, no recorded run)
mingyuanzhou/SiD/metrics/sid_kernel_inception_distance.py
code served (permissive licence) · get_code("5dd3f075a53b2c58")
How it ran

no invocation recorded.

compute_pr Not yet run
unverified (harvested, no recorded run)
mingyuanzhou/SiD/metrics/sid_precision_recall.py
code served (permissive licence) · get_code("b657531c701b1786")
How it ran

no invocation recorded.

sid_sampler Not yet run
unverified (harvested, no recorded run)
mingyuanzhou/SiD/sid_generate.py
code served (permissive licence) · get_code("4c9c2d2ca6c238d8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 11 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 11 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
parse_int_list 37 other papers
19 dated earlier, 18 later
2206.00364 (2022-06)
Elucidating the Design Space of Diffusion-Based Generative Models
2302.00670 (2023-02)
Stable Target Field for Reduced Variance Score Estimation in Diffusion Models
2302.04265 (2023-02)
PFGM++: Unlocking the Potential of Physics-Inspired Generative Models
and 34 more not named here
file_ext 35 other papers
21 dated earlier, 14 later
2106.07023 (2021-06)
Styleformer: Transformer based Generative Adversarial Networks with Style Vector
2111.02175 (2021-11)
Discriminator Synthesis: On reusing the other half of Generative Adversarial Networks
2111.13792 (2021-11)
LAFITE: Towards Language-Free Training for Text-to-Image Generation
and 32 more not named here
maybe_min 35 other papers
21 dated earlier, 14 later
2106.07023 (2021-06)
Styleformer: Transformer based Generative Adversarial Networks with Style Vector
2111.02175 (2021-11)
Discriminator Synthesis: On reusing the other half of Generative Adversarial Networks
2111.13792 (2021-11)
LAFITE: Towards Language-Free Training for Text-to-Image Generation
and 32 more not named here
calculate_fid_from_inception_stats 23 other papers
12 dated earlier, 11 later
2206.00364 (2022-06)
Elucidating the Design Space of Diffusion-Based Generative Models
2211.17091 (2022-11)
Refining Generative Process with Discriminator Guidance in Score-based Diffusion Models
2301.12003 (2023-01)
Minimizing Trajectory Curvature of ODE-based Generative Models
and 20 more not named here
parse_tuple 20 other papers
10 dated earlier, 10 later
2303.10137 (2023-03)
A Recipe for Watermarking Diffusion Models
2306.06991 (2023-06)
Fast Diffusion Model
2308.15321 (2023-08)
Elucidating the Exposure Bias in Diffusion Models
and 17 more not named here
compute_is 2 other papers
1 dated earlier, 1 later
2311.17101 (2023-11)
A High-Quality Robust Diffusion Framework for Corrupted Dataset
2509.24526 (2025-09)
CMT: Mid-Training for Efficient Learning of Consistency, Mean Flow, and Flow Map Models
get_feature_detector_name 2 other papers
2 later
2406.01561 (2024-06)
Guided Score identity Distillation for Data-Free One-Step Text-to-Image Generation
2509.24526 (2025-09)
CMT: Mid-Training for Efficient Learning of Consistency, Mean Flow, and Flow Map Models
compute_distances 1 other paper
1 later
2406.01561 (2024-06)
Guided Score identity Distillation for Data-Free One-Step Text-to-Image Generation
is_valid_metric 1 other paper
1 later
2406.01561 (2024-06)
Guided Score identity Distillation for Data-Free One-Step Text-to-Image Generation
register_metric 1 other paper
1 later
2406.01561 (2024-06)
Guided Score identity Distillation for Data-Free One-Step Text-to-Image Generation
sid_sampler 1 other paper
1 later
2410.14919 (2024-10)
Adversarial Score identity Distillation: Rapidly Surpassing the Teacher in One Step

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

We introduce Score identity Distillation (SiD), an innovative data-free method that distills the generative capabilities of pretrained diffusion models into a single-step generator. SiD not only facilitates an exponentially fast reduction in Fréchet inception distance (FID) during distillation but also approaches or even exceeds the FID performance of the original teacher diffusion models. By reformulating forward diffusion processes as semi-implicit distributions, we leverage three score-related identities to create an innovative loss mechanism. This mechanism achieves rapid FID reduction by training the generator using its own synthesized images, eliminating the need for real data or reverse-diffusionbased generation, all accomplished within significantly shortened generation time. Upon evaluation across four benchmark datasets, the SiD algorithm demonstrates high iteration efficiency during distillation and surpasses competing distillation approaches, whether they are one-step or few-step, data-free, or dependent on training data, in terms of generation quality. This achievement not only redefines the benchmarks for efficiency and effectiveness in diffusion distillation but also in the broader field of diffusion-based generation. The PyTorch implementation is available at https://github.com/mingyuanzhou/SiD.

For agents

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

get_harvested_code_for_paper("2404.04057")
get_code_for_paper("2404.04057")
have("2404.04057")

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

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

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

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

Connect an agent — have() is free.