Papers › Classifier-Free Diffusion Guidance

Classifier-Free Diffusion Guidance

26 Jul 2022arXiv:2207.12598archive 2025-07-28

Jonathan Ho, Tim Salimans

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

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2207.12598")

Code

Syntology Ran 21 of 30 code samples harvested from 4 repositories linked to this paper; 9 have no recorded run. Of those that ran: 6 ran · our draft was wrong; 1 ran · fixture could not drive it; 14 ran with no contract checked.

By repository: community (archive-listed): 28 samples from 4 repositories, 20 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

DeepakSridhar/fgdm mentioned on GitHubpytorchNOASSERTION report
alexmaols/elucd mentioned on GitHubpytorch report
dewenzeng/clsp mentioned on GitHubpytorch report
dzq84/MusicScore-script mentioned on GitHubpytorch report
elodiegermani/style-transfer_diffusion mentioned on GitHubpytorch report
g4vrel/DDPM mentioned on GitHubpytorch report
kjsman/stable-diffusion-pytorch mentioned on GitHubpytorch report
lucidrains/classifier-free-guidance-pytorch mentioned on GitHubpytorchMIT report
teapearce/conditional_diffusion_mnist mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

30 samples harvested; 21 ran; 0 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

6ran · our draft was wrong
1ran · fixture could not drive it
14ran
9unverified

Licence: 4 of the 30 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

AttentionBlock g4vrel/DDPM/sample.py community (archive-listed) ran fingerprinted MIT (permissive) · fbf59f94fbb9dc9e · report
ConditioningBlock g4vrel/DDPM/sample.py community (archive-listed) ran fingerprinted MIT (permissive) · 6a8336d50ac2b63a · report
ContextUnet elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py community (archive-listed) ran MIT (permissive) · f6bc6f9aea13d9b8 · report
Downsample g4vrel/DDPM/sample.py community (archive-listed) ran fingerprinted MIT (permissive) · 2cdc7e0af049b4ea · report
EmbedFC elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py community (archive-listed) ran fingerprinted MIT (permissive) · db6eecd6a0d6e2ab · report
GaussianDiffusion g4vrel/DDPM/sample.py community (archive-listed) ran MIT (permissive) · 20e8dff4c32fb858 · report
GaussianDiffusionSampler dewenzeng/clsp/ddpm.py community (archive-listed) ran no licence file found · pointer only · 105db34d26e2d338 · report
GuidedUnet g4vrel/DDPM/sample.py community (archive-listed) ran MIT (permissive) · 3845f2deb4ec0887 · report
ResBlock g4vrel/DDPM/sample.py community (archive-listed) ran MIT (permissive) · d46574b8bb2019c3 · report
ResidualConvBlock elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py community (archive-listed) ran MIT (permissive) · f78260a23a053cb4 · report
UnetDown elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py community (archive-listed) ran MIT (permissive) · 111b04642f50bdd2 · report
UnetUp elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py community (archive-listed) ran MIT (permissive) · a7308172779a61da · report
Upsample g4vrel/DDPM/sample.py community (archive-listed) ran fingerprinted MIT (permissive) · 24cbc2ae131f9498 · report
create_bytes_table kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py community (archive-listed) ran MIT (permissive) · 982a69b452b3abeb · report
extract dewenzeng/clsp/ddpm.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 411e30457e916104 · report
get_timestep_embedding g4vrel/DDPM/sample.py community (archive-listed) ran · fixture could not drive it fingerprinted MIT (permissive) · f9a074c3439ca741 · report
make_attn g4vrel/DDPM/sample.py community (archive-listed) ran · our draft was wrong MIT (permissive) · fc896cf6190912f4 · report
make_block g4vrel/DDPM/sample.py community (archive-listed) ran · our draft was wrong MIT (permissive) · df8230699cd28a82 · report
make_skip_connection g4vrel/DDPM/sample.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 883c1ab882e33f3b · report
pairwise kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py community (archive-listed) ran · our draft was wrong MIT (permissive) · df31b88dfd9608ff · report
DDPM elodiegermani/style-transfer_diffusion/diffusion/c_ddpm.py community (archive-listed) unverified MIT (permissive) · 0da20a659b48b38f · report
KEulerAncestralSampler kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py community (archive-listed) unverified MIT (permissive) · 2334501499153205 · report
KEulerSampler kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py community (archive-listed) unverified MIT (permissive) · 7be7f5500c629aa9 · report
KLMSSampler kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py community (archive-listed) unverified MIT (permissive) · 670bc184479669c7 · report
Tokenizer kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py community (archive-listed) unverified MIT (permissive) · 05ee784f97ca2b95 · report
generate kjsman/stable-diffusion-pytorch/stable_diffusion_pytorch/pipeline.py community (archive-listed) unverified MIT (permissive) · f3f744a1397430c9 · report
make_mask g4vrel/DDPM/sample.py community (archive-listed) unverified MIT (permissive) · 519cace55bd6c411 · report
sample_guidance g4vrel/DDPM/sample.py community (archive-listed) unverified MIT (permissive) · 967f89e7cb02bdf9 · report
ddpm_schedules identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 1c539f5aa6ca79d2 · report
ablation_sampler identical code first harvested elsewhere unverified licence of this copy not recorded · 9fbf646e18eed1db · report

Tasks

Diversity

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections