ddpm_imagenet64(pretrained: bool = False, overrides: object = {})Construct an Improved-DDPM U-Net trunk for ImageNet 64x64.
Paper-faithful ImageNet 64x64 configuration from Nichol and Dhariwal,
2021 Table 1: sample size 64x64, base_channels=128,
channel_mult=(1, 2, 3, 4) (four spatial stages — 64 -> 32 -> 16
-> 8), 3 ResBlocks per stage, multi-scale self-attention at the 8 /
16 / 32 feature maps, 4 attention heads, learned variance head
enabled (learn_sigma=True), and a 4000-step cosine beta
schedule.
Model Size
Parameters
pretrainedbool= FalseReserved for future weight registration; currently a no-op.
**overridesobject= {}Optional
DDPMConfig field overrides forwarded into the
underlying config.Returns
DDPMModelBare U-Net trunk configured with the Improved-DDPM ImageNet 64x64 setup and any overrides.
Notes
Reference: Nichol and Dhariwal, "Improved Denoising Diffusion Probabilistic Models", ICML, 2021 (arXiv:2102.09672), Table 1.
Examples
>>> import lucid
>>> from lucid.models.generative.ddpm import ddpm_imagenet64
>>> model = ddpm_imagenet64().eval()
>>> x_t = lucid.randn((1, 3, 64, 64))
>>> t = lucid.tensor([1234]).long()
>>> out = model(x_t, t)
>>> out.sample.shape # learn_sigma=True -> 2 * 3 = 6 channels
(1, 6, 64, 64)