SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.12598 · NeurIPS · 2022

Classifier-Free Diffusion Guidance

Tim Salimans, Jonathan Ho

arXiv · PDF · Open in the Atlas

Code that ran

21 of 30 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (12 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 14 have no contract verdict; 7 failures of our instrument; 9 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/2207.12598.json · badge: /api/ran/2207.12598.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
g4vrel/DDPM community
Papers with Code archive
11 ran · 2 no recorded run
elodiegermani/style-transfer_diffusion community
Papers with Code archive
5 ran · 1 no recorded run
kjsman/stable-diffusion-pytorch community
Papers with Code archive
2 ran · 5 no recorded run
dewenzeng/clsp community
Papers with Code archive
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 1 no recorded run
FunctionStatusWhere it lives
AttentionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("fbf59f94fbb9dc9e")
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 an instance of its own class, AttentionBlock: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F
from einops import rearrange, parse_shape, repeat

torch.manual_seed(0)

class AttentionBlock(nn.Module):

    def __init__(self, in_channels, groups=32):
        super().__init__()
        self.norm = nn.GroupNorm(num_groups=groups, num_channels=in_channels)
        self.Q = nn.Conv2d(in_channels, in_channels, 1)
        self.K = nn.Conv2d(in_channels, in_channels, 1)
        self.V = nn.Conv2d(in_channels, in_channels, 1)
        self.proj = nn.Conv2d(in_channels, in_channels, 1)

    def forward(self, x):
        h = self.norm(x)
        q = rearrange(self.Q(h), 'b c h w -> b (h w) c')
        k = rearrange(self.K(h), 'b c h w -> b (h w) c')
        v = rearrange(self.V(h), 'b c h w -> b (h w) c')
        out = F.scaled_dot_product_attention(q, k, v)
        out = rearrange(out, 'b (h w) c -> b c h w', **parse_shape(x, 'b c h w'))
        return x + self.proj(out)


ARGS = {
    'in_channels': 4,
    'groups': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AttentionBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AttentionBlock 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
ConditioningBlock Ran
ran on a synthesized input · constructed an object; no result was computed
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("6a8336d50ac2b63a")
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 an instance of its own class, ConditioningBlock: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'dim_out': 16,
    'emb_dim': 32,
    'scale_shift': True,
}
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 ConditioningBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConditioningBlock 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
ContextUnet Ran
ran on a synthesized input · constructed an object; no result was computed
elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py
code served (permissive licence) · get_code("f6bc6f9aea13d9b8")
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 an instance of its own class, ContextUnet: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'in_channels': 2,
    'n_feat': 64,
    'n_classes': 10,
}
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 ContextUnet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ContextUnet 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
Downsample Ran
ran on a synthesized input · constructed an object; no result was computed
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("2cdc7e0af049b4ea")
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 an instance of its own class, Downsample: the run constructed the object and did not call it, so no result was computed. 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 Downsample class takes in_channels and out_channels as parameters
# It creates a Conv2d layer and applies it in the forward pass
# We need to provide valid integer values for these parameters

in_channels = 3
out_channels = 16

ARGS = {
    "in_channels": in_channels,
    "out_channels": out_channels,
}
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 Downsample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Downsample 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
EmbedFC Ran
ran on a synthesized input · constructed an object; no result was computed
elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py
code served (permissive licence) · get_code("db6eecd6a0d6e2ab")
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 an instance of its own class, EmbedFC: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'input_dim': 4,
    'emb_dim': 8,
}
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 EmbedFC — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EmbedFC 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
GaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("20e8dff4c32fb858")
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 an instance of its own class, GaussianDiffusion: the run constructed the object and did not call it, so no result was computed. 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 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'scheduler_type': 'linear',
    'timesteps': 10,
    'device': 'cpu',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GaussianDiffusion — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GaussianDiffusion 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
GaussianDiffusionSampler Ran
ran on a synthesized input
dewenzeng/clsp/ddpm.py
pointer only (licence: NONE) · get_code("105db34d26e2d338")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dewenzeng/clsp 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.

GuidedUnet Ran
ran on a synthesized input · constructed an object; no result was computed
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("3845f2deb4ec0887")
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 an instance of its own class, GuidedUnet: the run constructed the object and did not call it, so no result was computed. 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
import math
from einops import rearrange, repeat

torch.manual_seed(0)

ARGS = {
    "ch": 128,
    "ch_mul": [1, 2, 2, 2],
    "att_channels": [0, 1, 0, 0],
    "groups": 32,
    "dropout": 0.1,
    "scale_shift": True,
    "num_classes": 10,
    "p_uncond": 0.2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GuidedUnet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GuidedUnet 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
ResBlock Ran
ran on a synthesized input · constructed an object; no result was computed
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("d46574b8bb2019c3")
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 an instance of its own class, ResBlock: the run constructed the object and did not call it, so no result was computed. 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)

