SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.08822 · ICLR · 2025

PFDiff: Training-Free Acceleration of Diffusion Models Combining Past and Future Scores

Guangyi Wang, Yuren Cai, Lijiang Li, Wei Peng, Songzhi Su

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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run); 2 of them were also run on the host, not in the jail, by the peer-agreement lane that set their level, measured 2026-11-22; 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/2408.08822.json · badge: /api/ran/2408.08822.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
onefly123/PFDiff canonical (classifier label)
classifier basis: plan_row
5 ran · 0 no recorded run
onefly123/pfdiff canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 1 no recorded run
FunctionStatusWhere it lives
interpolate_fn Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from wl-zhao/UniPC
pointer only · get_code("39c68b6295eaca2f")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

interpolate_fn Ran
ran; our contract draft was wrong, not the code
onefly123/PFDiff/uncondition/dpm-solver/PFDiff_1.py
code served (permissive licence) · get_code("6a35b62fbc80f70a")
How it ran

Ran in Syntology's jail 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, 1) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T00:15:28Z). 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)

# x: PyTorch tensor with shape [N, C], where N is batch size, C is number of channels
x = torch.randn(2, 1)

# xp: PyTorch tensor with shape [C, K], where K is number of keypoints
xp = torch.linspace(0, 1, 4).unsqueeze(0).repeat(1, 1)  # shape [1, 4]

# yp: PyTorch tensor with shape [C, K]
yp = torch.linspace(0, 2, 4).unsqueeze(0).repeat(1, 1)  # shape [1, 4]

ARGS = {
    "x": x,
    "xp": xp,
    "yp": yp,
}
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, 1) — shape (2, 1) 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
betas_for_alpha_bar Ran
ran, honoured the contract we drafted
onefly123/PFDiff/condition/guided_diffusion/guided_diffusion/PFDiff_1.py
pointer only (licence: MIT); the stored copy get_code serves, from NVlabs/DiffPure, is pointer only (licence: NOASSERTION) · get_code("2ab2316ac6fdd869")
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 NVlabs/DiffPure, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

expand_dims Ran
ran; our contract draft was wrong, not the code
onefly123/PFDiff/uncondition/dpm-solver/PFDiff_1.py
code served (permissive licence) · get_code("e6110366588c5c65")
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 4, dtype family float, shape (2, 1, 1, 1) 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 a small 1D tensor with shape [N]
v = torch.randn(2)

# Create a dims parameter - total number of dimensions desired
dims = 4

ARGS = {
    "v": v,
    "dims": dims,
}
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 4, dtype family float, shape (2, 1, 1, 1) — shape (2, 1, 1, 1) 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
generalized_steps Ran
ran; our contract draft was wrong, not the code
onefly123/pfdiff/uncondition/ddim-main/functions/denoising_PFDiff_1.py
code served (permissive licence) · get_code("401988a4df7d964c")
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 tuple. 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that accepts (x, t) and returns noise predictions
class NoisePredictor(nn.Module):
    def __init__(self, input_dim=4):
        super().__init__()
        self.linear = nn.Linear(input_dim, input_dim)
    
    def forward(self, x, t):
        # x: (batch, dim), t: (batch,)
        # Return noise prediction of same shape as x
        return self.linear(x)

# Create alpha_dict mapping timestep indices to alpha values
# The function accesses alpha_dict[t] where t is an integer timestep
alpha_dict = {
    0: torch.tensor(0.9),
    1: torch.tensor(0.8),
    2: torch.tensor(0.7),
    3: torch.tensor(0.6),
    4: torch.tensor(0.5),
    -1: torch.tensor(0.0),
    -2: torch.tensor(0.0),
}

# Create minimal args object (used in function but not directly accessed in body)
class Args:
    pass

args = Args()

# Create input tensor (batch_size=2, dim=4)
x = torch.randn(2, 4)

# Create sequence of timesteps (descending order, ends with -1)
seq = [4, 3, 2, 1, 0, -1]

# Create model
model = NoisePredictor(input_dim=4)

ARGS = {
    'x': x,
    'seq': seq,
    'model': model,
    'alpha_dict': alpha_dict,
    'args': args,
}
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 tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_named_beta_schedule Ran
ran, honoured the contract we drafted
onefly123/PFDiff/condition/guided_diffusion/guided_diffusion/PFDiff_1.py
pointer only (licence: MIT); the stored copy get_code serves, from NVlabs/DiffPure, is pointer only (licence: NOASSERTION) · get_code("a086d6286a40b889")
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 NVlabs/DiffPure, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

model_wrapper Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
onefly123/pfdiff/uncondition/dpm-solver/PFDiff_1.py
code served (permissive licence) · get_code("3fbe2edeed05f669")
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 function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Define a minimal noise schedule object
class NoiseScheduleVP:
    def __init__(self):
        self.T = 1.0
        self.beta_0 = 0.1
        self.beta_1 = 20.0
    
    def marginal_alpha(self, t):
        return torch.exp(-0.5 * (self.beta_0 + 0.5 * (self.beta_1 - self.beta_0) * t) * t)
    
    def marginal_std(self, t):
        return torch.sqrt(1.0 - self.marginal_alpha(t) ** 2)

# Define a minimal diffusion model
class DiffusionModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t, cond=None):
        # x: (batch, 4), t: (batch,) or scalar
        if isinstance(t, float) or isinstance(t, int):
            t = torch.tensor([t] * x.shape[0], device=x.device)
        t_emb = torch.sin(t.unsqueeze(-1) * torch.arange(4, device=x.device).float())
        return self.linear(x + t_emb)

