generative
0 memberslucid.models.generativeImage-generative model families — Phase 5 of the model zoo.
Concrete families live in sub-packages: latent-variable (vae),
diffusion / score-based (ddpm, ncsn), and exact-likelihood flows
(nice). The infrastructure exported here — base configs (one tier per
model class: generative → diffusion / normalizing-flow), output
dataclasses, noise schedulers — is what a new family builds on, so each
one only needs its own _config.py, _model.py, and
_pretrained.py.
Positional / timestep encoding primitives (SinusoidalEmbedding,
TimestepEmbedding) live in lucid.nn; family code imports them
from there rather than redefining locally.
Model Families
DDPM
12 memberslucid.models.generative.ddpmHo, 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 :
DIAMOND
9 memberslucid.models.generative.diamondAlonso, Eloi, et al. "Diffusion for World Modeling: Visual Details Matter in Atari." Advances in Neural Information Processing Systems, vol. 37, 2024.
A world model has to answer . DIAMOND answers it with a conditional diffusion model over the image, dropping the discrete latent bottleneck its predecessors relied on.
DiT
29 memberslucid.models.generative.ditPeebles, William, and Saining Xie. "Scalable Diffusion Models with Transformers." Proceedings of the IEEE/CVF International Conference on Computer Vision, 2023, pp. 4195-4205.
A diffusion model needs a network that maps a noised latent and a timestep to a prediction of the noise. Nothing about that job requires convolutions, and DiT tests the claim directly: patchify the latent into a sequence, run a standard Vision Transformer over it, and decode back.
Dreamer
9 memberslucid.models.generative.dreamerHafner, Danijar, et al. "Dream to Control: Learning Behaviors by Latent Imagination." International Conference on Learning Representations, 2020.
Dreamer inherits PlaNet's recurrent state-space model and throws away its planner. Where PlaNet searches over action sequences at every step — thousands of imagined trajectories to choose one action — Dreamer learns a policy, so acting costs a single forward pass.
Dreamer-v2
11 memberslucid.models.generative.dreamer_v2Hafner, Danijar, et al. "Mastering Atari with Discrete World Models." International Conference on Learning Representations, 2021.
DreamerV2 keeps its predecessor's shape — a recurrent state-space model, an actor and a critic trained on imagined trajectories — and changes what the stochastic latent is. Where Dreamer draws from a diagonal Gaussian, this draws a grid of categorical variables: 32 of them, 32 classes each, sampled as one-hots. The state is then a sparse binary vector of length 1024 with exactly 32 bits set.
Dreamer-v3
17 memberslucid.models.generative.dreamer_v3Hafner, Danijar, et al. "Mastering Diverse Domains through World Models." Nature, vol. 640, 2025, pp. 647-653.
DreamerV3's contribution is that its hyperparameters stop mattering. Its predecessors needed a different divergence scale for Atari than for continuous control, a different entropy bonus, a different discount; this one setting spans them, and the paper's headline result — collecting diamonds in Minecraft from scratch — is run with the same numbers as everything else.
Flow Matching
11 memberslucid.models.generative.flow_matchingLipman, Yaron, et al. "Flow Matching for Generative Modeling." International Conference on Learning Representations, 2023.
A continuous normalizing flow is defined by a vector field: push samples of a simple distribution along and read off what arrives. Training one by maximum likelihood, as Neural ODE does, means solving that ODE on every gradient step — the cost that kept continuous flows off the scale diffusion models reached.
Genie
9 memberslucid.models.generative.genieBruce, Jake, et al. "Genie: Generative Interactive Environments." Proceedings of the 41st International Conference on Machine Learning, PMLR, vol. 235, 2024, pp. 4603–4623.
Genie turns unlabelled video into a playable environment. A user gives it one image and presses one of buttons; it answers with the next frame, and keeps answering. Nothing in its training data says what the buttons are --- the meaning of each is learned, and emerges as left, right, jump and no-op on the platformer games it was trained on.
MeanFlow
14 memberslucid.models.generative.mean_flowGeng, Zhengyang, Mingyang Deng, Xingjian Bai, J. Zico Kolter, and Kaiming He. "Mean Flows for One-step Generative Modeling." arXiv preprint [arXiv:2505.13447](https://arxiv.org/abs/2505.13447), 2025.
Flow Matching models the instantaneous velocity — the tangent of the path at one instant — and recovers a sample by integrating it. MeanFlow models the average velocity over an interval, defined as that integral divided by its width:
NCSN
7 memberslucid.models.generative.ncsnSong, Yang, and Stefano Ermon. "Generative Modeling by Estimating Gradients of the Data Distribution." NeurIPS, 2019.
NCSN — Noise-Conditional Score Network — is the score-based counterpart of DDPM. Rather than predicting noise inside a discrete Markov chain, it directly learns the (Stein) score function , where is the data distribution convolved with Gaussian noise of standard deviation .
Neural ODE
5 memberslucid.models.generative.neural_odeChen, Ricky T. Q., et al. "Neural Ordinary Differential Equations." Advances in Neural Information Processing Systems, vol. 31, 2018, pp. 6571–6583.
A residual network updates its state in discrete jumps, . Shrink the jump and add a step size and that recurrence is Euler's method; take the step to zero and the network stops being a sequence of layers and becomes a differential equation,
NICE
11 memberslucid.models.generative.niceDinh, Laurent, David Krueger, and Yoshua Bengio. "NICE: Non-linear Independent Components Estimation." International Conference on Learning Representations, Workshop Track, 2015.
NICE is the first normalizing flow trained on images: instead of bounding the likelihood (VAE) or factorising it over pixels (autoregressive models), it learns an invertible map onto a latent space with a factorised prior, so the exact data log-density falls straight out of the change-of-variables formula
PlaNet
6 memberslucid.models.generative.planetHafner, Danijar, et al. "Learning Latent Dynamics for Planning from Pixels." Proceedings of the 36th International Conference on Machine Learning, 2019, pp. 2555-2565.
PlaNet learns the dynamics of an environment in latent space and plans there, never reconstructing a frame in order to choose an action. The difficulty it addresses is that pixels are a partial observation: the agent must both remember what it has seen and stay uncertain about what it has not.
RealNVP
13 memberslucid.models.generative.realnvpDinh, Laurent, Jascha Sohl-Dickstein, and Samy Bengio. "Density Estimation Using Real NVP." International Conference on Learning Representations, 2017.
RealNVP takes the coupling layer of NICE and makes it scale as well as shift, which is what finally let exact-likelihood flows model natural images. An affine coupling layer splits the input with a binary mask and rescales the unmasked half by a learned, input-dependent factor:
Rectified Flow
13 memberslucid.models.generative.rectified_flowLiu, Xingchao, Chengyue Gong, and Qiang Liu. "Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow." International Conference on Learning Representations, 2023.
Given any coupling of two distributions — in the generative case noise and data, drawn independently — the rectified flow induced by that pair is the ODE
ScoreSDE
14 memberslucid.models.generative.score_sdeSong, Yang, et al. "Score-Based Generative Modeling through Stochastic Differential Equations." International Conference on Learning Representations, 2021.
Score-SDE's contribution is that two families which looked separate are the same object viewed at different resolutions.
Stable Diffusion
13 memberslucid.models.generative.stable_diffusionRombach, Robin, et al. "High-Resolution Image Synthesis with Latent Diffusion Models." CVPR, 2022, pp. 10684–10695.
Diffusion in pixel space spends most of its capacity on detail the eye discards. Latent diffusion splits the problem in two: an autoencoder learns a perceptually equivalent space at a fraction of the resolution, and the diffusion model runs entirely inside it.
VAE
7 memberslucid.models.generative.vaeKingma, Diederik P., and Max Welling. "Auto-Encoding Variational Bayes." International Conference on Learning Representations, 2014.
The Variational Auto-Encoder defines a latent-variable generative model with a standard-normal prior and a neural decoder . Because the marginal likelihood is intractable, training maximises the evidence lower bound (ELBO) instead:
VQ-VAE
6 memberslucid.models.generative.vqvaevan den Oord, Aaron, Oriol Vinyals, and Koray Kavukcuoglu. "Neural Discrete Representation Learning." Advances in Neural Information Processing Systems, vol. 30, 2017, pp. 6306-6315.
The Vector-Quantised Variational Auto-Encoder replaces the continuous Gaussian bottleneck of a VAE with a discrete one. An encoder maps an image to a spatial grid of -dimensional vectors, and each grid position is snapped to its nearest neighbour in a learned codebook :