ddpm_imagenet64_gen(pretrained: bool = False, overrides: object = {})Construct an Improved-DDPM ImageNet 64x64 model with training loss and .generate().
Same trunk as ddpm_imagenet64 (sample size 64x64, 4-stage U-Net
with learn_sigma=True), trained with the hybrid
objective that the
learned variance head requires.
Model Size
Parameters
pretrainedbool= FalseNo checkpoint is published for
ddpm_imagenet64_gen, so True raises
NotImplementedError rather than return randomly initialised weights.**overridesobject= {}Optional
DDPMConfig field overrides forwarded into the
underlying config.Returns
DDPMForImageGenerationImproved-DDPM ImageNet 64x64 wrapper.
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_gen
>>> model = ddpm_imagenet64_gen().eval()
>>> x_t = lucid.randn((1, 3, 64, 64))
>>> t = lucid.tensor([1234]).long()
>>> out = model(x_t, t)
>>> out.sample.shape # mean half only — the variance half is split off
(1, 3, 64, 64)