diffusion_models.inference

Config-driven inference, run through the diffusion-models infer CLI.

Rebuilds a model from a hydra config, loads the weights of a training checkpoint and generates images. The config is composed like for training (diffusion_models/conf/baseline.yaml, extended by conf/infer.yaml), so use the same overrides as the run that produced the checkpoint. Install the extra dependencies with pip install diffusion-model-framework[inference], then run:

diffusion-models infer checkpoint=runs/<name>/<timestamp>/checkpoints/latest.pt \
  +config=small_attention_ema
diffusion-models infer checkpoint=<path> +config=small_attention_ema \
  number_of_images=16 save_gif=true steps=50 device=cpu

The images (and the optional GIF) are written to outputs/infer/<timestamp>. To extend this further, you might want to look into compiling your model to ONNX, TensorRT, OpenVino or other formats.