# Define ARGS dict with all parameters for ResBlock.__init__
ARGS = {
    'dim_in': 4,
    'dim_out': 8,
    'emb_dim': 16,
    'scale_shift': True,
    'num_groups': 2,
    'dropout': 0.1,
    'attn': False
}

# Verify by instantiating and calling forward
if __name__ == '__main__':
    resblock = nn.ResBlock(**ARGS)
    
    # Create dummy inputs for forward pass
    batch_size = 2
    x = torch.randn(batch_size, ARGS['dim_in'], 3, 3)  # (B, C_in, H, W)
    emb = torch.randn(batch_size, ARGS['emb_dim'])      # (B, emb_dim)
    
    # Test forward pass
    output = resblock(x, emb)
    print(f"Input shape: {x.shape}")
    print(f"Embedding shape: {emb.shape}")
    print(f"Output shape: {output.shape}")
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResBlock 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
ResidualConvBlock Ran
ran on a synthesized input · constructed an object; no result was computed
elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py
code served (permissive licence) · get_code("f78260a23a053cb4")
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 an instance of its own class, ResidualConvBlock: the run constructed the object and did not call it, so no result was computed. 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 ResidualConvBlock.__init__ takes:
# - in_channels: int
# - out_channels: int
# - is_res: bool (default False)

# The forward method expects:
# - x: torch.Tensor of shape (batch, in_channels, D, H, W) for 3D convolution

ARGS = {
    "in_channels": 3,
    "out_channels": 4,
    "is_res": True,
}
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 ResidualConvBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResidualConvBlock 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
UnetDown Ran
ran on a synthesized input · constructed an object; no result was computed
elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py
code served (permissive licence) · get_code("111b04642f50bdd2")
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 an instance of its own class, UnetDown: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "in_channels": 3,
    "out_channels": 16,
}
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 UnetDown — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a UnetDown 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
UnetUp Ran
ran on a synthesized input · constructed an object; no result was computed
elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py
code served (permissive licence) · get_code("a7308172779a61da")
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 an instance of its own class, UnetUp: the run constructed the object and did not call it, so no result was computed. 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)

# UnetUp.__init__ takes:
# - in_channels: int
# - out_channels: int
# 
# UnetUp.forward takes:
# - x: torch.Tensor (input feature maps to upsample)
# - skip: torch.Tensor (skip connection from encoder)
#
# The forward method concatenates x and skip along dimension 1 (channels),
# so they must have matching spatial dimensions but different channel counts.
# Then it passes through ConvTranspose3d(in_channels, out_channels, 2, 2)
# which expects in_channels to match x.shape[1] after concatenation.
#
# Looking at the usage: torch.cat((x, skip), 1) concatenates on channel dim,
# so x and skip have same batch and spatial dims but may differ in channels.
# After concat, total channels = x.shape[1] + skip.shape[1], which should equal in_channels.

in_channels_value = 8  # x channels (4) + skip channels (4)
out_channels_value = 6

# Create dummy tensors for testing
# Batch size 2, spatial dims 4x4x4, then we'll construct x and skip appropriately
batch_size = 2
spatial_d = 4
spatial_h = 4
spatial_w = 4

x_channels = 4
skip_channels = 4

x_tensor = torch.randn(batch_size, x_channels, spatial_d, spatial_h, spatial_w)
skip_tensor = torch.randn(batch_size, skip_channels, spatial_d, spatial_h, spatial_w)

ARGS = {
    'in_channels': in_channels_value,
    'out_channels': out_channels_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 UnetUp — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a UnetUp 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
Upsample Ran
ran on a synthesized input · constructed an object; no result was computed
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("24cbc2ae131f9498")
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 an instance of its own class, Upsample: the run constructed the object and did not call it, so no result was computed. 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 Upsample module takes in_channels and out_channels as parameters
# It uses them to construct:
# - nn.Upsample (which doesn't use these parameters)
# - nn.Conv2d(in_channels, out_channels, 3, padding=1)

# So we need to provide integer values for in_channels and out_channels
in_channels = 3
out_channels = 5

ARGS = {
    'in_channels': in_channels,
    'out_channels': out_channels,
}
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 Upsample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Upsample 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
create_bytes_table Ran
ran on a synthesized input
kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py
code served (permissive licence) · get_code("982a69b452b3abeb")
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 unicodedata

# The function create_bytes_table takes no parameters
ARGS = {}
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 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
ddpm_schedules Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from teapearce/conditional_diffusion_mnist
pointer only · get_code("1c539f5aa6ca79d2")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

extract Ran
ran; our contract draft was wrong, not the code
dewenzeng/clsp/ddpm.py
pointer only (licence: NONE) · get_code("411e30457e916104")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, dewenzeng/clsp 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.

get_timestep_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("f9a074c3439ca741")
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 math

torch.manual_seed(0)

# Create a 1D tensor of timesteps with batch size 2
timesteps = torch.tensor([1, 5], dtype=torch.int64)

# Embedding dimension
embedding_dim = 4

# Downscale frequency shift parameter
downscale_freq_shift = 0.0

# Max period parameter
max_period = 10000

ARGS = {
    'timesteps': timesteps,
    'embedding_dim': embedding_dim,
    'downscale_freq_shift': downscale_freq_shift,
    'max_period': max_period
}
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
make_attn Ran
ran; our contract draft was wrong, not the code
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("fc896cf6190912f4")
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 AttentionBlock. 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
from einops import rearrange, parse_shape

torch.manual_seed(0)

ARGS = {
    "dim_out": 32,
    "attn": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AttentionBlock — a AttentionBlock output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AttentionBlock 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
make_block Ran
ran; our contract draft was wrong, not the code
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("df8230699cd28a82")
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 Sequential. 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)

ARGS = {
    "dim_in": 4,
    "dim_out": 8,
    "num_groups": 2,
    "dropout": 0.5
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
make_skip_connection Ran
ran; our contract draft was wrong, not the code
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("883c1ab882e33f3b")
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 Identity. 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)

ARGS = {
    "dim_in": 3,
    "dim_out": 3,
}
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 Identity — a Identity output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Identity 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
pairwise Ran
ran; our contract draft was wrong, not the code
kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py
code served (permissive licence) · get_code("df31b88dfd9608ff")
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 zip. 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)

