How vuongnguyen16/minidiffusion works
MiniDiffusion is an unconditional CIFAR-10 DDPM training and image-generation baseline, with EMA sampling and FID/Inception Score evaluation. The main workflow is configured training on CIFAR-10, checkpointing the model and EMA weights, then loading the EMA weights to sample images or evaluate generated images against reference statistics. The graph also preserves the UNet, diffusion, and scoring layers. Some links reflect README-documented behavior because the relevant parts of main.py were not excerpted.
Main entry points: main.py Mode orchestration · both.py Joint FID and IS · inception.py Inception network · diffusion.py Diffusion trainer
Components 14
Experiment workflow
- Mode orchestration
main.py - CIFAR-10 config
config/CIFAR10.txt - CIFAR-10 dataset
- Model checkpoint
main.py
Diffusion generation
- UNet
model.py - Diffusion trainer
diffusion.py - DDPM sampler
diffusion.py
Image evaluation
- Joint FID and IS
score/both.py - FID calculation
score/fid.py - Inception network
score/inception.py - Inception Score
score/inception_score.py - Reference statistics
- Pretrained weights
Other components
- Experimenter
Connections 18
- Experimenter → Mode orchestration: selects mode
Readme.md - CIFAR-10 config → Mode orchestration: configures
Readme.md - Mode orchestration → CIFAR-10 dataset: loads training data
main.py - Mode orchestration → Diffusion trainer: trains with
main.py - Diffusion trainer → UNet: predicts noise
diffusion.py - Mode orchestration → Model checkpoint: saves weights
Readme.md - Mode orchestration → DDPM sampler: generates samples
main.py - DDPM sampler → UNet: denoises with
diffusion.py - Model checkpoint → Mode orchestration: loads EMA weights
main.py - Mode orchestration → Joint FID and IS: evaluates images
main.py - Joint FID and IS → Inception network: extracts features
score/both.py - Joint FID and IS → FID calculation: calculates FID
score/both.py - FID calculation → Inception network: extracts features
score/fid.py - Joint FID and IS → Reference statistics: reads reference stats
score/both.py - Mode orchestration → Reference statistics: checks before evaluation
Readme.md - Mode orchestration → Inception Score: can compute IS
- Inception Score → Inception network: extracts predictions
score/inception_score.py - Inception network → Pretrained weights: downloads pretrained weights
Readme.md