SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Guo_Smooth_Diffusion_Crafting_Smooth_Latent_Spaces_in_Diffusion_Models_CVPR_2024_paper · CVPR · 2024

Guo_Smooth_Diffusion_Crafting_Smooth_Latent_Spaces_in_Diffusion_Models_CVPR_2024_paper

Open in the Atlas

Code that ran

2 of 7 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 2 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-24; 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/Guo_Smooth_Diffusion_Crafting_Smooth_Latent_Spaces_in_Diffusion_Models_CVPR_2024_paper.json · badge: /api/ran/Guo_Smooth_Diffusion_Crafting_Smooth_Latent_Spaces_in_Diffusion_Models_CVPR_2024_paper.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
SHI-Labs/Smooth-Diffusion canonical (classifier label)
classifier basis: census
2 ran · 5 no recorded run
FunctionStatusWhere it lives
diffusion_step Ran
ran on a synthesized input
SHI-Labs/Smooth-Diffusion/nulltxtinv_wrapper.py
code served (permissive licence) · get_code("9ccdacbcfc728ff8")
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 4, dtype family float, shape (2, 1, 2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal UNet mock
class MockUNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, latents, t, encoder_hidden_states=None):
        # Return a dict with 'sample' key containing noise prediction
        batch_size = latents.shape[0]
        output = self.linear(latents.view(batch_size, -1)).view(batch_size, 1, 2, 2)
        return {'sample': output}

# Create a minimal scheduler mock
class MockScheduler:
    def step(self, model_output, timestep, sample):
        # Return a dict with 'prev_sample' key
        return {'prev_sample': sample + 0.01 * model_output}

# Create the model mock
class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.unet = MockUNet()
        self.scheduler = MockScheduler()

# Set up arguments
model = MockModel()

# Latents: batch_size=2, channels=1, height=2, width=2
latents = torch.randn(2, 1, 2, 2)

# Context can be either:
# - For low_resource=False: single tensor of shape (4, 77, 4) 
#   (concatenated batch of uncond + cond)
# - For low_resource=True: list of two tensors [(2, 77, 4), (2, 77, 4)]
context = torch.randn(4, 77, 4)

# Timestep as integer
t = 50

# Guidance scale
guidance_scale = 7.5

# Low resource flag
low_resource = False

ARGS = {
    'model': model,
    'latents': latents,
    'context': context,
    't': t,
    'guidance_scale': guidance_scale,
    'low_resource': low_resource
}
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 4, dtype family float, shape (2, 1, 2, 2) — shape (2, 1, 2, 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
load_sd_from_file Ran
ran on a synthesized input
SHI-Labs/Smooth-Diffusion/app_utils.py
code served (permissive licence) · get_code("9e17d5a18f0039c1")
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 OrderedDict. 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 torch
import tempfile
from collections import OrderedDict

torch.manual_seed(0)

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a .pth file
pth_path = os.path.join(temp_dir, "test_model.pth")
test_state_dict = OrderedDict([
    ("layer1.weight", torch.randn(4, 3)),
    ("layer1.bias", torch.randn(4))
])
torch.save(test_state_dict, pth_path)

# Create a .ckpt file
ckpt_path = os.path.join(temp_dir, "test_model.ckpt")
ckpt_data = {
    "state_dict": OrderedDict([
        ("model.weight", torch.randn(4, 3)),
        ("model.bias", torch.randn(4))
    ])
}
torch.save(ckpt_data, ckpt_path)

# Create a .safetensors file
safetensors_path = os.path.join(temp_dir, "test_model.safetensors")
try:
    from safetensors.torch import save_file
    safetensors_dict = {
        "layer.weight": torch.randn(4, 3),
        "layer.bias": torch.randn(4)
    }
    save_file(safetensors_dict, safetensors_path)
except ImportError:
    # If safetensors not available, skip creating this file
    pass

ARGS = {
    "target": pth_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
safetensors, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
auto_dropdown Not yet run
unverified (harvested, no recorded run)
SHI-Labs/Smooth-Diffusion/app_utils.py
code served (permissive licence) · get_code("f3c37f3904478956")
How it ran

no invocation recorded.

image2latent Not yet run
unverified (harvested, no recorded run)
SHI-Labs/Smooth-Diffusion/nulltxtinv_wrapper.py
code served (permissive licence) · get_code("416ade7d7b340108")
How it ran

no invocation recorded.

latent2image Not yet run
unverified (harvested, no recorded run)
SHI-Labs/Smooth-Diffusion/nulltxtinv_wrapper.py
code served (permissive licence) · get_code("fbb1696090cf16e4")
How it ran

no invocation recorded.

step_regularize Not yet run
unverified (harvested, no recorded run)
SHI-Labs/Smooth-Diffusion/train_smooth_diffusion.py
code served (permissive licence) · get_code("de265709662f46e9")
How it ran

no invocation recorded.

torch_to_numpy Not yet run
unverified (harvested, no recorded run)
SHI-Labs/Smooth-Diffusion/app_utils.py
code served (permissive licence) · get_code("aba961822e006627")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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
step_regularize 1 other paper
1 dated earlier
2312.04410 (2023-12)
Smooth Diffusion: Crafting Smooth Latent Spaces in Diffusion Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recently, diffusion models have made remarkable progress in text-to-image (T2I) generation, synthesizing images with high fidelity and diverse contents. Despite this advancement, latent space smoothness within diffusion models remains largely unexplored. Smooth latent spaces ensure that a perturbation on an input latent corresponds to a steady change in the output image. This property proves beneficial in downstream tasks, including image interpolation, inversion, and editing. In this work, we expose the non-smoothness of diffusion latent spaces by observing noticeable visual fluctuations resulting from minor latent variations. To tackle this issue, we propose Smooth Diffusion, a * Equal contribution.

For agents

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

get_harvested_code_for_paper("Guo_Smooth_Diffusion_Crafting_Smooth_Latent_Spaces_in_Diffusion_Models_CVPR_2024_paper")
get_code_for_paper("Guo_Smooth_Diffusion_Crafting_Smooth_Latent_Spaces_in_Diffusion_Models_CVPR_2024_paper")
have("Guo_Smooth_Diffusion_Crafting_Smooth_Latent_Spaces_in_Diffusion_Models_CVPR_2024_paper")

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

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

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

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

Connect an agent — have() is free.