# The function pairwise takes a sequence and returns consecutive pairs
# It uses iter() on the sequence, calls next() on one iterator,
# and zips two iterators together
# So seq needs to be an iterable

# We can use a list as the sequence
seq = [1, 2, 3, 4, 5]

ARGS = {
    "seq": seq
}
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 zip — a zip output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a zip 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
DDPM Not yet run
unverified (harvested, no recorded run)
elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py
code served (permissive licence) · get_code("0da20a659b48b38f")
How it ran

no invocation recorded.

KEulerAncestralSampler Not yet run
unverified (harvested, no recorded run)
kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py
code served (permissive licence) · get_code("2334501499153205")
How it ran

no invocation recorded.

KEulerSampler Not yet run
unverified (harvested, no recorded run)
kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py
code served (permissive licence) · get_code("7be7f5500c629aa9")
How it ran

no invocation recorded.

KLMSSampler Not yet run
unverified (harvested, no recorded run)
kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py
code served (permissive licence) · get_code("670bc184479669c7")
How it ran

no invocation recorded.

Tokenizer Not yet run
unverified (harvested, no recorded run)
kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py
code served (permissive licence) · get_code("05ee784f97ca2b95")
How it ran

no invocation recorded.

ablation_sampler Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from ghliu/mdm
pointer only · get_code("9fbf646e18eed1db")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

generate Not yet run
unverified (harvested, no recorded run)
kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py
code served (permissive licence) · get_code("f3f744a1397430c9")
How it ran

no invocation recorded.

make_mask Not yet run
unverified (harvested, no recorded run)
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("519cace55bd6c411")
How it ran

no invocation recorded.

sample_guidance Not yet run
unverified (harvested, no recorded run)
g4vrel/DDPM/sample.py
code served (permissive licence) · get_code("967f89e7cb02bdf9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 30 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 3 later) and 26 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
ablation_sampler
brick of this paper's assembly: entry
12 other papers
1 dated earlier, 11 later
2206.00364 (2022-06)
Elucidating the Design Space of Diffusion-Based Generative Models
2303.10137 (2023-03)
A Recipe for Watermarking Diffusion Models
2310.01236 (2023-10)
Mirror Diffusion Models for Constrained and Watermarked Generation
and 9 more not named here
ddpm_schedules
brick of this paper's assembly: scheduler
4 other papers
1 dated earlier, 3 later · 1 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2212.08228 (2022-12)
SADM: Sequence-Aware Diffusion Model for Longitudinal Medical Image Generation
2307.11122 (2023-07)
Diffusion Models for Probabilistic Deconvolution of Galaxy Images
and 1 more not named here
EmbedFC
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 2 only as an assembly brick
2205.11487 (2022-05)
Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
2307.11122 (2023-07)
Diffusion Models for Probabilistic Deconvolution of Galaxy Images
GaussianDiffusion
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2006.11239 (2020-06)
Denoising Diffusion Probabilistic 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-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

Classifier guidance is a recently introduced method to trade off mode coverage and sample fidelity in conditional diffusion models post training, in the same spirit as low temperature sampling or truncation in other types of generative models. Classifier guidance combines the score estimate of a diffusion model with the gradient of an image classifier and thereby requires training an image classifier separate from the diffusion model. It also raises the question of whether guidance can be performed without a classifier. We show that guidance can be indeed performed by a pure generative model without such a classifier: in what we call classifier-free guidance, we jointly train a conditional and an unconditional diffusion model, and we combine the resulting conditional and unconditional score estimates to attain a trade-off between sample quality and diversity similar to that obtained using classifier guidance.

For agents

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

get_harvested_code_for_paper("2207.12598")
get_code_for_paper("2207.12598")
have("2207.12598")

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

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

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

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

Connect an agent — have() is free.