diffusion_models.training
Config-driven training, run through the diffusion-models train CLI.
A run is configured with hydra and
hydra-zen. Every run
gets its own directory (runs/<name>/<timestamp>) holding:
.hydra/: the resolved config and the command line overrides,tensorboard/: metrics, images, weight histograms and the config as text,checkpoints/: checkpoints which embed the resolved config as YAML,run_info.json: the git commit and seed.
The standard config is diffusion_models/conf/baseline.yaml, presets live in
diffusion_models/conf/config/ and the overridable config groups are
registered in diffusion_models/_store. Install the extra dependencies with
pip install diffusion-model-framework[training], then run:
diffusion-models train
diffusion-models train training.batch_size=64 optimizer=adopt
diffusion-models train +config=small_attention_ema
diffusion-models train diffuser=ddpm beta_scheduler=cosine
diffusion-models train dataset=fake device=cpu # smoke test
diffusion-models train resume_from=runs/<name>/<timestamp>/checkpoints/latest.pt
diffusion-models train --multirun optimizer.lr=1e-4,2e-4