Skip to content
module

generative

0 members
lucid.models.generative

Image-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

family

DDPM

12 memberslucid.models.generative.ddpm
Image Generation

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 x0∼q(x0)x_0 \sim q(x_0) over TT steps with a fixed Gaussian schedule {βt}t=1T\{\beta_t\}_{t=1}^{T}:

family

DIAMOND

9 memberslucid.models.generative.diamond
World Modeling

Alonso, 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 p(xt+1∣x≤t,a≤t)p(x_{t+1} \mid x_{\leq t}, a_{\leq t}). DIAMOND answers it with a conditional diffusion model over the image, dropping the discrete latent bottleneck its predecessors relied on.

family

DiT

29 memberslucid.models.generative.dit
Image Generation

Peebles, 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.

family

Dreamer

9 memberslucid.models.generative.dreamer
World Modeling

Hafner, 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.

family

Dreamer-v2

11 memberslucid.models.generative.dreamer_v2
World Modeling

Hafner, 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 sts_t 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.

family

Dreamer-v3

17 memberslucid.models.generative.dreamer_v3
World Modeling

Hafner, 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.

family

Drifting Model

12 memberslucid.models.generative.drifting
Image Generation

Deng, Mingyang, He Li, Tianhong Li, Yilun Du, and Kaiming He. "Generative Modeling via Drifting." arXiv preprint [arXiv:2602.04770](https://arxiv.org/abs/2602.04770), 2026.

A generator fθf_\theta maps noise to samples, x=fθ(ϵ)x = f_\theta(\epsilon), and induces the pushforward q=fθ# pϵq = f_{\theta\#}\,p_\epsilon. Training is a sequence of models, so it is also a sequence of pushforwards {qi}\{q_i\}; a Drifting Model governs that sequence directly with a drifting field Vp,qV_{p,q} that says how each sample should move:

family

Flow Matching

11 memberslucid.models.generative.flow_matching
Image Generation

Lipman, 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 dx/dt=vt(x)d\mathbf{x}/dt = v_t(\mathbf{x}) 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.

family

Genie

9 memberslucid.models.generative.genie
World Modeling

Bruce, 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 ∣A∣=8|A| = 8 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.

family

MeanFlow

14 memberslucid.models.generative.mean_flow
Image Generation

Geng, 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 v(zt,t)v(z_t, t) — 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:

family

NCSN

7 memberslucid.models.generative.ncsn
Image Generation

Song, 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 sθ(x,σ)≈∇xlog⁡pσ(x)s_\theta(x, \sigma) \approx \nabla_x \log p_\sigma(x), where pσp_\sigma is the data distribution convolved with Gaussian noise of standard deviation σ\sigma.

family

Neural ODE

5 memberslucid.models.generative.neural_ode
Image Generation

Chen, 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, ht+1=ht+f(ht,θt)h_{t+1} = h_t + f(h_t, \theta_t). 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,

family

NICE

11 memberslucid.models.generative.nice
Image Generation

Dinh, 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 h=f(x)h = f(x) onto a latent space with a factorised prior, so the exact data log-density falls straight out of the change-of-variables formula

family

PlaNet

6 memberslucid.models.generative.planet
World Modeling

Hafner, 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.

family

RealNVP

13 memberslucid.models.generative.realnvp
Image Generation

Dinh, 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 bb and rescales the unmasked half by a learned, input-dependent factor:

family

Rectified Flow

13 memberslucid.models.generative.rectified_flow
Image Generation

Liu, 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 X0∼π0X_0 \sim \pi_0 noise and X1∼π1X_1 \sim \pi_1 data, drawn independently — the rectified flow induced by that pair is the ODE

family

ScoreSDE

14 memberslucid.models.generative.score_sde
Image Generation

Song, 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.

family

Stable Diffusion

13 memberslucid.models.generative.stable_diffusion
Image Generation

Rombach, 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.

family

TVM

8 memberslucid.models.generative.tvm
Image Generation

Zhou, Linqi, Mathias Parger, Ayaan Haque, and Jiaming Song. "Terminal Velocity Matching." International Conference on Learning Representations (ICLR), 2026. [arXiv:2511.19797](https://arxiv.org/abs/2511.19797).

Write the ground-truth flow map from time tt to time ss as ψ(xt,t,s)=xt+∫tsu(xr,r) dr\psi(x_t, t, s) = x_t + \int_t^s u(x_r, r)\,dr and its net displacement as f(xt,t,s)=ψ(xt,t,s)−xtf(x_t, t, s) = \psi(x_t, t, s) - x_t. The displacement satisfies two conditions: it is the integral, and its derivative at s=ts = t is the instantaneous velocity. One two-time network parameterises both,

family

VAE

7 memberslucid.models.generative.vae
Image Generation

Kingma, 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 pθ(x,z)=pθ(x∣z) p(z)p_\theta(x, z) = p_\theta(x \mid z)\, p(z) with a standard-normal prior p(z)=N(0,I)p(z) = \mathcal{N}(0, \mathbf{I}) and a neural decoder pθ(x∣z)p_\theta(x \mid z). Because the marginal likelihood pθ(x)=∫pθ(x∣z) p(z) dzp_\theta(x) = \int p_\theta(x \mid z)\, p(z)\, dz is intractable, training maximises the evidence lower bound (ELBO) instead:

family

V-JEPA 2-AC

7 memberslucid.models.generative.vjepa2_ac
World Modeling

Assran, Mahmoud, et al. "V-JEPA 2: Self-Supervised Video Models Enable Understanding, Prediction and Planning." [arXiv:2506.09985](https://arxiv.org/abs/2506.09985), 2025.

V-JEPA 2-AC post-trains a V-JEPA 2 visual encoder as a latent, action-conditioned world model. Each frame is encoded into its own spatial token grid — the three-dimensional patch embedding wants 22 frames, so a frame is repeated to fill one tubelet. The predictor interleaves an action token and a state token before every grid, applies a frame-causal transformer, and emits the next latent grid. The visual target is kept in representation space, so the model predicts the consequences of an action without rendering pixels.

family

VQ-VAE

6 memberslucid.models.generative.vqvae
Image Generation

van 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 ze(x)z_e(x) maps an image to a spatial grid of DD-dimensional vectors, and each grid position is snapped to its nearest neighbour in a learned codebook e∈RK×De \in \mathbb{R}^{K \times D}: