SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.05233 · NeurIPS · 2021

Diffusion Models Beat GANs on Image Synthesis

Alex Nichol, Prafulla Dhariwal

arXiv · PDF · Open in the Atlas

Code that ran

33 of 50 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (13 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 24 have no contract verdict; 5 failures of our instrument; 17 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/2105.05233.json · badge: /api/ran/2105.05233.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
Janspiry/Palette-Image-to-Image-Diffusion-Models community
Papers with Code archive
7 ran · 5 no recorded run
afiaka87/clip-guided-diffusion community (classifier label)
classifier basis not recorded on the link
7 ran · 4 no recorded run
clu0/unet.cu community
Papers with Code archive
5 ran · 3 no recorded run
lucidrains/ddpm-proteins community
Papers with Code archive
3 ran · 0 no recorded run
sangyun884/fast-ode community
Papers with Code archive
2 ran · 2 no recorded run
filipbasara0/simple-diffusion community
Papers with Code archive
2 ran · 0 no recorded run
jogo175/treediffusion community
Papers with Code archive
2 ran · 0 no recorded run
LouisRouss/Diffusion-Based-Model-for-Colorization community
Papers with Code archive
1 ran · 0 no recorded run
deepfake-study/guided-diffusion community
Papers with Code archive
1 ran · 0 no recorded run
crowsonkb/guided-diffusion community
Papers with Code archive
1 ran · 0 no recorded run
jychoi118/p2-weighting community
Papers with Code archive
1 ran · 0 no recorded run
alexmaols/elucd community
Papers with Code archive
1 ran · 0 no recorded run
jerryyann/dpi community
Papers with Code archive
0 ran · 1 no recorded run
forever208/adm-es community
Papers with Code archive
0 ran · 1 no recorded run
facebookresearch/rcdm community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
AttentionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("26bd849e8995e2a1")
How it ran

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

AttentionBlock Ran
ran on a synthesized input
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("8ad49f3a007cc16c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 as nn
import numpy as np
import math

# First, we need to complete the AttentionBlock class definition
class CheckpointFunction(torch.autograd.Function):

    @staticmethod
    def forward(ctx, run_function, length, *args):
        ctx.run_function = run_function
        ctx.input_tensors = list(args[:length])
        ctx.input_params = list(args[length:])
        with torch.no_grad():
            output_tensors = ctx.run_function(*ctx.input_tensors)
        return output_tensors

    @staticmethod
    def backward(ctx, *output_grads):
        ctx.input_tensors = [x.detach().requires_grad_(True) for x in ctx.input_tensors]
        with torch.enable_grad():
            shallow_copies = [x.view_as(x) for x in ctx.input_tensors]
            output_tensors = ctx.run_function(*shallow_copies)
        input_grads = torch.autograd.grad(output_tensors, ctx.input_tensors + ctx.input_params, output_grads, allow_unused=True)
        del ctx.input_tensors
        del ctx.input_params
        del output_tensors
        return (None, None) + input_grads

class GroupNorm32(nn.GroupNorm):

    def forward(self, x):
        return super().forward(x.float()).type(x.dtype)

class QKVAttention(nn.Module):
    def __init__(self, n_heads):
        super().__init__()
        self.n_heads = n_heads

    def forward(self, qkv):
        bs, width, length = qkv.shape
        assert width % (3 * self.n_heads) == 0
        ch = width // (3 * self.n_heads)
        q, k, v = qkv.chunk(3, dim=1)
        scale = 1 / math.sqrt(math.sqrt(ch))
        weight = torch.einsum('bct,bcs->bts', (q * scale).view(bs * self.n_heads, ch, length), (k * scale).view(bs * self.n_heads, ch, length))
        weight = torch.softmax(weight.float(), dim=-1).type(weight.dtype)
        a = torch.einsum('bts,bcs->bct', weight, v.reshape(bs * self.n_heads, ch, length))
        return a.reshape(bs, -1, length)

def normalization(channels):
    return GroupNorm32(32, channels)

def zero_module(module):
    for p in module.parameters():
        p.detach().zero_()
    return module

def checkpoint(func, inputs, params, flag):
    if flag:
        args = tuple(inputs) + tuple(params)
        return CheckpointFunction.apply(func, len(inputs), *args)
    else:
        return func(*inputs)

class AttentionBlock(nn.Module):
    def __init__(
        self,
        channels,
        num_heads=1,
        num_head_channels=-1,
        use_checkpoint=False,
        use_new_attention_order=False,
    ):
        super().__init__()
        self.channels = channels
        if num_head_channels == -1:
            self.num_heads = num_heads
        else:
            assert (
                channels % num_head_channels == 0
            ), f"q,k,v channels {channels} is not divisible by num_head_channels {num_head_channels}"
            self.num_heads = channels // num_head_channels
        self.use_checkpoint = use_checkpoint
        self.norm = normalization(channels)
        self.qkv = nn.Conv1d(channels, channels * 3, 1)
        if use_new_attention_order:
            self.attention = QKVAttention(self.num_heads)
        else:
            self.attention = QKVAttention(self.num_heads)
        self.proj_out = zero_module(nn.Conv1d(channels, channels, 1))

    def forward(self, x):
        return checkpoint(self._forward, (x,), self.parameters(), self.use_checkpoint)

    def _forward(self, x):
        b, c, *spatial = x.shape
        x = x.reshape(b, c, -1)
        qkv = self.qkv(self.norm(x))
        h = self.attention(qkv)
        h = self.proj_out(h)
        return (x + h).reshape(b, c, *spatial)

INIT_ARGS = {
    'channels': 64,
    'num_heads': 4,
    'num_head_channels': -1,
    'use_checkpoint': False,
    'use_new_attention_order': False,
}

ARGS = {
    'x': torch.randn(2, 64, 8, 8),
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
DDIMScheduler Ran
ran on a synthesized input · constructed an object; no result was computed
filipbasara0/simple-diffusion/simple_diffusion/scheduler/ddim.py
code served (permissive licence) · get_code("13e6972b5fc13010")
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, DDIMScheduler: 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
import math
from unittest.mock import MagicMock

torch.manual_seed(0)

# Build a minimal mock model that satisfies how it's used in generate()
class MinimalDiffusionModel(torch.nn.Module):
    def __init__(self, in_channels=3, sample_size=4):
        super().__init__()
        self.in_channels = in_channels
        self.sample_size = sample_size
        self.linear = torch.nn.Linear(1, in_channels * sample_size * sample_size)
    
    def forward(self, x, t):
        # x shape: (batch_size, in_channels, sample_size, sample_size)
        # t is a scalar timestep
        # Return a dict with 'sample' key containing model output
        batch_size = x.shape[0]
        output = self.linear(torch.tensor([[float(t)]]))
        output = output.view(batch_size, self.in_channels, self.sample_size, self.sample_size)
        return {'sample': output}

# Create model instance
model = MinimalDiffusionModel(in_channels=3, sample_size=4)

# Define arguments for DDIMScheduler.__init__
ARGS = {
    'num_train_timesteps': 100,
    'beta_start': 0.0001,
    'beta_end': 0.02,
    'beta_schedule': 'cosine',
    'clip_sample': True,
    'set_alpha_to_one': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DDIMScheduler — 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 DDIMScheduler 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
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("2b4dc2218b2a8487")
How it ran

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

Downsample Ran
ran on a synthesized input · constructed an object; no result was computed
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("98fe2137d5940de7")
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 three parameters:
# - channels: int, number of input/output channels
# - use_conv: bool, whether to use convolution or average pooling
# - out_channel: optional int, output channels (defaults to channels)

# We'll test with use_conv=True case
channels = 3
use_conv = True
out_channel = 5

ARGS = {
    "channels": channels,
    "use_conv": use_conv,
    "out_channel": out_channel,
}
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
GaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
LouisRouss/Diffusion-Based-Model-for-Colorization/src/diffusion.py
pointer only (licence: NONE) · get_code("d985629e3d6b71c4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LouisRouss/Diffusion-Based-Model-for-Colorization 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.

GaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/ddpm-proteins/ddpm_proteins/ddpm_proteins.py
code served (permissive licence) · get_code("48680835112f36e1")
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. 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
from torch import nn
torch.manual_seed(0)

class SimpleDenoseModel(nn.Module):
    def __init__(self, channels=3, condition_dim=4):
        super().__init__()
        self.channels = channels
        self.condition_dim = condition_dim
        self.linear = nn.Linear(channels + condition_dim, channels)
    
    def forward(self, x, t, cond=None):
        return self.linear(x)

denoise_model = SimpleDenoseModel(channels=3, condition_dim=4)

ARGS = {
    'denoise_model': denoise_model,
    'image_size': 32,
    'timesteps': 100,
    'loss_type': 'l1',
    'betas': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch, tqdm — 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
GaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
deepfake-study/guided-diffusion/guided_diffusion/gaussian_diffusion.py
code served (permissive licence) · get_code("7ee620bcf78b28ac")
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. 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 enum import auto

torch.manual_seed(0)

# Define the enums and classes needed
class LossType:
    MSE = auto()
    RESCALED_MSE = auto()
    KL = auto()
    RESCALED_KL = auto()

class ModelMeanType:
    PREVIOUS_X = auto()
    START_X = auto()
    EPSILON = auto()

class ModelVarType:
    LEARNED = auto()
    FIXED_SMALL = auto()
    FIXED_LARGE = auto()
    LEARNED_RANGE = auto()

# Create valid betas - must be 1-D numpy array with values in (0, 1)
# Using a simple linear schedule from 0.0001 to 0.02 over 1000 timesteps
num_timesteps = 1000
betas = np.linspace(0.0001, 0.02, num_timesteps, dtype=np.float64)

# Construct ARGS dictionary with all required parameters
ARGS = {
    'betas': betas,
    'model_mean_type': ModelMeanType.EPSILON,
    'model_var_type': ModelVarType.FIXED_LARGE,
    'loss_type': LossType.MSE,
    'rescale_timesteps': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
GaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
crowsonkb/guided-diffusion/guided_diffusion/gaussian_diffusion.py
code served (permissive licence) · get_code("45a6c1579d9a484c")
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. 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 enum import auto

torch.manual_seed(0)

# Define the enums
class LossType:
    MSE = "MSE"
    RESCALED_MSE = "RESCALED_MSE"
    KL = "KL"
    RESCALED_KL = "RESCALED_KL"

class ModelMeanType:
    PREVIOUS_X = "PREVIOUS_X"
    START_X = "START_X"
    EPSILON = "EPSILON"

class ModelVarType:
    LEARNED = "LEARNED"
    FIXED_SMALL = "FIXED_SMALL"
    FIXED_LARGE = "FIXED_LARGE"
    LEARNED_RANGE = "LEARNED_RANGE"

# Create valid betas array - must be 1-D, all > 0, all < 1
betas = np.linspace(0.0001, 0.02, 1000, dtype=np.float64)

ARGS = {
    "betas": betas,
    "model_mean_type": ModelMeanType.EPSILON,
    "model_var_type": ModelVarType.FIXED_LARGE,
    "loss_type": LossType.MSE,
    "rescale_timesteps": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
GaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
jychoi118/p2-weighting/guided_diffusion/gaussian_diffusion.py
code served (permissive licence) · get_code("87e380d90fe4bb73")
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. 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 enum import auto

torch.manual_seed(0)

# Define the enums (copied from the function signature)
class LossType:
    MSE = "MSE"
    RESCALED_MSE = "RESCALED_MSE"
    KL = "KL"
    RESCALED_KL = "RESCALED_KL"

class ModelMeanType:
    PREVIOUS_X = "PREVIOUS_X"
    START_X = "START_X"
    EPSILON = "EPSILON"

class ModelVarType:
    LEARNED = "LEARNED"
    FIXED_SMALL = "FIXED_SMALL"
    FIXED_LARGE = "FIXED_LARGE"
    LEARNED_RANGE = "LEARNED_RANGE"

# Construct betas: a 1-D numpy array of betas for each diffusion timestep
# Standard linear schedule from 0.0001 to 0.02 over 1000 steps
num_diffusion_steps = 1000
betas = np.linspace(0.0001, 0.02, num_diffusion_steps, dtype=np.float64)

ARGS = {
    "betas": betas,
    "model_mean_type": ModelMeanType.EPSILON,
    "model_var_type": ModelVarType.LEARNED,
    "loss_type": LossType.MSE,
    "rescale_timesteps": False,
    "p2_gamma": 0,
    "p2_k": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
GaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
alexmaols/elucd/DDPM/guided_diffusion/gaussian_diffusion.py
code served (permissive licence) · get_code("2461ad8a60086135")
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. 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
import enum

torch.manual_seed(0)

# Define the enums (copied from the function signature)
class LossType(enum.Enum):
    MSE = enum.auto()
    RESCALED_MSE = enum.auto()
    KL = enum.auto()
    RESCALED_KL = enum.auto()

    def is_vb(self):
        return self == LossType.KL or self == LossType.RESCALED_KL

class ModelMeanType(enum.Enum):
    PREVIOUS_X = enum.auto()
    START_X = enum.auto()
    EPSILON = enum.auto()

class ModelVarType(enum.Enum):
    LEARNED = enum.auto()
    FIXED_SMALL = enum.auto()
    FIXED_LARGE = enum.auto()
    LEARNED_RANGE = enum.auto()

# Create valid betas: a 1-D numpy array of positive values < 1
# Using a linear schedule from 0.0001 to 0.02 over 1000 timesteps
num_timesteps = 1000
betas = np.linspace(0.0001, 0.02, num_timesteps, dtype=np.float64)

ARGS = {
    'betas': betas,
    'model_mean_type': ModelMeanType.EPSILON,
    'model_var_type': ModelVarType.LEARNED,
    'loss_type': LossType.MSE,
    'rescale_timesteps': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
QKVAttention Ran
ran on a synthesized input
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("2384e76ad3ea9835")
How it ran

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

QKVAttention Ran
ran on a synthesized input
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("8a4eb07344b8d7b7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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 math
import torch
import torch.nn as nn
import numpy as np

def count_flops_attn(model, _x, y):
    """
    A counter for the `thop` package to count the operations in an
    attention operation.
    Meant to be used like:
        macs, params = thop.profile(
            model,
            inputs=(inputs, timestamps),
            custom_ops={QKVAttention: QKVAttention.count_flops},
        )
    """
    b, c, *spatial = y[0].shape
    num_spatial = int(np.prod(spatial))
    matmul_ops = 2 * b * num_spatial ** 2 * c
    model.total_ops += torch.DoubleTensor([matmul_ops])

class QKVAttention(nn.Module):
    """
    A module which performs QKV attention and splits in a different order.
    """

    def __init__(self, n_heads):
        super().__init__()
        self.n_heads = n_heads

    def forward(self, qkv):
        """
        Apply QKV attention.
        :param qkv: an [N x (3 * H * C) x T] tensor of Qs, Ks, and Vs.
        :return: an [N x (H * C) x T] tensor after attention.
        """
        bs, width, length = qkv.shape
        assert width % (3 * self.n_heads) == 0
        ch = width // (3 * self.n_heads)
        q, k, v = qkv.chunk(3, dim=1)
        scale = 1 / math.sqrt(math.sqrt(ch))
        weight = torch.einsum('bct,bcs->bts', (q * scale).view(bs * self.n_heads, ch, length), (k * scale).view(bs * self.n_heads, ch, length))
        weight = torch.softmax(weight.float(), dim=-1).type(weight.dtype)
        a = torch.einsum('bts,bcs->bct', weight, v.reshape(bs * self.n_heads, ch, length))
        return a.reshape(bs, -1, length)

    @staticmethod
    def count_flops(model, _x, y):
        return count_flops_attn(model, _x, y)


INIT_ARGS = {
    'n_heads': 2,
}

ARGS = {
    'qkv': torch.randn(2, 12, 5),
}

if __name__ == '__main__':
    model = QKVAttention(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
QKVAttentionLegacy Ran
ran on a synthesized input
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("9fd7822b33474816")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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 math
import torch
import torch.nn as nn
import numpy as np

def count_flops_attn(model, _x, y):
    """
    A counter for the `thop` package to count the operations in an
    attention operation.
    Meant to be used like:
        macs, params = thop.profile(
            model,
            inputs=(inputs, timestamps),
            custom_ops={QKVAttention: QKVAttention.count_flops},
        )
    """
    b, c, *spatial = y[0].shape
    num_spatial = int(np.prod(spatial))
    matmul_ops = 2 * b * num_spatial ** 2 * c
    model.total_ops += torch.DoubleTensor([matmul_ops])

class QKVAttentionLegacy(nn.Module):
    """
    A module which performs QKV attention. Matches legacy QKVAttention + input/ouput heads shaping
    """

    def __init__(self, n_heads):
        super().__init__()
        self.n_heads = n_heads

    def forward(self, qkv):
        """
        Apply QKV attention.
        :param qkv: an [N x (H * 3 * C) x T] tensor of Qs, Ks, and Vs.
        :return: an [N x (H * C) x T] tensor after attention.
        """
        bs, width, length = qkv.shape
        assert width % (3 * self.n_heads) == 0
        ch = width // (3 * self.n_heads)
        q, k, v = qkv.reshape(bs * self.n_heads, ch * 3, length).split(ch, dim=1)
        scale = 1 / math.sqrt(math.sqrt(ch))
        weight = torch.einsum('bct,bcs->bts', q * scale, k * scale)
        weight = torch.softmax(weight.float(), dim=-1).type(weight.dtype)
        a = torch.einsum('bts,bcs->bct', weight, v)
        return a.reshape(bs, -1, length)

    @staticmethod
    def count_flops(model, _x, y):
        return count_flops_attn(model, _x, y)


INIT_ARGS = {
    'n_heads': 2,
}

ARGS = {
    'qkv': torch.randn(2, 12, 8),
}

if __name__ == '__main__':
    model = QKVAttentionLegacy(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SiLU Ran
ran on a synthesized input
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("1da15c720fdd1b92")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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

class SiLU(nn.Module):

    def forward(self, x):
        return x * torch.sigmoid(x)


INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 4)
}

if __name__ == '__main__':
    model = SiLU(**INIT_ARGS)
    output = model(**ARGS)
    print(output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SpacedDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
jogo175/treediffusion/models/diffusion/spaced_diff.py
pointer only (licence: NONE) · get_code("9193321e03a428a0")
How it ran

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

Upsample Ran
ran on a synthesized input · constructed an object; no result was computed
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("bd5e9f697bbd1762")
How it ran

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

Upsample Ran
ran on a synthesized input · constructed an object; no result was computed
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("5740a56d8f8c2afb")
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)

ARGS = {
    "channels": 4,
    "use_conv": True,
    "out_channel": 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 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
alphanumeric_filter Ran
ran on a synthesized input
afiaka87/clip-guided-diffusion/cgd/script_util.py
code served (permissive licence) · get_code("8caf32fce73095ab")
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 re

def alphanumeric_filter(s: str) -> str:
    ALPHANUMERIC_REGEX = '[^\\w\\s]'
    return re.sub(ALPHANUMERIC_REGEX, '', s).replace(' ', '_')

ARGS = {
    's': 'Hello, World! This is a test-123 with @special #characters.'
}
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
broadcat Ran
ran, honoured the contract we drafted
lucidrains/ddpm-proteins/ddpm_proteins/ddpm_proteins.py
code served (permissive licence) · get_code("f50a8d20efb35c68")
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, 12) 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 test tensors with different shapes that are broadcastable
# along all dimensions except the concatenation dimension
tensor1 = torch.randn(2, 4)  # shape (2, 4)
tensor2 = torch.randn(1, 4)  # shape (1, 4) - broadcastable to (2, 4) except dim 1
tensor3 = torch.randn(2, 4)  # shape (2, 4)

tensors = [tensor1, tensor2, tensor3]

ARGS = {
    'tensors': tensors,
    'dim': -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 Tensor, ndim 2, dtype family float, shape (2, 12) — shape (2, 12) 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
check_folder Ran
ran; our contract draft was wrong, not the code
sangyun884/fast-ode/guided_diffusion/gaussian_diffusion.py
pointer only (licence: NONE) · get_code("e21cebaf03604f02")
How it ran

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

cosine_beta_schedule Ran
ran, honoured the contract we drafted
lucidrains/ddpm-proteins/ddpm_proteins/ddpm_proteins.py
code served (permissive licence) · get_code("d069cafc41670adf")
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 1, dtype family float, shape (100,) 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

def cosine_beta_schedule(timesteps, s=0.008):
    """
    cosine schedule
    as proposed in https://openreview.net/forum?id=-NEXDKk8gZ
    """
    steps = timesteps + 1
    x = np.linspace(0, timesteps, steps)
    alphas_cumprod = np.cos((x / timesteps + s) / (1 + s) * np.pi * 0.5) ** 2
    alphas_cumprod = alphas_cumprod / alphas_cumprod[0]
    betas = 1 - alphas_cumprod[1:] / alphas_cumprod[:-1]
    return np.clip(betas, a_min=0, a_max=0.999)

ARGS = {
    "timesteps": 100,
    "s": 0.008
}
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 ndarray, ndim 1, dtype family float, shape (100,) — shape (100,) 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
cosine_beta_schedule Ran
ran, honoured the contract we drafted
filipbasara0/simple-diffusion/simple_diffusion/scheduler/ddim.py
code served (permissive licence) · get_code("b236cc9fdeeb2655")
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 (10,) 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 = {
    "timesteps": 10,
    "beta_start": 0.0,
    "beta_end": 0.999,
    "s": 0.008,
}
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 (10,) — shape (10,) 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
denorm Ran
ran, honoured the contract we drafted
sangyun884/fast-ode/guided_diffusion/gaussian_diffusion.py
pointer only (licence: NONE) · get_code("f1c35d187bd5b161")
How it ran

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

extract Ran
ran; our contract draft was wrong, not the code
jogo175/treediffusion/models/diffusion/spaced_diff.py
pointer only (licence: NONE) · get_code("803681ed62fd000a")
How it ran

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

fetch Ran
ran on a synthesized input
afiaka87/clip-guided-diffusion/cgd/script_util.py
code served (permissive licence) · get_code("9f95b3f3132f00a1")
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 BufferedReader. 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 io
import tempfile
import os

# Create a temporary file with some binary content
temp_dir = tempfile.mkdtemp()
temp_file_path = os.path.join(temp_dir, "test_file.bin")
with open(temp_file_path, 'wb') as f:
    f.write(b"test binary content")

# Define ARGS with a valid file path
ARGS = {
    'url_or_path': temp_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
requests — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BufferedReader — a BufferedReader 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
gamma_embedding Ran
ran; our contract draft was wrong, not the code
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("c13200b52f85fb0b")
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 gammas: a 1-D tensor of N indices (batch size 2), can be fractional
gammas = torch.tensor([0.5, 1.5], dtype=torch.float32)

# Create dim: the dimension of the output (must be even or odd, let's use 4)
dim = 4

# Create max_period: controls minimum frequency of embeddings
max_period = 10000

ARGS = {
    "gammas": gammas,
    "dim": dim,
    "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
parse_prompt Ran
ran on a synthesized input
afiaka87/clip-guided-diffusion/cgd/script_util.py
code served (permissive licence) · get_code("0a8c631b651f4813")
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, 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

torch.manual_seed(0)

# Analyzing the function:
# - parse_prompt takes a single parameter: prompt (a string)
# - It checks if prompt starts with 'http://' or 'https://'
# - It splits the prompt by ':' and performs string operations
# - Returns a tuple of (string, float)

# Test case 1: A simple prompt with colon-separated values
prompt_simple = "image.jpg:0.5"

# Test case 2: A URL-like prompt
prompt_url = "https://example.com:8080:0.75"

ARGS = {
    "prompt": prompt_simple
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
range_loss Ran
ran on a synthesized input
afiaka87/clip-guided-diffusion/cgd/losses.py
code served (permissive licence) · get_code("4284713ef6b7ead5")
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

torch.manual_seed(0)

# Construct a tensor that will be used as input to range_loss
# The function expects a tensor with at least 4 dimensions (uses mean([1, 2, 3]))
# Shape: [batch=2, dim1=4, dim2=3, dim3=5]
input_tensor = torch.randn(2, 4, 3, 5)

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 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
spherical_dist_loss Ran
ran on a synthesized input
afiaka87/clip-guided-diffusion/cgd/losses.py
code served (permissive licence) · get_code("5bd6891b5cc4506d")
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 as th
from torch.nn import functional as tf

th.manual_seed(0)

# Create two small tensors with batch size 2 and dimension 4
x = th.randn(2, 4)
y = th.randn(2, 4)

ARGS = {
    "x": x,
    "y": y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 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
support_sz Ran
ran; our contract draft was wrong, not the code
afiaka87/clip-guided-diffusion/cgd/ResizeRight/interp_methods.py
pointer only (licence: MIT); the stored copy get_code serves, from merlresearch/SteeredDiffusion, is pointer only (licence: AGPL-3.0) · get_code("eb3584d528a35911")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from merlresearch/SteeredDiffusion, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

timestep_embedding Ran
ran; our contract draft was wrong, not the code
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("5cf36092e6ff1604")
How it ran

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

tv_loss Ran
ran on a synthesized input
afiaka87/clip-guided-diffusion/cgd/losses.py
code served (permissive licence) · get_code("4d1cb7924c3fd431")
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 as th
import torch.nn as nn

th.manual_seed(0)

# Create a small tensor for input
# The function expects a tensor with spatial dimensions (height, width)
# and processes batches. Looking at the indexing:
# input[..., :-1, 1:] suggests last two dims are spatial (H, W)
# The function returns mean([1, 2, 3]), suggesting batch dimension at 0
# and channels at dimension 1
# Shape: (batch, channels, height, width)
input_tensor = th.randn(2, 4, 3, 5)

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 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
EmbedBlock Not yet run
unverified (harvested, no recorded run)
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("783b16025841a763")
How it ran

no invocation recorded.

EmbedSequential Not yet run
unverified (harvested, no recorded run)
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("d34634a4460e18ca")
How it ran

no invocation recorded.

GaussianDiffusion Not yet run
unverified (harvested, no recorded run)
jerryyann/dpi/guided_diffusion/gaussian_diffusion.py
pointer only (licence: NONE) · get_code("784cb6f7dc2a2b74")
How it ran

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

GaussianDiffusion Not yet run
unverified (harvested, no recorded run)
forever208/adm-es/guided_diffusion/gaussian_diffusion.py
code served (permissive licence) · get_code("feb8aaa0fa488906")
How it ran

no invocation recorded.

GaussianDiffusion Not yet run
unverified (harvested, no recorded run)
sangyun884/fast-ode/guided_diffusion/gaussian_diffusion.py
pointer only (licence: NONE) · get_code("11af4361b4a2cb72")
How it ran

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

GaussianDiffusion Not yet run
unverified (harvested, no recorded run)
facebookresearch/rcdm/guided_diffusion_rcdm/gaussian_diffusion.py
code served (permissive licence) · get_code("292ca31b16848f08")
How it ran

no invocation recorded.

ResBlock Not yet run
unverified (harvested, no recorded run)
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("4a5965fce1c935c5")
How it ran

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

ResBlock Not yet run
unverified (harvested, no recorded run)
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("694e1cddc1c9b050")
How it ran

no invocation recorded.

TimestepEmbedSequential Not yet run
unverified (harvested, no recorded run)
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("d9ce54d68567e11c")
How it ran

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

UNet Not yet run
unverified (harvested, no recorded run)
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("a21b0ea52f83ee5b")
How it ran

no invocation recorded.

UNetModel Not yet run
unverified (harvested, no recorded run)
clu0/unet.cu/dev/unet.py
pointer only (licence: NONE) · get_code("0e94d8645e22f0f0")
How it ran

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

count_flops_attn Not yet run
unverified (harvested, no recorded run)
Janspiry/Palette-Image-to-Image-Diffusion-Models/models/guided_diffusion_modules/unet.py
code served (permissive licence) · get_code("c19cbce17b969d76")
How it ran

no invocation recorded.

cubic Not yet run
unverified (harvested, no recorded run)
afiaka87/clip-guided-diffusion/cgd/ResizeRight/interp_methods.py
pointer only (licence: MIT); the stored copy get_code serves, from merlresearch/SteeredDiffusion, is pointer only (licence: AGPL-3.0) · get_code("69f91d76e488739d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from merlresearch/SteeredDiffusion, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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_field_of_view Not yet run
unverified (harvested, no recorded run)
afiaka87/clip-guided-diffusion/cgd/ResizeRight/resize_right.py
code served (permissive licence) · get_code("1353cd3aa1bf5207")
How it ran

no invocation recorded.

get_projected_grid Not yet run
unverified (harvested, no recorded run)
afiaka87/clip-guided-diffusion/cgd/ResizeRight/resize_right.py
code served (permissive licence) · get_code("9aa17993a0cc9ce7")
How it ran

no invocation recorded.

set_framework_dependencies Not yet run
unverified (harvested, no recorded run)
afiaka87/clip-guided-diffusion/cgd/ResizeRight/interp_methods.py
pointer only (licence: MIT); the stored copy get_code serves, from merlresearch/SteeredDiffusion, is pointer only (licence: AGPL-3.0) · get_code("ae962b80c12bc789")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from merlresearch/SteeredDiffusion, and AGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

tensor_imsave Not yet run
unverified (harvested, no recorded run)
sangyun884/fast-ode/guided_diffusion/gaussian_diffusion.py
pointer only (licence: NONE) · get_code("3f4c6747dee50c0b")
How it ran

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

Also present in other papers' code

Of 50 samples lifted from this paper's linked repositories, 50 carry a function identity and 0 do not. Of the 50 distinct functions with an identity, 18 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 17 later) and 32 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
broadcat
brick of this paper's assembly: helper
20 other papers
20 later · 5 only as an assembly brick
2205.07514 (2022-05)
Residual Local Feature Network for Efficient Super-Resolution
2211.10658 (2022-11)
EDGE: Editable Dance Generation From Music
and 17 more not named here
TimestepEmbedSequential
brick of this paper's assembly: model
11 other papers
1 dated earlier, 10 later · 9 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2209.15264 (2022-09)
Diffusion-based Image Translation using Disentangled Style and Content Representation
2303.05754 (2023-03)
Decomposed Diffusion Sampler for Accelerating Large-Scale Inverse Problems
and 8 more not named here
QKVAttention
brick of this paper's assembly: model
2 other papers
2 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
2508.03256 (2025-08)
Beyond Isolated Words: Diffusion Brush for Handwritten Text-Line Generation
QKVAttentionLegacy
brick of this paper's assembly: model
2 other papers
2 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
2508.03256 (2025-08)
Beyond Isolated Words: Diffusion Brush for Handwritten Text-Line Generation
count_flops_attn
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
2508.03256 (2025-08)
Beyond Isolated Words: Diffusion Brush for Handwritten Text-Line Generation
cubic 2 other papers
2 later
2203.13333 (2022-03)
CLIP-Mesh: Generating textured meshes from text using pretrained image-text models
2310.00224 (2023-10)
Steered Diffusion: A Generalized Framework for Plug-and-Play Conditional Image Synthesis
set_framework_dependencies 2 other papers
2 later
2203.13333 (2022-03)
CLIP-Mesh: Generating textured meshes from text using pretrained image-text models
2310.00224 (2023-10)
Steered Diffusion: A Generalized Framework for Plug-and-Play Conditional Image Synthesis
support_sz 2 other papers
2 later
2203.13333 (2022-03)
CLIP-Mesh: Generating textured meshes from text using pretrained image-text models
2310.00224 (2023-10)
Steered Diffusion: A Generalized Framework for Plug-and-Play Conditional Image Synthesis
AttentionBlock
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
Downsample
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
EmbedBlock
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
EmbedSequential
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
GaussianDiffusion
brick of this paper's assembly: entry
1 other paper
1 later
2402.03478 (2024-02)
Estimating Epistemic and Aleatoric Uncertainty with a Single Model
SiLU
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
Upsample
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion
cosine_beta_schedule
brick of this paper's assembly: scheduler
1 other paper
1 later
2401.09031 (2024-01)
Data Attribution for Diffusion Models: Timestep-induced Bias in Influence Estimation
extract
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1503.03585 (2015-03)
Deep Unsupervised Learning using Nonequilibrium Thermodynamics
gamma_embedding
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2404.09290 (2024-04)
RoofDiffusion: Constructing Roofs from Severely Corrupted Point Data via Diffusion

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 show that diffusion models can achieve image sample quality superior to the current state-of-the-art generative models. We achieve this on unconditional image synthesis by finding a better architecture through a series of ablations. For conditional image synthesis, we further improve sample quality with classifier guidance: a simple, compute-efficient method for trading off diversity for fidelity using gradients from a classifier. We achieve an FID of 2.97 on ImageNet 128×128, 4.59 on ImageNet 256×256, and 7.72 on ImageNet 512×512, and we match BigGAN-deep even with as few as 25 forward passes per sample, all while maintaining better coverage of the distribution. Finally, we find that classifier guidance combines well with upsampling diffusion models, further improving FID to 3.94 on ImageNet 256×256 and 3.85 on ImageNet 512×512. We release our code at https://github.com/openai/guided-diffusion.

For agents

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

get_harvested_code_for_paper("2105.05233")
get_code_for_paper("2105.05233")
have("2105.05233")

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

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

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

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

Connect an agent — have() is free.