SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.09509 · 2024

CleanDiffuser: An Easy-to-use Modularized Library for Diffusion Models in Decision Making

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 3 failures of our instrument; 1 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/2406.09509.json · badge: /api/ran/2406.09509.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
cleandiffuserteam/cleandiffuser canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
Josh00-Lu/DiffusionVeteran community (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
carldegio/curiosity-diffuser community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
compare_properties Ran
ran on a synthesized input
Josh00-Lu/DiffusionVeteran/cleandiffuser/diffusion/consistency_model.py
code served (permissive licence) · get_code("53247afb0c946c2f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

class SimpleObject:
    def __init__(self):
        self.tensor_prop = torch.randn(2, 4)
        self.array_prop = np.random.randn(3, 5)
        self.scalar_prop = 42
        self.string_prop = "test"

class AnotherObject:
    def __init__(self):
        self.tensor_prop = torch.randn(2, 4)
        self.array_prop = np.random.randn(3, 5)
        self.scalar_prop = 42
        self.string_prop = "test"

obj1 = SimpleObject()
obj2 = AnotherObject()

# Make some properties identical for testing
obj2.tensor_prop = obj1.tensor_prop.clone()
obj2.array_prop = obj1.array_prop.copy()
obj2.scalar_prop = obj1.scalar_prop
obj2.string_prop = obj1.string_prop

properties = ["tensor_prop", "array_prop", "scalar_prop", "string_prop"]

ARGS = {
    "obj1": obj1,
    "obj2": obj2,
    "properties": properties,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
erf Ran
ran on a synthesized input
Josh00-Lu/DiffusionVeteran/cleandiffuser/diffusion/consistency_model.py
code served (permissive licence) · get_code("51b9b4b07aefd367")
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 (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 numpy as np
import torch

torch.manual_seed(0)

# The erf function takes a single parameter 'x'
# It uses numpy operations on x: np.sign, np.abs, np.exp
# So x should be a numpy array or something compatible with numpy operations

x = np.array([0.5, 1.2, -0.3, 2.1])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
get_image_coordinates Ran
ran on a synthesized input
Josh00-Lu/DiffusionVeteran/cleandiffuser/nn_condition/resnets.py
code served (permissive licence) · get_code("9254f1964a2be89d")
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 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 torch

torch.manual_seed(0)

ARGS = {
    "h": 4,
    "w": 3,
    "normalise": False
}
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 3, 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
get_norm Ran
ran on a synthesized input
Josh00-Lu/DiffusionVeteran/cleandiffuser/nn_condition/resnets.py
code served (permissive licence) · get_code("faff90ffa89289cd")
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 GroupNorm. 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 = {
    "channel": 32,
    "use_group_norm": True,
    "group_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 GroupNorm — a GroupNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GroupNorm 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
inference Ran
ran; our contract draft was wrong, not the code
cleandiffuserteam/cleandiffuser/pipelines/dp_pusht.py
code served (permissive licence) · get_code("c387df835616a3b5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Stand-in classes and objects

class StandInNormalizer:
    def __init__(self, shape):
        self.shape = shape
    
    def normalize(self, x):
        return x / (np.max(np.abs(x)) + 1e-8)
    
    def unnormalize(self, x):
        return x * 2.0

class StandInDataset:
    def __init__(self):
        self.normalizer = {
            'obs': {
                'state': StandInNormalizer((2, 4)),
                'keypoint': StandInNormalizer((2, 18)),
                'agent_pos': StandInNormalizer((2, 2)),
            },
            'action': StandInNormalizer((2, 8, 3)),
        }

class StandInAgent(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 24)
    
    def sample(self, prior, n_samples, sample_steps, solver, condition_cfg, w_cfg, use_ema):
        # prior shape: (num_envs, horizon, action_dim) = (2, 8, 3)
        # condition_cfg shape: (num_envs, ...) depends on nn type
        batch_size = prior.shape[0]
        horizon = prior.shape[1]
        action_dim = prior.shape[2]
        naction = torch.randn(batch_size, horizon, action_dim)
        return naction, None

class StandInEnv:
    def __init__(self):
        self.obs_shape = (2, 4)
    
    def reset(self):
        return np.random.randn(2, 4).astype(np.float32)
    
    def step(self, action):
        obs = np.random.randn(2, 4).astype(np.float32)
        reward = np.array([0.5, 0.6])
        done = np.array([False, False])
        info = {}
        return obs, reward, done, info

class StandInEnvs:
    def __init__(self):
        self.envs = [StandInEnv()]
    
    def reset(self):
        return np.random.randn(2, 4).astype(np.float32)
    
    def step(self, action):
        obs = np.random.randn(2, 4).astype(np.float32)
        reward = np.array([0.5, 0.6])
        done = np.array([False, False])
        info = {}
        return obs, reward, done, info

class StandInLogger:
    def video_init(self, env, enable, video_id):
        pass

class StandInArgs:
    def __init__(self):
        self.diffusion = 'ddpm'
        self.eval_episodes = 4
        self.num_envs = 2
        self.max_episode_steps = 16
        self.save_video = False
        self.env_name = 'pusht-v0'
        self.device = 'cpu'
        self.obs_steps = 2
        self.action_steps = 2
        self.horizon = 8
        self.action_dim = 3
        self.sample_steps = 10
        self.nn = 'chi_unet'

ARGS = {
    'args': StandInArgs(),
    'envs': StandInEnvs(),
    'dataset': StandInDataset(),
    'agent': StandInAgent(),
    'logger': StandInLogger(),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_dir Ran
ran; our contract draft was wrong, not the code
Josh00-Lu/DiffusionVeteran/pipelines/utils.py
code served (permissive licence) · get_code("436a7981ede1cf9d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile

def make_dir(dir_path):
    """Create directory if it does not already exist."""
    try:
        os.makedirs(dir_path)
    except OSError:
        pass
    return dir_path

# Create a temporary directory path that doesn't exist yet
temp_base = tempfile.gettempdir()
test_dir_path = os.path.join(temp_base, "test_make_dir_" + str(os.getpid()))

ARGS = {
    "dir_path": test_dir_path
}
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
modulate Ran
ran; our contract draft was wrong, not the code
carldegio/curiosity-diffuser/tutorials/4_customize_your_diffusion_network_backbone.py
code served (permissive licence) · get_code("03310bba324ae4fb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned 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

torch.manual_seed(0)

# Create small tensors for the modulate function
# x: input tensor with shape (batch_size, feature_dim)
x = torch.randn(2, 4)

# shift: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
shift = torch.randn(2)

# scale: tensor that will be unsqueezed to (batch_size, 1)
# so it should have shape (batch_size,)
scale = torch.randn(2)

ARGS = {
    "x": x,
    "shift": shift,
    "scale": scale,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
pseudo_huber_loss Ran
ran on a synthesized input
Josh00-Lu/DiffusionVeteran/cleandiffuser/diffusion/consistency_model.py
code served (permissive licence) · get_code("b8baee3808c31f03")
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

torch.manual_seed(0)

# Construct small tensors for source and target
# Using distinct shapes to allow probing later
source = torch.randn(2, 4)
target = torch.randn(2, 4)
c = 0.5

ARGS = {
    "source": source,
    "target": target,
    "c": c,
}
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_cfg Not yet run
unverified (harvested, no recorded run)
Josh00-Lu/DiffusionVeteran/pipelines/utils.py
code served (permissive licence) · get_code("b6b6a836ac8227fc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 2 later) and 7 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
modulate 101 other papers
31 dated earlier, 4 the same month, 65 later, 1 undated · 29 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
and 98 more not named here
make_dir 7 other papers
5 dated earlier, 2 later
2107.00644 (2021-07)
Stabilizing Deep Q-Learning with ConvNets and Vision Transformers under Data Augmentation
2210.07241 (2022-10)
Visual Reinforcement Learning with Self-Supervised 3D Representations
2212.05698 (2022-12)
MoDem: Accelerating Visual Model-Based Reinforcement Learning with Demonstrations
and 4 more not named here

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

Leveraging the powerful generative capability of diffusion models (DMs) to build decision-making agents has achieved extensive success. However, there is still a demand for an easy-to-use and modularized open-source library that offers customized and efficient development for DM-based decision-making algorithms. In this work, we introduce CleanDiffuser, the first DM library specifically designed for decision-making algorithms. By revisiting the roles of DMs in the decision-making domain, we identify a set of essential sub-modules that constitute the core of CleanDiffuser, allowing for the implementation of various DM algorithms with simple and flexible building blocks. To demonstrate the reliability and flexibility of CleanDiffuser, we conduct comprehensive evaluations of various DM algorithms implemented with CleanDiffuser across an extensive range of tasks. The analytical experiments provide a wealth of valuable design choices and insights, reveal opportunities and challenges, and lay a solid groundwork for future research. CleanDiffuser will provide long-term support to the decision-making community, enhancing reproducibility and fostering the development of more robust solutions. The code and documentation of CleanDiffuser are open-sourced on the https://github.com/CleanDiffuserTeam/CleanDiffuser.

For agents

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

get_harvested_code_for_paper("2406.09509")
get_code_for_paper("2406.09509")
have("2406.09509")

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

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

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

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

Connect an agent — have() is free.