# Define a minimal classifier function
def classifier_fn(x, t, cond, **classifier_kwargs):
    # Returns logits for classifier guidance
    batch_size = x.shape[0]
    return torch.randn(batch_size, 2)

# Create instances
model = DiffusionModel()
noise_schedule = NoiseScheduleVP()

# Create sample tensors
x_sample = torch.randn(2, 4)
condition = torch.randn(2, 3)
unconditional_condition = torch.zeros(2, 3)

ARGS = {
    'model': model,
    'noise_schedule': noise_schedule,
    'model_type': 'noise',
    'model_kwargs': {'extra_param': 1},
    'guidance_type': 'uncond',
    'condition': condition,
    'unconditional_condition': unconditional_condition,
    'guidance_scale': 1.0,
    'classifier_fn': classifier_fn,
    'classifier_kwargs': {'classifier_param': 0.5}
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
model_wrapper Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
onefly123/PFDiff/uncondition/dpm-solver/PFDiff_1.py
code served (permissive licence) · get_code("0e68c8747f1cfcd9")
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 function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal diffusion model
class SimpleNoiseModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t_input, **kwargs):
        # x: [batch, 4], t_input: [batch] or scalar
        # Output noise prediction of same shape as x
        return self.linear(x)

# Create a minimal noise schedule
class SimpleNoiseSchedule:
    def __init__(self):
        self.T = 1.0
    
    def get_sigma(self, t):
        # Return sigma value for time t
        if isinstance(t, torch.Tensor):
            return torch.sqrt(1.0 - t)
        return (1.0 - t) ** 0.5

# Create a minimal classifier function
def simple_classifier_fn(x, t_input, cond, **kwargs):
    # x: [batch, 4], t_input: [batch], cond: [batch, 3]
    # Output logits
    batch_size = x.shape[0]
    return torch.randn(batch_size, 2)

# Create sample tensors
batch_size = 2
x_sample = torch.randn(batch_size, 4)
condition_sample = torch.randn(batch_size, 3)
unconditional_condition_sample = torch.zeros(batch_size, 3)

# Build the arguments dictionary
ARGS = {
    'model': SimpleNoiseModel(),
    'noise_schedule': SimpleNoiseSchedule(),
    'model_type': 'noise',
    'model_kwargs': {'extra_param': 0.5},
    'guidance_type': 'uncond',
    'condition': condition_sample,
    'unconditional_condition': unconditional_condition_sample,
    'guidance_scale': 7.5,
    'classifier_fn': simple_classifier_fn,
    'classifier_kwargs': {'classifier_param': 1.0},
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
expand_dims Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from wl-zhao/UniPC
pointer only · get_code("292d0a3a80570d32")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

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 6 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 4 later) and 1 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
betas_for_alpha_bar 92 other papers
79 dated earlier, 11 later, 2 same year, order not determinable · 3 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2102.09672 (2021-02)
Improved Denoising Diffusion Probabilistic Models
and 89 more not named here
get_named_beta_schedule 63 other papers
51 dated earlier, 11 later, 1 same year, order not determinable
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2108.02938 (2021-08)
ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 60 more not named here
expand_dims 39 other papers
24 dated earlier, 1 the same month, 11 later, 3 same year, order not determinable · 4 only as an assembly brick
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2202.09778 (2022-02)
Pseudo Numerical Methods for Diffusion Models on Manifolds
2206.00927 (2022-06)
DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 Steps
and 36 more not named here
interpolate_fn 34 other papers
22 dated earlier, 1 the same month, 8 later, 3 same year, order not determinable
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2211.01095 (2022-11)
DPM-Solver++: Fast Solver for Guided Sampling of Diffusion Probabilistic Models
2212.09478 (2022-12)
MM-Diffusion: Learning Multi-Modal Diffusion Models for Joint Audio and Video Generation
and 31 more not named here
model_wrapper 4 other papers
4 dated earlier
2211.01095 (2022-11)
DPM-Solver++: Fast Solver for Guided Sampling of Diffusion Probabilistic Models
2302.04867 (2023-02)
UniPC: A Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models
2306.02018 (2023-06)
VideoComposer: Compositional Video Synthesis with Motion Controllability
and 1 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

Diffusion Probabilistic Models (DPMs) have shown remarkable potential in image generation, but their sampling efficiency is hindered by the need for numerous denoising steps. Most existing solutions accelerate the sampling process by proposing fast ODE solvers. However, the inevitable discretization errors of the ODE solvers are significantly magnified when the number of function evaluations (NFE) is fewer. In this work, we propose PFDiff, a novel training-free and orthogonal timestep-skipping strategy, which enables existing fast ODE solvers to operate with fewer NFE. Specifically, PFDiff initially utilizes score replacement from past time steps to predict a "springboard". Subsequently, it employs this "springboard" along with foresight updates inspired by Nesterov momentum to rapidly update current intermediate states. This approach effectively reduces unnecessary NFE while correcting for discretization errors inherent in first-order ODE solvers. Experimental results demonstrate that PFDiff exhibits flexible applicability across various pre-trained DPMs, particularly excelling in conditional DPMs and surpassing previous state-of-the-art training-free methods. For instance, using DDIM as a baseline, we achieved 16.46 FID (4 NFE) compared to 138.81 FID with DDIM on ImageNet 64x64 with classifier guidance, and 13.06 FID (10 NFE) on Stable Diffusion with 7.5 guidance scale. Code is available at https://github.com/onefly123/PFDiff.

For agents

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

get_harvested_code_for_paper("2408.08822")
get_code_for_paper("2408.08822")
have("2408.08822")

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

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

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

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

Connect an agent — have() is free.