Commit da7a606
docs(tutorials): diffusion-cluster resweep — 66 fixes across 8 tutorials + What's New entry for the prior 20-file resweep
Second run of the full-collection resweep (see 59636aa / PR #31 for the first
20-file batch): the 8-file diffusion/generative-media cluster — 3d_generation,
diffusion_distillation, diffusion_foundations, diffusion_post_training,
flow_matching, image_generation_systems, vae_vqvae_vqgan, video_generation —
was the one part of the collection still on GPT-5.5-era review. As of this
PR, all 28 tutorials are under GPT-5.6-sol.
Same two-stage pipeline: GPT-5.6-sol found 67 candidate errors (fresh thread
per file) → an independent Claude pass adversarially re-verified each one
(try to refute before accepting) → 55 CONFIRMED + 11 NEEDS_NUANCE fixed, 2
REFUTED correctly left untouched. Notably higher P0 density than the first
batch — diffusion-model math has more subtle failure modes than the training/
systems/agent tutorials audited in round one.
Highlights:
- The single most-recurring error: conflating a "conditional interpolation
path is a straight line" (true by construction, e.g. x_t=(1-t)x_0+tx_1)
with "the marginal ODE trajectory the model learns is a straight line"
(generally false under independent pairing — the marginal velocity field
is a conditional expectation over all pairings sharing x_t, so it curves;
this is exactly why Reflow exists). Recurred in diffusion_foundations
(4 locations) and flow_matching (2 locations), each independently confirmed
and fixed rather than resolved once and left inconsistent elsewhere.
- Real code bugs: iCT's Pseudo-Huber constant was missing the paper's √D
scaling (understating it ~50x at CIFAR-10 scale); its noise schedule used
i.i.d.-sampled-then-sorted lognormal σ instead of the paper's deterministic
Karras/EDM grid; FSQ's bound function was missing the parity-offset/atanh
shift needed for even quantization levels; LFQ's entropy-regularization
loss maximized per-sample entropy (pushing every bit toward 0.5 — the
opposite of confident quantization) instead of minimizing per-sample
entropy while maximizing batch-marginal entropy; DDPO's pseudocode divided
by a deterministic (zero-variance) terminal transition, producing NaN.
- Mechanism-level corrections: ADD's distillation loss was repeatedly
described as teacher-output pixel MSE across 7+ locations in
diffusion_distillation (it's a re-noise-then-single-teacher-denoise
score-distillation signal — the file's own §4.1 already had this right,
used as the alignment anchor); DMD2 was recommended as "GAN-free" when its
core change from DMD v1 is adding a GAN loss; SD3's RF paper had its time
direction backwards (t=0 is data, t=1 is noise, not the reverse); SD/SDXL's
middle UNet block was said to have no cross-attention when it does
(SpatialTransformer / UNetMidBlock2DCrossAttn); SDXL-Turbo's resolution was
wrong (512px, not 1024px — that's SD3-Turbo); SVD's conditioning mechanism
was misattributed (4+4=8 channel latent concat + CLIP cross-attn, not a
mask-based 2C+1 scheme); Custom Diffusion was mischaracterized as a
LoRA-DreamBooth variant when it directly optimizes cross-attention K/V
(full-rank, no low-rank parametrization).
- 3 cross-file consistency flags caught in a final orchestrator pass: two
fix agents correctly declined to touch content outside their assigned
tutorial even when they spotted the same class of error recurring
elsewhere (SD3-Turbo mislabeled as a Reflow example in diffusion_foundations
when it's LADD; OpenMagViT2 cited as an FSQ usage example in
vae_vqvae_vqgan when it's LFQ per that file's own table) — swept up here
before merge rather than left as latent inconsistencies.
Mechanics: every touched .md got its EN edition fixed in parallel, both
HTMLs re-rendered, both sidecars updated with an appended audit-round entry
(old rounds preserved) and a fresh source_sha256. flow_matching's standalone
runnable script was checked and needed no changes (independently re-verified
via direct math re-derivation, not just trusted from the audit JSON). Also
adds the README What's New entry (both editions) for the prior 20-file
resweep (PR #31 / 59636aa), which had landed without one.
Gate: tools/verify_reviews.py --mode strict --reproduce → 59 OK / 0 WARN /
0 FAIL / 3 EXEMPT / PASS.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 59636aa commit da7a606
50 files changed
Lines changed: 1644 additions & 1115 deletions
File tree
- docs/tutorials
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
0 commit comments