DDPM
10 memberslucid.models.generative.ddpmDDPM family — Ho et al., 2020 ("Denoising Diffusion Probabilistic Models").
Ho, Jonathan, et al. "Denoising Diffusion Probabilistic Models." Advances in Neural Information Processing Systems, 2020, pp. 6840–6851.
DDPM — Denoising Diffusion Probabilistic Models — defines a latent variable generative model through a pair of Markov chains. The forward (noising) chain progressively corrupts data over steps with a fixed Gaussian schedule :
With and , the marginal admits a closed form that supports cheap one-shot sampling at any step:
The reverse (denoising) chain is parameterised by a U-Net trained to predict the injected noise. Ho et al. show that the variational ELBO
decomposes into per-timestep KL divergences which, after a reweighting, simplify to the deceptively elegant noise-prediction objective
Sampling iterates via . The U-Net itself follows the original architecture (Ronneberger 2015) augmented with sinusoidal timestep embeddings, self-attention at low-resolution feature maps (default ), and GroupNorm-equipped residual blocks — the now-canonical recipe inherited by ADM, Imagen, Stable Diffusion, and beyond.
Classes
DDPMConfig2 methodsConfiguration for every DDPM variant.
DDPMForImageGeneration2 methodsDDPM with the noise-prediction training loss and Markov-chain sampler.
DDPMModel2 methodsBare DDPM U-Net trunk with the sampling-capable DiffusionMixin.
DDPMUNet2 methodsU-Net denoiser shared by every DDPM variant.
Functions
ddpm_cifar→ DDPMModelConstruct a DDPM U-Net trunk for the CIFAR-10 setup.
ddpm_cifar_gen→ DDPMForImageGenerationConstruct a DDPM CIFAR-10 model with training loss and .generate().
ddpm_imagenet64→ DDPMModelConstruct an Improved-DDPM U-Net trunk for ImageNet 64x64.
ddpm_imagenet64_gen→ DDPMForImageGenerationConstruct an Improved-DDPM ImageNet 64x64 model with training loss and .generate().
ddpm_lsun→ DDPMModelConstruct a DDPM U-Net trunk for the LSUN / CelebA-HQ 256x256 setup.
ddpm_lsun_gen→ DDPMForImageGenerationConstruct a DDPM LSUN / CelebA-HQ model with training loss and .generate().