Downloads · 30 days
0
PeterRabbit/cifar10-ddpm
cifar10-ddpm is a unconditional image generation model from PeterRabbit. Use it for the unconditional image generation task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A small denoising diffusion probabilistic model (DDPM, Ho et al. 2020) trained on CIFAR-10, written from scratch in ~250 lines of plain PyTorch.
Downloads · 30 days
0
Access
Public
Updated Jul 26, 2026
Repo size
374 MB
Likes
0
Public
Click a slice to open those files.
.pt299 MB · 80%
From the Hugging Face model README
A small denoising diffusion probabilistic model (DDPM, Ho et al. 2020) trained on CIFAR-10, written from scratch in ~250 lines of plain PyTorch.
Try it in your browser — the ONNX export runs client-side on WebGPU, generating an image in ~2 seconds on your own GPU.

Uncurated 8×8 grid after 300 epochs.
| File | Description |
|---|---|
checkpoint.pt | Full PyTorch checkpoint: raw weights, EMA weights, optimizer state (resumable) |
unet.onnx | EMA weights exported to ONNX (fp32), verified to 4e-6 against PyTorch |
train_diffusion.py | Complete training script |
sample.py | Generate image grids from the checkpoint |
export_onnx.py | Reproduce the ONNX export |
pip install torch torchvision
python sample.py --n 64 --seed 42 # sample a grid from checkpoint.pt
python train_diffusion.py --base 128 --epochs 300 --out out_big --sample-every 10 --ema-decay 0.9995 # retrain
Source and local web app: github.com/dannysheesh/cifar10-ddpm