ddpm_lsun_gen(pretrained: bool | str = False, weights: DDPMChurchWeights | None = None, overrides: object = {})Construct a DDPM LSUN / CelebA-HQ model with training loss and .generate().
Same trunk as ddpm_lsun (sample size 256x256, 6-stage U-Net),
wrapped with the Ho 2020 simplified training objective and
DiffusionMixin.generate for ancestral sampling.
Model Size
Parameters
pretrainedbool or str= FalseWeight selector.
False → random init; True → the official
google/ddpm-church-256 checkpoint
(DDPMChurchWeights.LSUN_CHURCH), giving an inference-ready
sampler — model.generate(...) draws LSUN-Church-like images.weights(DDPMChurchWeights, optional, keyword - only)= NoneExplicit weights enum member; takes precedence over
pretrained.**overridesobject= {}Optional
DDPMConfig field overrides forwarded into the
underlying config.Returns
DDPMForImageGenerationLSUN / CelebA-HQ DDPM wrapped with the noise-prediction loss head (pretrained when requested).
Notes
Reference: Ho, Jain, and Abbeel, "Denoising Diffusion Probabilistic Models", NeurIPS, 2020 (arXiv:2006.11239), Appendix B.2.
Examples
>>> import lucid
>>> from lucid.models.generative.ddpm import ddpm_lsun_gen
>>> model = ddpm_lsun_gen().eval()
>>> x_t = lucid.randn((1, 3, 256, 256))
>>> t = lucid.tensor([500]).long()
>>> out = model(x_t, t)
>>> out.sample.shape # (1, 3, 256, 256)
(1, 3, 256, 256)