Skip to content
AIAI Wranglers

20 Video Diffusion Models

Why Video Diffusion?

Consider a single photograph of a dog catching a frisbee in mid-air. The image captures fur texture, the shape of the frisbee, the blur of motion, the colour of the sky. A modern image diffusion model can generate such a photograph with startling fidelity, sampling it from a learned distribution over pixel grids 𝒙H×W×C. Now consider generating a video of that same dog leaping, catching the frisbee, and landing: 120 frames at 24 frames per second, each frame a 1280×720 RGB image. The sample space has exploded from roughly one million pixel values to over one hundred million, and worse, those hundred million values are not independent. They must obey the laws of physics, the biomechanics of a running dog, the aerodynamics of a spinning frisbee, and the continuity of a coherent narrative.

This is the fundamental challenge of video generation: the data is vastly higher-dimensional, and the constraints binding those dimensions together are far richer than anything encountered in still images. A video is not merely a stack of independent pictures; it is a structured spatiotemporal object whose frames are coupled by motion, lighting consistency, object permanence, and causal relationships. Getting any one of these wrong, a hand that gains a sixth finger between frames, a shadow that reverses direction, a ball that passes through a wall, immediately breaks the illusion.

The dimensionality explosion

Let us make the scale concrete. An image diffusion model operates on tensors of shape H×W×C. For a 512×512 RGB image, the sample space has dimensionality (DIM Image)dimage=512×512×3=786,432. A video adds a temporal axis of F frames. The resulting video tensor lives in F×H×W×C. For a modest 5-second clip at 24 fps and 1280×720 resolution, (DIM Video)dvideo=120F×1280W×720H×3C=331,776,0003.3×108. This is roughly 422 times the dimensionality of a single 512×512 image. At 4K resolution (3840×2160), the ratio climbs to over 3,700×. The situation is even more daunting for longer videos: a two-minute clip at 720p contains nearly 8×109 values.

Example 1 (Dimensionality comparison).

tab:vdiff:dim-comparison compares the dimensionality of common generation targets. Observe the four-order-of-magnitude jump from a single image to a short video clip.

tableDimensionality of common generation targets (RGB, 3 channels).

TargetResolutionFramesDimensions
Thumbnail64×6411.2×104
Standard image512×51217.9×105
HD image1920×108016.2×106
Short clip (5 s)1280×7201203.3×108
Medium clip (30 s)1280×7207202.0×109
Long clip (2 min)1280×72028808.0×109
4K clip (10 s)3840×21602406.0×109

Beyond dimensionality: structural requirements

Raw dimensionality is only part of the story. What makes video generation qualitatively harder than image generation is the set of structural constraints that a plausible video must satisfy. We organise these into four categories.

  1. Temporal coherence. Adjacent frames must depict the same scene with smooth, physically plausible transitions. Objects cannot teleport, disappear, or change identity between frames. Formally, the distribution p(𝒙f+1|𝒙f) has extremely concentrated support compared to the marginal p(𝒙f+1).

  2. Physical plausibility. Objects must obey (approximate) physical laws: gravity pulls things downward, rigid bodies do not deform, fluids flow continuously, and light reflects consistently. Violations are immediately noticeable to human viewers, even when they cannot articulate the specific physical law being broken.

  3. Narrative consistency. A video tells a story, however simple. A person who picks up a cup must later put it down or continue holding it; a car driving left-to-right should not suddenly reverse without cause. This requires the model to maintain a form of causal reasoning over extended temporal horizons.

  4. Perceptual quality. Each individual frame must be a high-quality image, free of artifacts such as blurring, colour banding, or unnatural textures. Furthermore, the temporal texture must be correct: natural videos have characteristic motion blur, lighting flicker, and depth-of-field effects that synthetic videos often lack.

Remark 1 (The uncanny valley of video).

Human perception is exquisitely tuned to detect temporal inconsistencies. A single frame where a person's eyes point in the wrong direction, a shadow that flickers, or a hand that has the wrong number of fingers can render an otherwise photorealistic video immediately unconvincing. This means that video generation models must achieve much higher consistency than image models, even if the per-frame quality is slightly lower.

Exercise 1 (Quantifying structural constraints).

Consider a video of F=100 frames at resolution 256×256 with C=3 colour channels.

  1. Compute the total number of possible videos if each pixel value is quantised to 8 bits. Express your answer as a power of 2.

  2. Estimate the number of “visually plausible” videos (i.e., videos that a human would judge as depicting a coherent real-world scene). Argue that this number is a vanishingly small fraction of the total. Hint: consider the effective degrees of freedom in a typical scene: camera parameters (6 DOF), object positions and poses, lighting, etc.

  3. What does this imply about the dimensionality of the “natural video manifold” relative to the ambient dimension?

The video generation desiderata

Before diving into specific methods, let us enumerate the properties that an ideal video generation system should possess. These desiderata will serve as evaluation criteria throughout the chapter.

  1. Temporal coherence: Generated frames should form a smooth, consistent sequence with no flickering, identity drift, or discontinuous motion.

  2. Visual quality: Each frame should be indistinguishable from a real photograph, with sharp details, correct colours, and natural textures.

  3. Physical plausibility: Objects should obey approximate physical laws: gravity, rigid-body mechanics, fluid dynamics, and conservation of mass.

  4. Controllability: The user should be able to control the generated content through natural interfaces: text descriptions, reference images, camera trajectories, or combinations thereof.

  5. Scalability: The system should support variable resolutions (from 256p to 4K), variable durations (from 1 second to minutes), and variable aspect ratios without retraining.

  6. Efficiency: Generation should be fast enough for interactive applications, ideally producing a 5-second clip in under 30 seconds on a single GPU.

  7. Diversity: Different random seeds should produce meaningfully different videos for the same prompt, reflecting the true variability of the data distribution.

No current system satisfies all seven desiderata simultaneously. The history of the field can be read as a sequence of innovations, each improving one or two desiderata, sometimes at the cost of others.

A brief history of video generation

The pursuit of learned video generation has evolved through several paradigm shifts. We summarise the key milestones below.

Historical Note.

From video prediction to video diffusion. The earliest deep-learning approaches to video generation framed the problem as next-frame prediction: given a sequence of observed frames, predict the next one. Stochastic Video Generation (SVG) [1] combined a learned prior with a frame-conditional decoder, but struggled with blurriness over long horizons. VideoGPT [2] applied VQ-VAE tokenisation and autoregressive modelling, demonstrating that discrete latent codes could capture video dynamics.

The diffusion paradigm arrived with Video Diffusion Models (VDM) [3], which showed that the denoising framework could be extended to joint space-time generation by interleaving spatial and temporal attention layers. This opened the floodgates. Make-A-Video [4] demonstrated text-to-video generation without paired text-video data by leveraging image diffusion priors. Imagen Video [5] achieved high-definition video through a cascade of spatial and temporal super-resolution models.

The field was transformed by OpenAI's Sora (2024) [6], which treated videos as sequences of spacetime patches processed by a Diffusion Transformer (DiT), producing minute-long coherent videos with impressive physical understanding. Shortly after, Wan-Video [7] and Google's Veo 3 (2025) pushed the boundaries further with longer durations, higher resolutions, and improved temporal consistency.

Timeline of key milestones in learned video generation, from early next-frame prediction to modern video diffusion systems.

Chapter roadmap

This chapter is organised into seven files covering the complete landscape of video diffusion models. fig:vdiff:roadmap provides a visual roadmap. We begin with the mathematical foundations (this file), establishing the spatiotemporal data manifold, the three-pillar framework, the extension of image diffusion to video, and the computational challenges that motivate everything that follows. Subsequent files address the architectural and algorithmic innovations that make large-scale video generation practical.

Roadmap of the Video Diffusion Models chapter. File A (highlighted) establishes the foundations. Files B–E cover the four core method families. Files F–G address training strategies and applications.
File A (this file)

Foundations: why video is hard, the spatiotemporal data manifold, the three-pillar framework, extending image diffusion to video, and the computational challenge.

File B

Compression: video autoencoders (spatial, temporal, and joint), causal 3D VAEs, latent space design, and reconstruction quality.

File C

Architectures: factored attention (spatial-then-temporal), 3D U-Nets, Diffusion Transformers (DiT) for video, and the spacetime-patch paradigm.

File D

Conditioning: text conditioning via cross-attention, image-to-video, video editing, and controlnets for structural guidance.

File E

Sampling: efficient samplers for video, temporal super-resolution, sliding-window generation, and autoregressive extension for long videos.

File F

Training at scale: data curation, progressive training, mixed-resolution batching, and distributed training strategies.

File G

Applications and frontiers: world models, video prediction for robotics, personalised generation, and open challenges.

Key Idea.

The central question of this chapter. How do we extend the diffusion framework from the image domain H×W×C to the video domain F×H×W×C in a way that is computationally tractable, temporally coherent, and controllable? Every technique in this chapter addresses some facet of this question.

The Spatiotemporal Data Manifold

Before we can build models that generate video, we must understand the mathematical structure of the data they aim to produce. In this section, we formalise video as a mathematical object, introduce the key structural properties that distinguish video from collections of independent images, and develop the notation that will serve us throughout the chapter.

Video as a continuous function

At the most abstract level, a video is a function that maps spacetime coordinates to colour values. Let Tdur>0 denote the video duration in seconds. We define:

Definition 1 (Continuous video signal).

A continuous video signal is a function (Continuous Video)v:[0,Tdur]×[0,1]2C, where the first argument is time t[0,Tdur], the spatial arguments (u,w)[0,1]2 are normalised image coordinates, and the output v(t,u,w)C is a C-dimensional colour vector (e.g., C=3 for RGB).

In practice, we never observe v in its continuous form. Cameras sample this function on a discrete grid determined by the frame rate r (temporal sampling) and the sensor resolution H×W (spatial sampling). This gives rise to the video tensor.

Definition 2 (Video tensor).

Given a continuous video signal v, the video tensor 𝖷F×H×W×C is defined by sampling v on a regular grid: (Video Tensor)𝖷[f,i,j,c]=v(fr,iH,jW)c,f{0,1,,F1},i{0,1,,H1},j{0,1,,W1},c{1,,C}, where r is the frame rate (frames per second), F=rTdur+1 is the number of frames, H and W are the spatial height and width in pixels, and C is the number of colour channels.

Remark 2 (Notation conventions).

Throughout this chapter, we use the following conventions:

  • 𝖷,𝖹 denote 4D video tensors (bold calligraphic, following the tX notation).

  • 𝒙fH×W×C denotes the f-th frame of a video, obtained by slicing: 𝒙f=𝖷[f,:,:,:].

  • 𝒙HWC denotes a single image (a vectorised frame) when context is clear.

  • Superscripts index frames (f); subscripts index diffusion time (t). Thus 𝒙tf is frame f at diffusion timestep t.

The Nyquist perspective

The continuous-to-discrete transition is governed by the Nyquist-Shannon sampling theorem. Temporally, a video sampled at r fps can faithfully represent motion frequencies up to r/2 Hz. A spinning wheel at 13 Hz sampled at 24 fps will alias, appearing to rotate backwards (the wagon-wheel effect). Spatially, the sensor resolution limits the spatial frequencies that can be captured.

Proposition 1 (Temporal Nyquist bound).

Let v(t,u,w) be a continuous video signal whose temporal spectrum (at each spatial location) is band-limited to [B,B] Hz. Then v can be perfectly reconstructed from its temporal samples if and only if the frame rate satisfies r2B.

Proof.

This is a direct application of the classical Shannon sampling theorem to the temporal axis. For each fixed spatial location (u,w), the function tv(t,u,w) is a band-limited signal, and the standard reconstruction formula (SINC Reconstruction)v(t,u,w)=f=v(fr,u,w)sinc(rtf) converges whenever r2B.

This proposition has a practical implication for video generation: the frame rate of the generated video determines the highest temporal frequency that can be represented. A model generating at 8 fps cannot faithfully represent fast motions that require 24 fps to resolve; it can only produce temporally smooth, low-frequency motion.

Optical flow and the brightness constancy equation

One of the most important structural properties of natural video is the relationship between adjacent frames induced by object motion. If a scene point moves with velocity 𝒗=(vu,vw)𝖳 in the image plane, and its brightness does not change during the motion, then the brightness constancy equation holds:

(Brightness Constancy)It+I𝒗=0, where I(t,u,w) is the image intensity at time t and spatial location (u,w), and I=(I/u,I/w)𝖳 is the spatial gradient.

Definition 3 (Optical flow field).

The optical flow field between frames f and f+1 is a vector field (FLOW Field)𝒗ff+1:{0,,H1}×{0,,W1}2 that assigns to each pixel (i,j) in frame f its displacement 𝒗ff+1(i,j)=(Δi,Δj)𝖳 such that the corresponding point in frame f+1 is located at (i+Δi,j+Δj).

Remark 3 (Flow as a soft constraint for generation).

While the brightness constancy equation is an idealisation (it ignores occlusions, lighting changes, and non-Lambertian surfaces), it captures a strong statistical regularity of natural video. Video generation models implicitly learn to respect this constraint: frames generated by a well-trained model will exhibit smooth, physically plausible optical flow fields, even though the model is never explicitly trained on flow. Some methods go further and explicitly condition on estimated flow [4], using it as an intermediate representation to guide temporal coherence.

Insight.

Optical flow reveals the low-dimensional structure of video. Despite the enormous dimensionality of the video tensor, the set of “natural” videos lies on a much lower-dimensional manifold. Optical flow is one manifestation of this: instead of specifying all HWC values of the next frame independently, it suffices to specify a 2-dimensional displacement at each pixel (plus a residual for dis-occluded regions). This reduces the effective per-frame dimensionality from HWC to roughly 2HW+ϵ, where ϵ accounts for new content. Compression methods (File B) exploit this structure directly.

Temporal autocorrelation

The statistical relationship between frames at different time offsets is captured by the temporal autocorrelation function.

Definition 4 (Temporal autocorrelation).

Let 𝒙fHWC denote the vectorised f-th frame of a video drawn from the data distribution pdata. The temporal autocorrelation matrix at lag τ is (Autocorrelation)𝑹(τ)=𝔼[𝒙f(𝒙f+τ)𝖳]HWC×HWC, where the expectation is over videos sampled from the data distribution and over frame indices f. When the video is (wide-sense) stationary, 𝑹(τ) depends only on the lag τ, not on the absolute frame index f.

For natural video, the autocorrelation decays smoothly with lag, reflecting the fact that nearby frames are highly similar while distant frames may depict entirely different content. This decay rate varies dramatically across video types: a static surveillance camera produces near-constant autocorrelation, while an action movie has rapid decay due to frequent cuts and fast motion.

Proposition 2 (Exponential autocorrelation decay).

For a class of natural videos with stationary statistics and smooth motion, the normalised autocorrelation ρ(τ)=trace(𝑹(τ))/trace(𝑹(0)) is well-approximated by an exponential decay: (EXP Decay)ρ(τ)exp(|τ|τ0), where τ0>0 is a characteristic decorrelation timescale measured in frames.

Sketch of proof.

Model each pixel trajectory as an Ornstein-Uhlenbeck process dxt=θxtdt+σdWt, whose autocorrelation is exactly 𝔼[xtxt+τ]=(σ2/2θ)exp(θ|τ|). Summing over all pixel trajectories and normalising gives the desired form with τ0=1/θ. While individual pixel trajectories are not exactly Ornstein-Uhlenbeck, the averaged autocorrelation across all pixels and videos in a dataset empirically follows this exponential form.

The decorrelation timescale τ0 has direct implications for model design. A model with a temporal receptive field of K frames can capture correlations up to lag K; if Kτ0, the model will miss long-range temporal dependencies and produce temporally incoherent output.

Example 2 (Decorrelation timescales for different video types).

Typical decorrelation timescales (at 24 fps) for different video categories:

  • Surveillance footage: τ0200500 frames (8–20 seconds). Nearly static backgrounds with slow foreground motion.

  • Talking head: τ050100 frames (2–4 seconds). The background is static; facial movements provide moderate temporal variation.

  • Action/sports: τ01030 frames (0.4–1.2 seconds). Fast motion and frequent scene changes cause rapid decorrelation.

  • Music video with cuts: τ0515 frames (0.2–0.6 seconds). Scene cuts create near-instantaneous decorrelation.

Formalising temporal coherence

We now give a formal definition of temporal coherence, the most important structural property that distinguishes video from a random sequence of images.

Definition 5 (Temporal coherence).

Let 𝖷F×H×W×C be a video tensor with frames 𝒙0,𝒙1,,𝒙F1. We say that 𝖷 is (δ,d)-temporally coherent with respect to a distance function d:HWC×HWC0 if (Temporal Coherence)d(𝒙f,𝒙f+1)δfor all f{0,1,,F2}, where δ>0 is a coherence threshold. Common choices for d include:

  1. 2 distance: d(𝒙f,𝒙f+1)=𝒙f𝒙f+12;

  2. Perceptual distance: d(𝒙f,𝒙f+1)=ϕ(𝒙f)ϕ(𝒙f+1)2 for a learned feature extractor ϕ;

  3. Flow-warped distance: d(𝒙f,𝒙f+1)=𝒲(𝒙f,𝒗ff+1)𝒙f+12, where 𝒲 is the warping operator using optical flow 𝒗ff+1.

Remark 4 (Coherence vs. quality).

Temporal coherence and per-frame quality are distinct (and sometimes competing) objectives. A model that copies the first frame identically to all subsequent frames achieves perfect temporal coherence (δ=0) but zero dynamism. Conversely, a model that independently generates each frame from the same text prompt may produce individually beautiful frames that, when played as video, exhibit jarring flicker and identity changes. The art of video generation lies in balancing these two desiderata.

Lemma 1 (Coherence implies bounded total variation).

If a video 𝖷 is (δ,d)-temporally coherent, then its temporal total variation is bounded: (Temporal TV)TVtemp(𝖷)=deff=0F2d(𝒙f,𝒙f+1)(F1)δ. Moreover, by the triangle inequality, the distance between any two frames f1<f2 satisfies: (Frame Distance Bound)d(𝒙f1,𝒙f2)f=f1f21d(𝒙f,𝒙f+1)(f2f1)δ.

Proof.

Both bounds follow directly from the definition of temporal coherence and the triangle inequality for the metric d. The total variation bound sums F1 terms, each bounded by δ. The frame distance bound sums only f2f1 terms.

This lemma reveals an important property: temporal coherence constrains how much a video can change over any time interval. A tightly coherent video (small δ) can only depict slow changes; depicting fast motion requires either larger δ or a higher frame rate (so that each individual frame-to-frame change is small even though the overall motion is fast).

Exercise 2 (Coherence under subsampling).

Suppose a video 𝖷 with F frames is (δ,d)-temporally coherent. Consider the temporally subsampled video 𝖷sub obtained by keeping every k-th frame.

  1. Show that 𝖷sub is (kδ,d)-temporally coherent.

  2. Under what conditions on k and δ does the subsampled video remain perceptually smooth? Relate your answer to the Nyquist bound from Proposition 1.

  3. Argue that this result justifies temporal compression in video autoencoders: if the original video is highly coherent (small δ), we can subsample aggressively without losing temporal smoothness.

The video manifold hypothesis

The manifold hypothesis, well-established in the image domain, posits that high-dimensional data concentrates near a much lower-dimensional manifold. For video, this hypothesis is even more compelling: the constraints of physics, scene composition, and visual coherence restrict the set of plausible videos to a tiny fraction of the ambient space FHWC.

Proposition 3 (Intrinsic dimensionality of video).

Let FHWC be the manifold of natural videos. Its intrinsic dimensionality dint can be decomposed as: (Intrinsic DIM)dintdscenescene layout+Fdmotionper-frame motion+dappearancetextures, lighting+dcameraviewpoint, where dscene captures the degrees of freedom of the scene layout, dmotion captures per-frame local deformations (typically proportional to the number of moving objects), dappearance captures texture and lighting parameters, and dcamera captures the camera trajectory (at most 6F for a freely moving camera, but typically much less due to smoothness constraints).

Remark 5 (Compression targets the manifold).

The intrinsic dimensionality estimate explains why video compression works so well: a 5-second, 720p video has ambient dimensionality 3×108, but its intrinsic dimensionality might be only 104 to 105. The goal of a video autoencoder (File B) is to find a latent representation whose dimensionality is close to dint, achieving maximum compression with minimal information loss.

Visualising the spatiotemporal structure

Left: the video tensor 𝖷F×H×W×C visualised as a stack of frames along the temporal axis. Right: an optical flow field showing per-pixel displacement vectors between adjacent frames.

Exercise 3 (Frame interpolation and flow).

Let 𝒙f and 𝒙f+1 be two consecutive frames with optical flow 𝒗ff+1. Define the linearly interpolated frame at fractional time f+α (for α[0,1]) as (Interpolation)𝒙^f+α(i,j)=(1α)𝒙f(i,j)+α𝒙f+1(i+αviff+1(i,j),j+αvjff+1(i,j)).

  1. Show that 𝒙^f+0=𝒙f and 𝒙^f+1𝒙f+1 (with equality when the brightness constancy equation holds exactly).

  2. Explain why this linear model fails at occlusion boundaries (where one object moves in front of another).

  3. Propose a modification using a learned occlusion mask 𝑴f[0,1]H×W that could handle occlusions more gracefully.

Three Pillars of Video Generation

Every successful video generation system, regardless of its specific architecture, must address three fundamental challenges. We call these the three pillars of video generation: compression, dynamics, and control. This taxonomy provides a unifying lens through which to understand the diverse landscape of methods we will encounter throughout the chapter.

Definition 6 (Video generation pipeline).

A video generation pipeline is a composition of three components: (Pipeline)𝒢=𝒟𝒮, where:

  • :F×H×W×CF×H×W×C is an encoder that compresses the video into a lower-dimensional latent representation (FHWCFHWC);

  • 𝒮 is a sampler (generative model) that produces samples from a learned distribution over the latent space, potentially conditioned on external signals;

  • 𝒟:F×H×W×CF×H×W×C is a decoder that maps the latent sample back to pixel space.

The full generation process for conditioning signal 𝒄 is: (Generation)𝖷gen=𝒟(𝒮(𝒄)), where 𝒮(𝒄)=𝖹0 is a latent video tensor produced by the sampler.

Remark 6 (Pixel-space vs. latent-space generation).

Some early methods (e.g., VDM [3]) operate directly in pixel space, setting =𝒟=Id. This simplifies the pipeline but incurs enormous computational cost. Modern methods almost universally operate in a compressed latent space, with the encoder/decoder pair trained separately (or jointly) as a video autoencoder. We cover this compression stage in detail in File B.

Pillar 1: Compression

The first pillar addresses the dimensionality challenge: how to reduce the video tensor to a manageable size without losing information critical for reconstruction. The key insight is that natural videos have enormous redundancy, both spatial (neighbouring pixels are correlated) and temporal (adjacent frames share most of their content).

Spatial compression.

A standard image VAE [12] compresses each frame independently, reducing spatial resolution by a factor of sH×sW (typically 8×8). This transforms 𝖷F×H×W×C to 𝖹F×H/sH×W/sW×C, achieving a compression ratio of sHsWC/C per frame.

Temporal compression.

Adjacent frames share so much content that we can also compress along the time axis. A temporal compression factor of sF reduces F frames to F/sF latent frames. Combined with spatial compression, the total compression ratio becomes (Compression Ratio VAE)rtotal=FHWC(F/sF)(H/sH)(W/sW)C=sFsHsWCC.

Example 3 (Compression ratios in practice).

Consider a video with F=120, H=720, W=1280, C=3. Several compression configurations and their resulting latent sizes:

tableEffect of different compression factors on latent dimensions and compression ratios.

sFsHsWCLatent shapeLatent sizeRatio
1884120×90×160×46.9×10648×
488430×90×160×41.7×106192×
4881630×90×160×166.9×10648×
41616430×45×80×44.3×105768×
The compression-quality tradeoff.

Higher compression ratios reduce the computational burden on the sampler but inevitably lose fine-grained details. The autoencoder's reconstruction quality sets an upper bound on the generated video quality: no matter how good the sampler is, it cannot produce details that the decoder cannot reconstruct. Finding the right compression ratio is a critical design decision.

Insight.

Asymmetric compression. Spatial and temporal compression have different effects on perceived quality. Aggressive spatial compression (sH=sW=16) causes blurriness and loss of texture detail. Aggressive temporal compression (sF=8) causes jerky motion and temporal aliasing. In practice, systems tend to compress more aggressively spatially than temporally, because temporal artifacts are more perceptually salient than spatial ones at moderate viewing distances.

Pillar 2: Dynamics

The second pillar is the most distinctive aspect of video generation: modelling the temporal evolution of visual content. This is where video generation fundamentally departs from image generation. The sampler 𝒮 must produce latent tensors whose frames, when decoded, form a temporally coherent sequence.

Factored dynamics.

A common approach factorises the generation process into spatial and temporal components: (Factored Denoiser)ϵθ(𝖹t,t)=ϵθspatial(𝖹t,t)+ϵθtemporal(𝖹t,t), where ϵθspatial processes each frame independently (inheriting weights from an image diffusion model) and ϵθtemporal captures inter-frame dependencies. This factorisation enables transfer from pretrained image models and reduces the computational cost of temporal modelling.

Attention-based dynamics.

The dominant mechanism for modelling dynamics in modern video diffusion models is temporal attention: given a sequence of per-frame features {𝒉f}f=0F1, temporal attention computes (Temporal Attention)TemporalAttn(𝒉f)=f=0F1exp((𝑾Q𝒉f)𝖳(𝑾K𝒉f)/d)fexp((𝑾Q𝒉f)𝖳(𝑾K𝒉f)/d)𝑾V𝒉f, where 𝑾Q,𝑾K,𝑾V are the query, key, and value projection matrices and d is the head dimension.

Convolutional dynamics.

An alternative is to use 1D convolutions along the time axis (or 3D convolutions jointly over space and time). These capture local temporal patterns efficiently but have limited receptive fields. In practice, many architectures combine temporal convolutions for local patterns with temporal attention for global coherence.

Definition 7 (Temporal receptive field).

The temporal receptive field of a video generation model at frame f is the set of frames (f){0,,F1} that can influence the model's prediction at frame f through the network's connectivity. For a model with L layers of temporal attention, (f)={0,,F1} (global receptive field). For a model with L layers of temporal convolutions with kernel size k, the receptive field has size L(k1)+1.

Remark 7 (The dynamics spectrum).

Different video categories require dynamics modelling at different scales:

  • Sub-frame: motion blur, interlacing artifacts (requires understanding of exposure time).

  • Frame-to-frame: object motion, camera movement, lighting changes (the primary target of temporal attention).

  • Shot-level: character actions, physical interactions, narrative beats (requires multi-second temporal context).

  • Scene-level: establishing shots, transitions, cuts (requires understanding of cinematic language).

No single mechanism handles all of these well, which is why modern systems often use hierarchical temporal modelling with different mechanisms at different scales.

Pillar 3: Control

The third pillar addresses how to steer the generation process toward desired outputs. Without control, a video generation model is a random video sampler, interesting theoretically but of limited practical utility. Control comes in many forms.

Text conditioning.

The most common control signal is a text prompt, injected via cross-attention between the text embedding and the diffusion model's internal representations. Let 𝒄textL×dtext be the sequence of text token embeddings from a frozen language model. Cross-attention computes: (Cross Attention)CrossAttn(𝒉,𝒄text)=softmax((𝑾Q𝒉)(𝑾K𝒄text)𝖳d)𝑾V𝒄text, where 𝒉 is the spatial-temporal feature at a given position and the softmax operates over the text sequence length L.

Image conditioning.

Image-to-video generation conditions on one or more reference frames. The conditioning image can be injected by concatenation (appending it as an extra channel to the noisy input), by cross-attention, or by replacing the first frame of the noisy sequence with the (possibly encoded) conditioning image.

Structural control.

Fine-grained control over motion and layout can be achieved through auxiliary conditioning signals: depth maps, pose sequences, edge maps, segmentation masks, or motion trajectories. These are typically injected through lightweight adapter networks (ControlNets [61]) that leave the base model unchanged.

Example 4 (Control signal taxonomy).

tab:vdiff:control-signals classifies common control signals by their dimensionality and the type of guidance they provide.

tableTaxonomy of control signals for video generation.

SignalShapeGuidance typeInjection method
Text promptL×dSemanticCross-attention
Reference imageH×W×CAppearanceConcat / cross-attn
Depth sequenceF×H×WGeometricControlNet
Pose sequenceF×J×2SkeletalControlNet
Optical flowF×H×W×2MotionControlNet / warp
Audio waveformTaudioTemporal rhythmCross-attention
Camera trajectoryF×4×4ViewpointFiLM / concat
Classifier-free guidance for video.

As in image diffusion, classifier-free guidance (CFG) [62] amplifies the influence of the conditioning signal by extrapolating away from the unconditional prediction: (CFG)ϵ~θ(𝖹t,t,𝒄)=(1+w)ϵθ(𝖹t,t,𝒄)wϵθ(𝖹t,t,), where w>0 is the guidance scale and denotes the null conditioning. For video, CFG can be applied jointly to all frames (preserving temporal coherence in the guidance direction) or independently per frame (risking temporal artifacts).

Caution.

Over-guidance causes temporal artifacts. While increasing the guidance scale w in (CFG) improves text-video alignment and per-frame quality, excessively large w amplifies high-frequency spatial details at the expense of temporal smoothness. This creates a flickering effect where fine textures “pop” in and out between frames. In practice, video models use lower guidance scales (w37) than image models (w715) to maintain temporal stability.

The three-pillar framework: a unified view

The three-pillar framework for video generation. Every method addresses one or more pillars. Arrows indicate how information flows: the compression pillar defines the latent space in which the dynamics pillar operates, and the control pillar injects conditioning signals into the dynamics model.

fig:vdiff:three-pillars shows how different techniques map onto the three-pillar framework. Every video generation system makes specific design choices for each pillar, and the interplay between these choices determines the system's capabilities and limitations. For instance, Sora [6] uses a spacetime patchifier for compression (Pillar 1), a Diffusion Transformer for dynamics (Pillar 2), and text cross-attention with classifier-free guidance for control (Pillar 3).

Exercise 4 (Mapping methods to pillars).

For each of the following video generation systems, identify the specific technique used for each pillar:

  1. Video Diffusion Models (VDM) [3]

  2. Make-A-Video [4]

  3. Stable Video Diffusion [8]

  4. Sora [6]

Hint: VDM operates in pixel space (identity compression).

Example 5 (Sora as a three-pillar system).

OpenAI's Sora [6] provides an instructive case study for the three-pillar framework:

Pillar 1 (Compression): Sora uses a spacetime patchifier that divides the video into non-overlapping pt×ph×pw patches (e.g., 1×2×2), projects each patch into a d-dimensional token, and processes the resulting sequence. This achieves a compression ratio of ptphpw3/d per patch. Crucially, the same patchifier handles different resolutions and aspect ratios by simply producing different numbers of tokens.

Pillar 2 (Dynamics): The dynamics model is a Diffusion Transformer (DiT) [9] that applies full self-attention over all spacetime tokens. By not factorising attention into spatial and temporal components, Sora allows every patch to attend to every other patch across space and time, enabling the model to learn long-range spatiotemporal dependencies. The computational cost is managed by (a) using a relatively large patch size (few tokens) and (b) employing massive compute budgets during training and inference.

Pillar 3 (Control): Text conditioning is injected via cross-attention layers interleaved with the self-attention layers. The text encoder is a large pretrained language model. Classifier-free guidance steers the generation toward the prompt.

Remark 8 (The pillar interaction principle).

The three pillars are not independent design choices; they interact strongly. A more aggressive compression (Pillar 1) reduces the token count, enabling more expressive dynamics models (Pillar 2) at the same computational budget. Richer control signals (Pillar 3) may require larger models (Pillar 2) to process effectively. Conversely, a weaker encoder (Pillar 1) that discards fine details shifts the burden to the decoder and limits the control precision achievable in Pillar 3. The best systems co-design all three pillars jointly.

From Image Diffusion to Video Diffusion

In this section, we make the conceptual leap from image diffusion to video diffusion precise. We show that the mathematical framework of diffusion models extends naturally to video tensors, but that the resulting model must satisfy structural requirements that go far beyond anything needed for images. We assume familiarity with the image diffusion framework from ch:diffusion, particularly the DDPM training objective and the reparameterisation trick.

The joint forward process

Recall that in image diffusion, the forward process gradually corrupts a clean image 𝒙0H×W×C by adding Gaussian noise according to a variance schedule {βt}t=1T: (Image Forward)q(𝒙t|𝒙0)=Normal(𝒙t;αt𝒙0,(1αt)𝑰), where αt=1βt and αt=s=1tαs. For video, we simply replace the image 𝒙0 with the video tensor 𝖹0, treating the entire video as a single high-dimensional object.

Theorem 1 (Video forward process).

Let 𝖹0F×H×W×C be a clean video tensor (in latent space). The forward process q(𝖹t|𝖹0) with noise schedule {βt}t=1T is: (Video Forward)q(𝖹t|𝖹0)=Normal(𝖹t;αt𝖹0,(1αt)𝑰), where 𝑰 is the identity matrix of dimension FHWC, and αt=s=1t(1βs). Equivalently, using the reparameterisation trick: (Video Reparam)𝖹t=αt𝖹0+1αt𝝐,𝝐Normal(0,𝑰). The noise 𝝐 has the same shape as 𝖹0, with each element drawn independently.

Proof.

The forward process treats 𝖹0 as a vector in FHWC and applies the standard Gaussian diffusion kernel. The Markov chain q(𝖹t|𝖹t1)=Normal(𝖹t;αt𝖹t1,βt𝑰) telescopes exactly as in the image case (see ch:diffusion), giving q(𝖹t|𝖹0)=Normal(𝖹t;αt𝖹0,(1αt)𝑰). The derivation is identical because the forward process operates element-wise and does not depend on the tensor's spatial or temporal structure.

Remark 9 (The noise is structureless).

A crucial observation: in (Video Reparam), the noise 𝝐 is drawn i.i.d. across all spatial locations and all frames. This means the forward process destroys temporal correlations at the same rate as spatial correlations. At t=T (full noise), the noisy tensor 𝖹T is pure isotropic Gaussian noise with no spatial or temporal structure whatsoever. All the burden of creating spatiotemporal structure falls on the reverse process.

Example 6 (Signal-to-noise ratio across diffusion time).

The signal-to-noise ratio (SNR) at diffusion time t is defined as (SNR)SNR(t)=αt1αt. For a cosine noise schedule with T=1000, representative values are:

t01002505007501000
αt1.0000.9750.8540.5000.1460.000
SNR(t)39.05.851.000.1710.000
At t=500 (SNR =1), the clean signal and noise contribute equally to the noisy tensor. For video, this is the “critical zone” where the denoiser must begin resolving temporal structure: at higher SNR, the signal dominates and temporal correlations are visible in 𝖹t directly; at lower SNR, the noise dominates and all temporal structure must be inferred from the model's learned prior.

Corollary 1 (Temporal SNR is uniform).

Since the forward process applies the same noise level 1αt to all frames, the per-frame SNR is identical across all frames at any given diffusion time t. Formally, for any frames f and f: (PER Frame SNR)αt𝒛0f21αt𝝐f2=αt𝒛0f2(1αt)𝝐f2αt1αt=SNR(t), where the approximation uses the law of large numbers (𝝐f2HWC and 𝒛0f2HWC for standardised data). This uniformity is a design choice, not a necessity; one could imagine noise schedules that add more noise to certain frames (e.g., middle frames) than others (e.g., boundary frames used for conditioning).

Why independent frame diffusion fails

The simplest approach to video diffusion would be to apply an image diffusion model independently to each frame. This is tempting because it allows direct reuse of powerful pretrained image models. However, it fails catastrophically.

Remark 10 (Why independent frame diffusion fails).

Let 𝖹0=(𝒛00,𝒛01,,𝒛0F1) be a video consisting of F frames. The true data distribution is a joint distribution p(𝒛00,𝒛01,,𝒛0F1) over all frames. Independent frame diffusion models the factorised distribution (Independent Factorisation)pindep(𝒛00,𝒛01,,𝒛0F1)=f=0F1p(𝒛0f). This factorisation ignores all inter-frame dependencies. Each frame is sampled from the correct marginal p(𝒛0f) (assuming the image model is well-trained), but there is no mechanism to enforce consistency across frames.

The consequences are immediate and severe:

  1. Identity drift: a person's face changes appearance from frame to frame.

  2. Temporal flicker: high-frequency random variations in colour, texture, and lighting.

  3. Incoherent motion: objects appear and disappear randomly instead of moving smoothly.

  4. Violated physics: gravity, momentum, and object permanence are not preserved.

Insight.

The gap between marginals and joints. The failure of independent frame diffusion illustrates a deep statistical principle: matching marginal distributions does not imply matching the joint distribution. Formally, for any collection of marginals {p(𝒛0f)}f=0F1, there exist infinitely many joint distributions consistent with those marginals (this is the content of the Fréchet-Hoeffding theorem). The product distribution fp(𝒛0f) is just one such joint, and for natural video, it is a particularly poor one. The copula (the dependence structure independent of marginals) is what distinguishes video from a slideshow, and it is precisely what the temporal components of a video diffusion model must learn.

Example 7 (Independent vs. joint generation).

Consider generating a 3-frame video of a ball bouncing. Let 𝒑f2 denote the ball's position in frame f. Under the true distribution: (BALL Trajectory)𝒑0=(x0,y0),𝒑1=(x0+vxΔt,y0+vyΔt12gΔt2),𝒑2=(x0+2vxΔt,y0+2vyΔt2gΔt2), where g is gravitational acceleration. The positions are deterministically coupled given the initial conditions. Under the independent model, each 𝒑f is sampled independently from the marginal over ball positions, producing a ball that teleports randomly around the scene.

Exercise 5 (KL divergence between joint and product).

Let p(𝒛0,𝒛1,,𝒛F1) be the true joint distribution of video frames, and let q(𝒛0,𝒛1,,𝒛F1)=fp(𝒛f) be the product of marginals.

  1. Show that the KL divergence between the joint and the product decomposes as: (KL Joint Product)𝖣KL(pq)=f=1F1𝖨(𝒛f;𝒛0:f1), where 𝖨(𝒛f;𝒛0:f1) is the mutual information between frame f and all preceding frames.

  2. Argue that for natural video, this quantity is enormous (on the order of thousands of nats per frame), explaining why the product approximation fails so badly.

  3. What does this imply about the “information content” that temporal modelling must capture?

Remark 11 (Partially factorised approaches).

Between fully independent generation and fully joint generation lie several intermediate approaches:

  • Autoregressive: generate frames sequentially, conditioning each on all previous frames: p(𝒛0,,𝒛F1)=p(𝒛0)f=1F1p(𝒛f|𝒛0:f1). This captures all dependencies but prevents parallel generation across frames.

  • Markov: condition each frame only on the immediately preceding frame: p(𝒛0,,𝒛F1)=p(𝒛0)f=1F1p(𝒛f|𝒛f1). This reduces the conditioning context but loses long-range dependencies.

  • Block-joint: generate non-overlapping blocks of K frames jointly, then stitch blocks together: p(𝒛0:F1)=bp(𝒛bK:(b+1)K1|𝒛bK1). This balances joint modelling within blocks with autoregressive extension across blocks.

Modern systems typically use the block-joint approach, generating 16–32 frames jointly and extending to longer videos autoregressively.

The video DDPM training algorithm

The training procedure for video diffusion is a direct extension of image DDPM. The key change is that the denoiser ϵθ now takes a video tensor as input and must predict noise for all frames jointly.

Algorithm 1 (Video DDPM training).

Input: Training video dataset 𝒟, noise schedule {βt}t=1T, video encoder (pretrained and frozen). Output: Trained denoiser ϵθ.

  1. repeat

  2. Sample a training video 𝖷𝒟.

  3. Encode: 𝖹0=(𝖷)F×H×W×C.

  4. Sample diffusion timestep tUniform({1,,T}).

  5. Sample noise 𝝐Normal(0,𝑰), 𝝐F×H×W×C.

  6. Construct noisy input: 𝖹t=αt𝖹0+1αt𝝐.

  7. (Optional) Sample conditioning signal 𝒄 (e.g., text prompt) associated with 𝖷.

  8. Compute loss: (θ)=ϵθ(𝖹t,t,𝒄)𝝐22.

  9. Update θ via gradient descent on (θ).

  10. until convergence.

Remark 12 (Training vs. image DDPM: what changes?).

Algorithmically, the training loop in Algorithm 1 is nearly identical to image DDPM. The differences lie entirely in the architecture of ϵθ:

  1. The input and output have an additional temporal dimension F.

  2. The network must include temporal modelling components (temporal attention, temporal convolutions) in addition to the standard spatial components.

  3. The conditioning signal 𝒄 may include temporal information (e.g., per-frame text descriptions, audio features, or pose sequences).

The noise schedule {βt}t=1T, the loss function, and the optimisation procedure are identical. This mathematical simplicity is one of the great strengths of the diffusion framework: the same training objective works for images, video, 3D shapes, audio, and any other continuous data modality.

The denoiser must learn spatiotemporal structure

We now state a key proposition that motivates the architectural innovations in File C.

Proposition 4 (Spatiotemporal denoiser requirement).

Let ϵθ(𝖹t,t) be the denoiser in a video diffusion model trained with the objective in Algorithm 1. At optimality, (Optimal Denoiser)ϵθ(𝖹t,t)=1αtσt2(𝖹tαt𝔼[𝖹0|𝖹t]), where 𝔼[𝖹0|𝖹t] is the posterior mean of the clean video given the noisy observation. This posterior mean is not decomposable across frames: (NON Decomposable)𝔼[𝖹0|𝖹t](𝔼[𝒛00|𝒛t0],𝔼[𝒛01|𝒛t1],,𝔼[𝒛0F1|𝒛tF1]).

Proof.

The first statement follows from the standard result that the MSE-optimal predictor of 𝝐 given 𝖹t is the conditional expectation 𝔼[𝝐|𝖹t], combined with the reparameterisation 𝖹t=αt𝖹0+1αt𝝐.

For the non-decomposability, observe that (Posterior MEAN Integral)𝔼[𝖹0|𝖹t]=𝖹0p(𝖹0|𝖹t)d𝖹0. The posterior p(𝖹0|𝖹t) factorises as (Posterior Bayes)p(𝖹0|𝖹t)=q(𝖹t|𝖹0)p(𝖹0)p(𝖹t)q(𝖹t|𝖹0)p(𝖹0). While q(𝖹t|𝖹0) factorises across elements (since the noise is i.i.d.), the prior p(𝖹0) does not factorise across frames (since natural videos have strong inter-frame dependencies). Therefore p(𝖹0|𝖹t) does not factorise, and its mean is not decomposable.

Insight.

The information-theoretic view. Consider the mutual information 𝖨(𝒛0f;𝒛tf) between clean frame f and noisy frame f at diffusion time t. When ff, this quantity is zero in the forward process (noise is independent), but positive in the posterior (because knowing 𝒛tf provides information about 𝖹0 via the prior, which in turn provides information about 𝒛0f). The denoiser must exploit this indirect information pathway: noisy frame f at time t tells us something about clean frame f through the prior's temporal correlations. This is why the denoiser must attend to all frames jointly.

The reverse process and sampling

The reverse process mirrors the image case. Starting from 𝖹TNormal(0,𝑰), we iteratively denoise: (Reverse)pθ(𝖹t1|𝖹t)=Normal(𝖹t1;𝝁θ(𝖹t,t),σt2𝑰), where the predicted mean is (Predicted MEAN)𝝁θ(𝖹t,t)=1αt(𝖹tβt1αtϵθ(𝖹t,t,𝒄)).

Algorithm 2 (Video DDPM sampling).

Input: Trained denoiser ϵθ, noise schedule {βt}t=1T, video decoder 𝒟, conditioning signal 𝒄. Output: Generated video 𝖷gen.

  1. Sample 𝖹TNormal(0,𝑰), 𝖹TF×H×W×C.

  2. for t=T,T1,,1 do

  3. Sample 𝝐Normal(0,𝑰) if t>1, else 𝝐=0.

  4. 𝖹t1=1αt(𝖹tβt1αtϵθ(𝖹t,t,𝒄))+σt𝝐.

  5. end for

  6. Decode: 𝖷gen=𝒟(𝖹0).

  7. return 𝖷gen.

Remark 13 (Sampling cost).

Each step of the reverse process requires a full forward pass through the denoiser ϵθ, which processes the entire video tensor 𝖹t. With T=1000 diffusion steps (or 50 steps with DDIM [10]), the total sampling cost is T times the cost of a single denoiser evaluation. For video, each evaluation is itself extremely expensive (as we quantify in The Computational Challenge), making efficient sampling critical.

Top: independent frame denoising applies a per-frame image model with no temporal coupling, producing inconsistent results. Bottom: joint video denoising processes all frames simultaneously through a spatiotemporal denoiser, enabling temporal coherence.

Exercise 6 (Interpolation in diffusion space).

Let 𝖹0A and 𝖹0B be two clean video latents. Consider the spherical linear interpolation (slerp) of their noised versions at diffusion time t: (Slerp Interp)𝖹tinterp(λ)=sin((1λ)ϕ)sinϕ𝖹tA+sin(λϕ)sinϕ𝖹tB, where ϕ=cos1(𝖹tA,𝖹tB/(𝖹tA𝖹tB)).

  1. Show that 𝖹tinterp(λ)=𝖹tA=𝖹tB when 𝖹tA=𝖹tB (i.e., slerp preserves norm).

  2. If both 𝖹0A and 𝖹0B depict the same scene with different camera angles, describe qualitatively what you expect to see when denoising 𝖹tinterp(0.5).

  3. Why is slerp preferred over linear interpolation λ𝖹tA+(1λ)𝖹tB in high-dimensional spaces?

Exercise 7 (Video ELBO derivation).

Derive the ELBO for video diffusion by treating 𝖹0 as a high-dimensional vector and applying the standard VDM ELBO derivation from ch:diffusion. Show that the resulting objective decomposes as: (Video ELBO)video=𝔼q(𝖹1|𝖹0)[logpθ(𝖹0|𝖹1)]reconstruction𝖣KL(q(𝖹T|𝖹0)p(𝖹T))prior matchingt=2T𝔼q(𝖹t|𝖹0)[𝖣KL(q(𝖹t1|𝖹t,𝖹0)pθ(𝖹t1|𝖹t))]denoising matching. Verify that the simplified training objective 𝔼t,𝝐[ϵθ(𝖹t,t)𝝐22] is a reweighted version of the denoising matching terms.

The Computational Challenge

We have established that video diffusion is mathematically straightforward: simply apply the image diffusion framework to a higher-dimensional tensor. The devil, however, is in the computational details. In this section, we quantify the computational cost of naive video diffusion and show that it is prohibitively expensive, motivating the compression and architectural innovations discussed in the subsequent files.

The attention bottleneck

The dominant computational cost in modern diffusion models comes from self-attention layers. In an image diffusion model operating on a spatial grid of H×W latent pixels, each self-attention layer has complexity: (Image Attention Flops)FLOPsimage=O((HW)2d), where d is the attention head dimension. For video, if we apply full spatiotemporal attention (every position attends to every other position across all frames), the cost becomes: (Video Attention Flops)FLOPsvideo=O((FHW)2d)=O(F2H2W2d).

Proposition 5 (Quadratic bottleneck).

The ratio of full spatiotemporal attention cost to per-frame spatial attention cost is: (Flops Ratio)FLOPsvideoFFLOPsimage=F. That is, full spatiotemporal attention is F times more expensive than applying spatial attention independently to each of the F latent frames. Moreover, the absolute cost grows quadratically with the number of frames.

Proof.

Full spatiotemporal attention over N=FHW tokens costs O(N2d) FLOPs. Independent spatial attention over F frames, each with HW tokens, costs FO((HW)2d). The ratio is: (FHW)2dF(HW)2d=F2F=F.

Example 8 (Concrete compute estimates).

Let us compute the attention cost for a realistic video diffusion scenario. Consider generating a 5-second, 720p video at 24 fps with a latent-space model using spatial compression 8× and temporal compression 4×:

  • Pixel-space video: 120×720×1280×3

  • Latent video: F=30, H=90, W=160, C=4

  • Total latent tokens: N=30×90×160=432,000

  • Attention head dimension: d=64, with 16 heads

For a single attention layer: (FULL ATTN COST)Full spatiotemporal:2N2d162×(4.3×105)2×64×163.8×1014 FLOPs380 TFLOPs.Per-frame spatial:230×(90×160)2×64×162×30×(1.44×104)2×64×161.3×1013 FLOPs13 TFLOPs. The ratio is indeed F=30: full spatiotemporal attention is 30 times more expensive than per-frame spatial attention.

With L=28 attention layers (typical for a DiT-XL model) and T=50 sampling steps (DDIM), the total attention cost for sampling one video is: (Total Sampling COST)380×28×505.3×1017 FLOPs530 PFLOPs. On an NVIDIA H100 GPU with 1 PFLOP/s of effective throughput (accounting for memory bandwidth limitations), this would take approximately 530 seconds, nearly 9 minutes for a single 5-second video.

Memory constraints

Beyond FLOPs, memory is often the binding constraint. Attention requires storing the key-value (KV) matrices for all tokens: (KV Memory)MemoryKV=2NdnheadsLbdtype, where N=FHW is the total number of tokens, nheads is the number of attention heads, L is the number of layers, and bdtype is the bytes per element (2 for FP16/BF16, 1 for FP8).

Example 9 (KV cache memory).

Continuing the previous example (N=432,000, d=64, nheads=16, L=28, BF16 precision): (KV Memory Concrete)MemoryKV=2×432,000×64×16×28×2 bytes99 GB. This exceeds the memory of a single H100 GPU (80 GB HBM3), meaning that even storing the KV cache for full spatiotemporal attention requires model parallelism. Including the model parameters (2–8 GB), activations for backpropagation (3–5× the KV cache), and the video tensor itself, training requires multiple GPUs even for modest video lengths.

Caution.

Memory, not FLOPs, is the true bottleneck. In many practical settings, the memory required to store attention matrices and KV caches exceeds GPU memory long before the FLOPs become prohibitive. This is because memory scales as O(N) per layer (for the KV cache) plus O(N2) for the attention matrix itself (unless using memory-efficient attention implementations like FlashAttention [11]). With FlashAttention, the O(N2) attention matrix is never materialised, but the O(NdL) KV cache remains.

Scaling analysis

Computational cost scaling of different attention strategies as a function of latent frame count F, with H×W=90×160 and dnheads=1024. Full spatiotemporal attention grows quadratically with F (on a log-log scale, the slope is 2), while factored attention grows approximately linearly. The spatial-only baseline (no temporal attention) serves as a lower bound.

fig:vdiff:compute-scaling illustrates how different attention strategies scale with the number of latent frames. The quadratic cost of full spatiotemporal attention becomes prohibitive beyond F32 latent frames (corresponding to roughly 2–4 seconds of video at typical compression rates). This motivates two complementary strategies, which form the subjects of the next two files:

  1. Compress more aggressively (File B): reduce F, H, and W through better video autoencoders, directly reducing the token count N=FHW.

  2. Factorise attention (File C): replace full spatiotemporal attention with separate spatial and temporal attention passes, reducing the cost from O(F2H2W2) to O(F(HW)2+HWF2).

Proposition 6 (Factored attention savings).

Let the cost of full spatiotemporal attention be Cfull=(FHW)2d. Factored attention (spatial attention within each frame, followed by temporal attention at each spatial location) costs (Factored COST)Cfactored=F(HW)2dspatial+HWF2dtemporal. The savings ratio is: (Savings Ratio)CfullCfactored=(FHW)2F(HW)2+HWF2=FHWHW+Fmin(F,HW), where the approximation holds when FHW (typical case) or FHW (rare). For F=30 and HW=14,400, the savings ratio is approximately 30×.

Proof.

Direct computation. When FHW, the spatial term F(HW)2d dominates Cfactored, so CfullCfactoredF2(HW)2F(HW)2=F. When FHW, the temporal term dominates: CfullCfactoredF2(HW)2HWF2=HW.

Scaling with resolution and duration

The computational cost of video generation scales polynomially with all three axes: spatial resolution, temporal duration, and model size. Let us write the total cost of sampling a video as: (Total COST)Ctotal=TstepsLCattn(F,H,W,d)+Cother, where Tsteps is the number of diffusion sampling steps, L is the number of transformer layers, Cattn is the per-layer attention cost, and Cother accounts for feedforward layers, normalisations, and the decoder.

lcc@ Parameter doubledCost multiplier (full attn)Cost multiplier (factored)
Spatial resolution (H,W)4×4×
Duration (F)4×2×
Model depth (L)2×2×
Head dimension (d)2×2×
Sampling steps (Tsteps)2×2×
How different factors affect total sampling cost. Each row shows the effect of doubling one parameter while keeping others fixed.

Remark 14 (The cost of high quality).

tab:vdiff:scaling-factors reveals why high-resolution, long-duration video generation remains so challenging. Going from a 256×256, 2-second preview to a 1024×1024, 16-second production video increases the cost by a factor of roughly 16×8=128× (for factored attention), or 16×64=1024× (for full attention). This explains why current commercial systems often generate short, low-resolution previews first and then upsample using super-resolution cascades or tile-based approaches.

The memory wall

Even with FlashAttention eliminating the O(N2) memory cost of the attention matrix, video diffusion models face a “memory wall” from three sources:

  1. Model parameters: A DiT-XL model has 600M parameters (1.2 GB in FP16). Scaled-up video models can exceed 10B parameters (20 GB in FP16).

  2. Activations: During training, intermediate activations must be stored for backpropagation. With L=28 layers and N=432,000 tokens, the activation memory is approximately 2NdmodelLbdtype, which can exceed 100 GB.

  3. The video tensor itself: The full-resolution input/output video must fit in memory during encoding and decoding. A single 720p, 120-frame video in FP32 requires 120×720×1280×3×41.3 GB.

Insight.

The memory-compute tradeoff. Gradient checkpointing can reduce activation memory at the cost of recomputation. By storing activations at only every k-th layer and recomputing the others during the backward pass, memory is reduced by a factor of k at the cost of 33% additional computation (for k=2). For video diffusion, aggressive gradient checkpointing (large k) is standard practice, trading compute (which can be parallelised across GPUs) for memory (which cannot).

Exercise 8 (Memory budget analysis).

You have access to a single NVIDIA A100 GPU with 80 GB of HBM2e memory. You want to train a video diffusion model with the following specifications:

  • Model: 24 transformer layers, hidden dimension 1024, 16 attention heads, 350M parameters.

  • Latent video: F=16, H=32, W=32, C=4.

  • Batch size: 1 (single video per GPU).

  • Precision: BF16 (2 bytes per parameter/activation).

  1. Calculate the memory required for model parameters (including optimizer states for AdamW, which stores two additional copies of the parameters in FP32).

  2. Calculate the memory required for the KV cache of the attention layers.

  3. Calculate the peak activation memory without gradient checkpointing.

  4. Determine whether the model fits in 80 GB. If not, what is the maximum F that fits?

Comparison to other generative modalities

It is instructive to compare the computational demands of video generation to other generative modalities, as this comparison highlights why video remains the most challenging frontier.

Example 10 (Cross-modality compute comparison).

tab:vdiff:cross-modality compares the typical computational cost of generating samples across different modalities using state-of-the-art models (circa 2025).

tableApproximate computational cost of generating one sample across different modalities. Costs are per-sample on an H100 GPU.

ModalityOutput sizeTokensTime (s)
Text (LLM, 1K tokens)1K tokens1,0000.5–2
Image (10242)1024×1024×34,0962–10
Audio (10 s, 44 kHz)441K samples10,0005–20
Video (5 s, 720p)120×720×1280×3400,00060–600
3D scene (NeRF)Multi-view consistentvaries30–300
Video generation is one to two orders of magnitude more expensive than image generation, primarily due to the temporal dimension.

Remark 15 (The training cost gap).

The inference-time cost gap is dwarfed by the training-time gap. Training a state-of-the-art image diffusion model (e.g., Stable Diffusion XL) requires roughly 25,000 A100 GPU-hours. Training a comparable video model requires 10–100× more compute, primarily because: (a) each training sample (video) requires more FLOPs to process, (b) video datasets are less curated, requiring more epochs to learn, and (c) temporal consistency requires seeing diverse motion patterns, demanding larger and more diverse datasets. Sora's training cost has been estimated at over 1 million A100-equivalent GPU-hours.

Exercise 9 (Roofline analysis for video diffusion).

An NVIDIA H100 GPU has a peak throughput of 990 TFLOPS (BF16 tensor cores) and a memory bandwidth of 3.35 TB/s. The arithmetic intensity of an operation is defined as the ratio of FLOPs to bytes transferred.

  1. Compute the arithmetic intensity of a matrix multiplication 𝑪=𝑨𝑩 where 𝑨N×d and 𝑩d×N, with N=432,000 (video tokens) and d=64. Is this operation compute-bound or memory-bound on the H100?

  2. Compute the arithmetic intensity of the softmax operation softmax(𝑸𝑲𝖳/d) for the same N and d. Is this compute-bound or memory-bound?

  3. Using the roofline model, estimate the theoretical minimum time for a single full spatiotemporal attention layer with 16 heads.

  4. How does FlashAttention change the roofline analysis? Hint: FlashAttention fuses the QK, softmax, and AV operations, reducing memory traffic at the cost of recomputation.

Summary and preview of solutions

The computational analysis in this section paints a clear picture: naive video diffusion, applying full spatiotemporal attention to all frames jointly, is prohibitively expensive for any video longer than a few seconds at modest resolution. tab:vdiff:challenge-solution summarises the key challenges and the solutions we will develop in subsequent files.

p3.8cmp2.5cmp4.5cm@ ChallengeWhere addressedKey technique
High-dimensional inputFile BVideo autoencoders with spatial and temporal compression
Quadratic attention costFile CFactored spatial/temporal attention, local windows
Conditioning complexityFile DEfficient cross-attention, adapter networks
Slow samplingFile EDistilled samplers, progressive generation
Data and training scaleFile FCurriculum learning, mixed-resolution batching
Computational challenges and their solutions (covered in subsequent files).

Key Idea.

The fundamental tradeoff. Video diffusion model design is governed by a three-way tradeoff between quality (per-frame fidelity and temporal coherence), efficiency (computational cost and memory usage), and controllability (the richness of conditioning signals the model can accept). Improving one dimension typically comes at the expense of another: higher quality requires more compute, richer control requires more parameters, and greater efficiency requires accepting some quality loss. The art of video diffusion model design lies in finding the sweet spot for the target application.

We now turn to File B, where we address the first and most impactful lever for reducing computational cost: compressing the video tensor into a compact latent representation using learned video autoencoders.

Video Autoencoders

Diffusion models are powerful, but they are also expensive. The iterative denoising process that makes them work requires evaluating a neural network dozens or hundreds of times per sample, and each evaluation operates on a tensor whose size equals the output resolution. For images, this cost is manageable: a 256×256×3 image contains roughly 200,000 values. For video, the situation is dramatically worse. A modest 16-frame clip at 256×256 resolution already contains 3.1 million values; a 2-second clip at 720p and 24 frames per second exceeds 74 million values. Running a diffusion model directly in this pixel space is computationally prohibitive.

The solution, first demonstrated for images by Rombach et al. [14] in Latent Diffusion Models (LDMs), is to separate the problem into two stages. First, train an autoencoder that compresses the data into a compact latent space. Second, run the diffusion process in that latent space rather than in pixel space. The autoencoder absorbs the perceptual details (textures, edges, colour gradients) that do not require iterative refinement, while the diffusion model focuses on the semantic structure (object identity, motion, scene composition) that benefits from the iterative process.

For video, this two-stage strategy is not merely convenient; it is essential. The compression ratio determines the practical feasibility of the entire pipeline. In this section, we formalise the two principal approaches to video compression, spatial-only and spatiotemporal, and analyse the trade-offs that govern the design of video autoencoders.

Key Idea.

Compress first, then diffuse. The central engineering principle of latent video diffusion is to never run the denoising process in pixel space. Instead, an autoencoder (,𝒟) maps the video 𝖷F×H×W×C to a latent tensor 𝖹F×H×W×C with FHWCFHWC. The diffusion model operates entirely on 𝖹, and the decoder 𝒟 maps generated latents back to pixel space. This factorisation reduces computational cost by orders of magnitude while preserving perceptual quality.

Why Pixel-Space Video Diffusion Is Impractical

To appreciate the necessity of latent compression, let us quantify the computational burden of pixel-space video diffusion. Consider a video tensor 𝖷F×H×W×3. The diffusion model must process this tensor at every denoising step, and a typical generation requires T steps (often T=50 to 1000).

Example 11 (Computational Cost of Pixel-Space Video Diffusion).

Consider generating a 2-second video at 24 fps and 512×512 resolution. The video tensor has shape 48×512×512×3, containing approximately 37.7 million values. A U-Net processing this tensor at each of T=50 denoising steps must perform roughly 50×37.7M1.9 billion element-wise operations per sample, before accounting for the quadratic cost of any attention layers.

By contrast, if an autoencoder compresses the video by a factor of 4×8×8 (temporally × spatially × spatially), the latent tensor has shape 12×64×64×4, containing roughly 197,000 values. The diffusion model now operates on a tensor that is 190× smaller, reducing both memory and computation proportionally.

This example illustrates a broader principle: the autoencoder is not an optional optimisation but a structural prerequisite for video diffusion at practical resolutions.

Spatial-Only Compression

The simplest approach to video compression is to ignore the temporal dimension entirely and encode each frame independently using a pre-trained image autoencoder.

Definition 8 (Spatial-Only Video Autoencoder).

Let 2D:H×W×CH×W×C be a pre-trained image encoder and 𝒟2D:H×W×CH×W×C the corresponding decoder. The spatial-only video autoencoder applies these maps frame-by-frame: (Spatial ENC)𝒛f=2D(𝒙f),f=1,,F,𝒙^f=𝒟2D(𝒛f),f=1,,F, where 𝒙fH×W×C is the f-th frame and 𝒛fH×W×C is its latent code. The latent video tensor is the stack 𝖹=[𝒛1;𝒛2;;𝒛F]F×H×W×C.

The spatial-only approach has clear advantages. It reuses image autoencoders (such as the one from Stable Diffusion) without any modification, inheriting their mature training and high reconstruction quality. The frame count F is preserved in the latent space, so temporal modelling is left entirely to the diffusion model.

However, this design has a fundamental limitation: it completely ignores the temporal redundancy present in natural video. Consecutive frames in a video are highly correlated; objects move smoothly, lighting changes gradually, and backgrounds persist across many frames. A spatial-only encoder encodes each frame as if it were an independent image, wasting capacity on information that is redundant across time.

Remark 16.

The spatial-only approach preserves the frame count (F=F) but wastes temporal redundancy. The compression ratio is rspatial=(HWC)/(HWC), which is independent of F. For the Stable Diffusion VAE, this ratio is approximately 48× (8×8 spatial downsampling with C=4 channels). While this is substantial, the latent video 𝖹 remains large when F is large because no temporal compression occurs.

Spatiotemporal Compression

To exploit temporal redundancy, we need an autoencoder that processes the video as a 3D volume rather than a stack of independent images.

Definition 9 (Spatiotemporal Video Autoencoder).

A spatiotemporal video autoencoder jointly encodes the entire video tensor: (3D ENC)𝖹=3D(𝖷),𝖷F×H×W×C,𝖹F×H×W×C,𝖷^=𝒟3D(𝖹), where F<F, H<H, W<W in general. The encoder 3D and decoder 𝒟3D use 3D convolutional or attention-based architectures that process spatial and temporal dimensions jointly.

The spatiotemporal approach compresses along all three dimensions simultaneously. Because consecutive frames share most of their content, the encoder can represent temporal redundancy far more efficiently than the spatial-only approach.

Definition 10 (Compression Ratio).

The compression ratio of a video autoencoder with input shape (F,H,W,C) and latent shape (F,H,W,C) is (Compression Ratio)r=FHWCFHWC. A spatiotemporal autoencoder with 4× temporal, 8×8 spatial, and C=16 channel compression achieves r=(4×8×8×3)/16=48, comparable to the spatial-only ratio but with the critical advantage that F has also been reduced.

Comparing the Two Approaches

tab:vdiff:ae-comparison summarises the key trade-offs between spatial-only and spatiotemporal video autoencoders.

PropertySpatial-OnlySpatiotemporal
Temporal compressionNone (F=F)Yes (F<F)
Temporal redundancyNot exploitedExploited
Reuses image AEYesNo (new architecture)
Latent size for F=4848×h×w12×h×w
Causal design neededNoYes (for streaming)
Training dataImages sufficeVideos required
Reconstruction qualityPer-frame optimalJointly optimised
Comparison of spatial-only and spatiotemporal video autoencoders. The spatiotemporal approach achieves higher total compression by exploiting temporal redundancy, at the cost of increased architectural complexity and the need for causal design to support autoregressive generation.

Remark 17.

The choice between spatial-only and spatiotemporal compression reflects a deeper architectural decision. Spatial-only compression delegates all temporal modelling to the diffusion model, which must then learn temporal coherence from scratch in the latent space. Spatiotemporal compression embeds temporal structure into the latent space itself, giving the diffusion model a head start. However, spatiotemporal compression introduces a new challenge: the encoder must be designed carefully to avoid “future leakage,” where the latent code for frame f depends on frames f+1,f+2,. This motivates the causal architectures developed in Causal 3D Variational Autoencoders.

Architecture Overview

fig:vdiff:2d-vs-3d-ae illustrates the two approaches side by side. The spatial-only encoder processes each frame through a 2D convolutional network, producing independent latent maps that are stacked along the time axis. The spatiotemporal encoder processes the entire video through a 3D convolutional network, producing a compressed latent volume with reduced temporal extent.

Spatial-only (left) versus spatiotemporal (right) video autoencoders. The spatial-only encoder processes each frame independently, preserving the frame count in the latent space. The spatiotemporal encoder processes the entire video jointly, reducing both spatial and temporal dimensions.

The connection between video autoencoders and the VAE theory developed in ch:vae is direct: both spatial-only and spatiotemporal video autoencoders are trained as variational autoencoders, optimising an ELBO that balances reconstruction fidelity against latent regularisation. The key differences lie in the architecture of the encoder and decoder (2D vs. 3D convolutions) and the structure of the latent space (independent per-frame vs. jointly compressed). The vector quantisation techniques from ch:vae2 also play a role, as we will see in Discrete Tokenisation for Video.

Insight.

The autoencoder is the unsung hero of video generation. While the diffusion model receives most of the attention in video generation papers, the quality of the autoencoder often determines the ceiling of the entire system. A poor autoencoder introduces artefacts (blurriness, colour shifts, flickering) that the diffusion model cannot correct, no matter how well it is trained. State-of-the-art video generation systems such as Sora, CogVideoX, and Wan-Video invest significant effort in training high-quality video autoencoders before turning to the diffusion component.

Reconstruction Quality Metrics

How do we measure the quality of a video autoencoder? Unlike text compression, where lossless reconstruction is the standard, video autoencoders are lossy by design. The quality of the lossy reconstruction must be measured along multiple axes.

Definition 11 (Video Reconstruction Metrics).

Let 𝖷 be the original video and 𝖷^=𝒟((𝖷)) the reconstruction. The following metrics are standard:

  1. Peak Signal-to-Noise Ratio (PSNR): (PSNR)PSNR(𝖷,𝖷^)=10log10MAX21FHWC𝖷𝖷^F2, where MAX is the maximum possible pixel value (typically 255 for 8-bit video). Higher is better; values above 30 dB indicate good reconstruction.

  2. Structural Similarity Index (SSIM): Computed per-frame between 𝒙f and 𝒙^f, averaging luminance, contrast, and structural comparisons over local windows. Values range from 1 to 1; values above 0.95 indicate near-perceptual equivalence.

  3. Learned Perceptual Image Patch Similarity (LPIPS): Computed as the 2 distance between deep features extracted by a pre-trained network (VGG or AlexNet), summed over selected layers. Lower is better; this metric correlates well with human perceptual judgments.

  4. Temporal consistency: Measured by the optical flow error between consecutive reconstructed frames. Given estimated flow fields 𝑭f from 𝒙^f to 𝒙^f+1, the warping error is 1F1f𝒙^f+1warp(𝒙^f,𝑭f)1.

Caution.

PSNR can be misleading for video autoencoders. A video autoencoder can achieve high PSNR by producing blurry reconstructions that average over fine details. This is because the mean squared error (which PSNR measures) penalises sharp but slightly misaligned details more heavily than uniform blur. For this reason, perceptual metrics (LPIPS) and temporal consistency metrics are essential complements to PSNR when evaluating video autoencoders.

Example 12 (Typical Reconstruction Quality).

For reference, state-of-the-art video autoencoders achieve the following approximate reconstruction metrics on standard benchmarks:

  • Spatial-only (Stable Diffusion VAE, 8×8 spatial): PSNR 3033 dB per frame, SSIM 0.920.95, LPIPS 0.040.08.

  • Spatiotemporal (CogVideoX, 4×8×8): PSNR 2832 dB, SSIM 0.900.94, with improved temporal consistency scores compared to spatial-only.

  • Discrete (MAGVIT-v2, 4×16×16): PSNR 2530 dB, with lower per-frame quality but competitive FVD (Fréchet Video Distance) scores when combined with autoregressive priors.

Causal 3D Variational Autoencoders

The previous section motivated the need for spatiotemporal video compression and contrasted it with the simpler spatial-only approach. We now turn to the mathematical core of spatiotemporal video compression: the causal 3D variational autoencoder (Causal 3D-VAE). This architecture combines three ingredients: (1) 3D convolutions that process spatial and temporal dimensions jointly, (2) a causal masking scheme that prevents future frames from influencing past latents, and (3) a variational training objective that regularises the latent space for downstream diffusion.

The causality constraint is not merely a technical nicety. Without it, the latent code 𝒛f for frame f would depend on all frames in the video, including frames f+1,f+2,,F. This creates two problems. First, it prevents autoregressive generation, where frames are produced sequentially and future frames are not yet available when encoding past frames. Second, it couples the latent representations in a way that makes it difficult for the diffusion model to generate temporally coherent video, because changing one frame's latent code would implicitly alter all other latent codes.

Historical Note.

From image VAEs to causal video VAEs. The journey from image to video autoencoders mirrors the broader evolution of generative modelling. Image autoencoders (Kingma & Welling, 2013 [12]; Van Oord et al., 2017 [13]) established the VAE and VQ-VAE frameworks. The Stable Diffusion VAE (Rombach et al., 2022 [14]) demonstrated that 2D autoencoders could serve as the compression backbone for latent diffusion. MAGVIT [15] and MAGVIT-v2 [16] introduced 3D tokenisers for video, using causal convolutions to support variable-length generation. CogVideoX [17] and Open-Sora [18] brought causal 3D-VAEs to the forefront of video diffusion, achieving state-of-the-art compression ratios. Most recently, Wan-Video [19] demonstrated a causal 3D-VAE with 4× temporal and 8×8 spatial compression, enabling high-resolution video generation.

3D Convolutions for Video

Standard 2D convolutions operate on spatial dimensions (H,W) with a kernel of shape (kh,kw). To process video, we extend convolutions to operate on the temporal dimension as well, producing a 3D convolution with a kernel of shape (kt,kh,kw).

Definition 12 (3D Convolution).

Let 𝖷F×H×W be a single-channel video tensor and kkt×kh×kw a 3D convolution kernel. The 3D convolution of k with 𝖷 is defined as (3D CONV)(k𝖷)(t,h,w)=τ=0kt1i=0kh1j=0kw1k(τ,i,j)𝖷(tτ,hi,wj), where we assume appropriate padding. For a multi-channel input 𝖷F×H×W×Cin and output with Cout channels, the kernel becomes kCout×Cin×kt×kh×kw and the convolution sums over Cin as well.

The 3D convolution extends naturally from its 2D counterpart. Each output location (t,h,w) aggregates information from a spatiotemporal neighbourhood of size kt×kh×kw centred around the corresponding input location. The parameter kt controls the temporal receptive field: a kernel with kt=3 looks at the current frame plus one frame in each temporal direction.

Remark 18.

A 3D convolutional layer with kernel size (kt,kh,kw), Cin input channels, and Cout output channels has Cout×Cin×kt×kh×kw parameters, which is kt times the parameter count of the corresponding 2D layer. For typical values (kt=3, kh=3, kw=3), the 3D layer has 3× more parameters than its 2D counterpart. This motivates factorised designs such as (1,3,3) spatial convolutions followed by (3,1,1) temporal convolutions, which reduce the parameter count from C2×27 to C2×(9+3)=C2×12.

Causal 3D Convolutions

A standard 3D convolution with temporal kernel size kt>1 looks both forward and backward in time. For frame t, the convolution accesses frames tkt/2 through t+kt/2. This bidirectional temporal access is acceptable during training (all frames are available), but it creates a fundamental problem for autoregressive inference and streaming applications where future frames have not yet been observed.

The solution is to restrict the convolution to use only past and current frames, producing a causal 3D convolution.

Definition 13 (Causal 3D Convolution).

Let 𝖷F×H×W be a single-channel video tensor and kkt×kh×kw a 3D convolution kernel. The causal 3D convolution of k with 𝖷 is defined as (Causal 3D CONV)(kcausal𝖷)(t,h,w)=τ=0kt1i=0kh1j=0kw1k(τ,i,j)𝖷(tτ,hi,wj), where the temporal summation index τ ranges over {0,1,,kt1}, so the convolution accesses only frames t,t1,,tkt+1. No future frames (t>t) are accessed.

In practice, causal 3D convolutions are implemented by applying asymmetric temporal padding: kt1 frames of zero-padding are prepended to the temporal dimension, and no padding is appended. This ensures that the output at time t depends only on inputs at times t, matching the standard causal convention used in autoregressive language models (ch:autoreg).

Causal temporal mask for a 3D convolution with temporal kernel size kt=3. Each row corresponds to an output frame, and each column to an input frame. Blue cells with checkmarks indicate frames that the causal convolution can access; red cells with crosses indicate future frames that are blocked. Grey cells are past frames outside the kernel's temporal extent. The triangular structure ensures that output frame t depends only on input frames t,t1,t2.

Example 13 (Implementation of Causal 3D Convolution).

In PyTorch, a causal 3D convolution with temporal kernel size kt can be implemented by padding the input tensor with kt1 zero frames along the temporal dimension at the start, and then applying a standard nn.Conv3d with padding=(0, p_h, p_w) (no temporal padding in the convolution itself, since we already padded manually). Concretely:

  1. Pad the input: 𝖷padded=[𝟎(kt1)×H×W;𝖷] along the time axis.

  2. Apply the convolution: 𝖸=𝙲𝚘𝚗𝚟𝟹𝚍(𝖷padded) with symmetric spatial padding and zero temporal padding.

The output 𝖸 has the same temporal extent as 𝖷, and each output frame 𝖸t depends only on input frames 𝖷tkt+1,,𝖷t. This simple padding trick converts any standard 3D convolution into a causal one.

Proposition 7 (Causal Receptive Field Growth).

A stack of L causal 3D convolutional layers, each with temporal kernel size kt and stride 1, produces a temporal receptive field of size (Causal Receptive)Rt=1+L(kt1). If temporal striding is used with stride st at certain layers, the effective receptive field grows exponentially. Specifically, if all L layers use stride st, the receptive field becomes (Causal Receptive Strided)Rt==0L1(kt1)st=(kt1)stL1st1. In either case, frame t at the output depends only on frames t at the input.

Proof.

For stride-1 layers, each layer extends the temporal receptive field by kt1 frames (the current frame plus kt1 past frames). Stacking L layers yields 1+L(kt1).

For stride-st layers, the -th layer (counting from 0) operates on a temporal grid that has been downsampled by st. Each step in this downsampled grid corresponds to st steps in the original grid. The -th layer contributes (kt1)st frames to the receptive field, and summing over all layers gives the geometric series.

fig:vdiff:causal-vs-noncausal illustrates the difference between causal and non-causal receptive fields for a stack of two layers with kt=3.

Causal versus non-causal receptive fields for a two-layer stack of 3D convolutions with temporal kernel size kt=3. The non-causal receptive field extends symmetrically into the past and future. The causal receptive field extends only into the past, ensuring that the output at time t depends only on frames at times t. The yellow cell marks the output location; blue (causal) and green (non-causal) cells mark the receptive field.

The Causal 3D-VAE Training Objective

With causal 3D convolutions as the building block, we can now define the full training objective for a causal 3D variational autoencoder. The objective follows the standard VAE framework (see ch:vae) but is applied to video tensors with architectures that respect the causal constraint.

Theorem 2 (Causal 3D-VAE Evidence Lower Bound).

Let 𝖷F×H×W×C be a video tensor. Let qϕ(𝖹|𝖷) be an encoder distribution parameterised by a causal 3D convolutional network with parameters ϕ, and let pθ(𝖷|𝖹) be a decoder distribution parameterised by θ. The evidence lower bound (ELBO) for the causal 3D-VAE is (Causal 3dvae ELBO)3DVAE(θ,ϕ;𝖷)=𝔼qϕ(𝖹|𝖷)[logpθ(𝖷|𝖹)]β𝖣KL(qϕ(𝖹|𝖷)p(𝖹)), where p(𝖹)=Normal(0,𝑰) is the standard Gaussian prior over latents, β>0 is a weighting coefficient (recovering the standard ELBO when β=1), and logp(𝖷)3DVAE(θ,ϕ;𝖷).

Proof.

The proof follows the standard VAE derivation (cf. ch:vae). By Jensen's inequality applied to the log-marginal likelihood: (ELBO Derivation)logpθ(𝖷)=logpθ(𝖷|𝖹)p(𝖹)d𝖹=logpθ(𝖷|𝖹)p(𝖹)qϕ(𝖹|𝖷)qϕ(𝖹|𝖷)d𝖹qϕ(𝖹|𝖷)logpθ(𝖷|𝖹)p(𝖹)qϕ(𝖹|𝖷)d𝖹=𝔼qϕ(𝖹|𝖷)[logpθ(𝖷|𝖹)]𝖣KL(qϕ(𝖹|𝖷)p(𝖹)). The β-weighted variant follows by replacing the KL coefficient with β>0, as in the β-VAE framework. The causality constraint enters through the architecture of qϕ: the encoder uses causal 3D convolutions, ensuring that the approximate posterior qϕ(𝖹|𝖷) respects the causal structure.

In practice, the reconstruction term is evaluated using a Gaussian decoder, which reduces to a mean squared error: (Recon MSE)𝔼qϕ(𝖹|𝖷)[logpθ(𝖷|𝖹)]12σ2𝖷𝒟θ(𝖹)F2+const, where F denotes the Frobenius norm over all spatiotemporal dimensions and σ2 is a fixed noise variance (often set to 1).

Remark 19.

The gap between the log-marginal likelihood and the ELBO equals the KL divergence between the approximate posterior and the true posterior: (ELBO GAP)logpθ(𝖷)3DVAE(θ,ϕ;𝖷)=𝖣KL(qϕ(𝖹|𝖷)pθ(𝖹|𝖷))0. This gap vanishes if and only if the approximate posterior exactly matches the true posterior. In practice, the gap is controlled by the expressiveness of the encoder architecture. Causal 3D encoders with large receptive fields can better approximate the true posterior than shallow encoders with small receptive fields, because they can capture long-range temporal dependencies in the posterior.

Example 14 (Reparameterisation for Causal 3D-VAE).

The reparameterisation trick (see ch:vae) is applied to the causal 3D-VAE as follows. The encoder outputs two tensors: 𝝁ϕ(𝖷)F×H×W×C (the posterior mean) and log𝝈ϕ2(𝖷)F×H×W×C (the log-variance). A latent sample is drawn as (Reparam)𝖹=𝝁ϕ(𝖷)+𝝈ϕ(𝖷)𝝐,𝝐Normal(0,𝑰), where denotes element-wise multiplication and 𝝈ϕ=exp(12log𝝈ϕ2). This reparameterisation allows gradients to flow through the sampling step, enabling end-to-end training of the encoder via backpropagation. The causality of the encoder ensures that 𝝁ϕ and 𝝈ϕ at temporal index f depend only on input frames at indices fst, where st is the temporal compression factor.

Temporal Compression Bound

How much temporal compression is achievable without destroying the video content? Intuitively, if consecutive frames are very similar (low motion), then aggressive temporal compression is possible. If frames change rapidly (high motion), compression must be more conservative. The following proposition makes this intuition precise.

Proposition 8 (Temporal Compression Bound).

Let 𝖷F×D be a video tensor reshaped so that each frame 𝒙fD (with D=H×W×C) is a vector. Define the temporal autocorrelation at lag as (Temporal Autocorr)ρ()=1Ff=1F𝒙f𝒙,𝒙f+𝒙𝒙f𝒙𝒙f+𝒙, where 𝒙=1Ff𝒙f is the temporal mean. If a temporal downsampling operator 𝒮s with factor s (taking every s-th frame) is applied before encoding, the reconstruction error satisfies (Temporal Compression Bound)𝔼[𝖷𝖷^F2]2f=1F𝒙f𝒙2(1ρ(1))(1s1), where 𝖷^ is the reconstruction from the downsampled video. In particular, when ρ(1)1 (high temporal correlation), the bound approaches zero, permitting aggressive compression. When ρ(1)0 (uncorrelated frames), the bound grows linearly with 1s1, limiting the achievable compression.

Proof.

The proof proceeds by decomposing the reconstruction error into temporal interpolation error and encoding error. The downsampled video retains frames at indices {1,s+1,2s+1,}. Intermediate frames must be reconstructed by interpolation.

For a frame 𝒙f at a non-retained index, the optimal linear interpolation using adjacent retained frames 𝒙f and 𝒙f+ has expected squared error proportional to 𝒙f𝒙2(1ρ(Δf)), where Δf is the distance to the nearest retained frame.

Summing over all non-retained frames (of which there are F(1s1) in expectation) and bounding ρ(Δf)ρ(1) (since autocorrelation is non-increasing for stationary processes) yields the stated bound.

Remark 20.

In practice, modern causal 3D-VAEs use 4× temporal compression (CogVideoX, Wan-Video) and 8× temporal compression (some Open-Sora variants). The choice is guided by the typical temporal autocorrelation of the training data. Natural videos at 24 fps typically have ρ(1)>0.95, justifying 4× compression. Videos with rapid motion (sports, action scenes) may have lower autocorrelation, requiring either reduced compression or motion-adaptive encoding schemes.

The Complete Training Loss

The ELBO alone is insufficient for training a high-quality video autoencoder. Modern video autoencoders augment the ELBO with perceptual and adversarial losses that improve visual quality beyond what pixel-level reconstruction can achieve.

Definition 14 (Causal 3D-VAE Total Training Loss).

The total training loss for a causal 3D-VAE is (Total LOSS)total=recon+λKLKL+λadvadv+λpercperc, where each component is defined as follows:

  1. Reconstruction loss (pixel-level fidelity): (Recon LOSS)recon=𝖷𝖷^1=f,h,w,c|Xf,h,w,cX^f,h,w,c|. The 1 norm is preferred over 2 because it produces sharper reconstructions (the 2 norm encourages blurry averages).

  2. KL regularisation (latent space structure): (KL LOSS)KL=𝖣KL(qϕ(𝖹|𝖷)Normal(0,𝑰)). For the standard diagonal Gaussian encoder qϕ(𝖹|𝖷)=Normal(𝝁ϕ(𝖷),diag(𝝈ϕ2(𝖷))), this has the closed-form expression (KL Closed)KL=12i(μi2+σi2logσi21).

  3. Adversarial loss (perceptual sharpness): (ADV LOSS)adv=𝔼𝖷^𝒟(𝖹)[logDψ(𝖷^)], where Dψ is a discriminator network trained to distinguish real videos 𝖷 from reconstructions 𝖷^. In practice, patch-based discriminators operating on individual frames or short clips are used.

  4. Perceptual loss (feature-level similarity): (PERC LOSS)perc=1NΦ(𝖷)Φ(𝖷^)22, where Φ extracts features from layer of a pre-trained network (typically a VGG or LPIPS network), and N is a normalisation constant.

The hyperparameters λKL, λadv, and λperc control the relative importance of each term. Typical values are λKL[106,104] (small, to avoid posterior collapse), λadv[0.1,1.0], and λperc[0.1,1.0].

Caution.

The KL weight requires careful tuning. Setting λKL too high causes posterior collapse: the encoder learns to ignore the input and output the prior, producing latent codes that carry no information. Setting it too low produces a latent space with poor structure, making downstream diffusion training more difficult. The Stable Diffusion VAE uses λKL106; video VAEs typically use similar or slightly larger values. See ch:vae for a detailed discussion of the posterior collapse phenomenon.

Encoder-Decoder Architecture

The encoder and decoder of a causal 3D-VAE follow the familiar hierarchical structure of image autoencoders, extended to three dimensions. fig:vdiff:3dvae-architecture shows a typical design.

Architecture of a causal 3D-VAE. The encoder (left) maps the input video 𝖷 through causal 3D convolutional blocks and downsampling layers to produce the mean 𝝁ϕ and log-variance log𝝈ϕ2 of the approximate posterior. A latent sample 𝖹 is drawn via the reparameterisation trick. The decoder (right) maps 𝖹 back to pixel space through upsampling layers and causal 3D convolutional blocks. The dashed arrow indicates that 𝖹 is passed from encoder to decoder. All convolutions are causal in the temporal dimension.

Example 15 (CogVideoX Causal 3D-VAE).

The CogVideoX model [17] uses a causal 3D-VAE with the following specifications:

  • Temporal compression factor: 4× (49 input frames produce 13 latent frames).

  • Spatial compression factor: 8×8 (height and width each reduced by a factor of 8).

  • Latent channels: C=16.

  • Total compression ratio: r=(4×8×8×3)/16=48.

  • Architecture: the encoder uses causal 3D convolutions with temporal kernel size kt=3 and spatial kernel size 3×3. Temporal downsampling is achieved by strided convolutions with stride (2,1,1).

  • The first frame is encoded using purely spatial (2D) convolutions, ensuring compatibility with image inputs.

Example 16 (Wan-Video Causal 3D-VAE).

The Wan-Video model [19] uses a causal 3D-VAE with a similar design:

  • Temporal compression: 4×.

  • Spatial compression: 8×8.

  • Latent channels: C=16.

  • The model uses a “CausalConv3d” layer that applies (kt1) frames of temporal padding on the left and zero padding on the right, ensuring strict causality.

  • Group normalisation is used throughout, with groups adapted for the increased channel dimensions.

  • The decoder mirrors the encoder architecture with transposed convolutions for upsampling.

Factorised Spatiotemporal Processing

Full 3D convolutions are parameter-heavy and computationally expensive. A common optimisation is to factorise each 3D convolution into separate spatial and temporal components.

Definition 15 (Factorised Spatiotemporal Convolution).

A factorised spatiotemporal convolution decomposes a 3D convolution with kernel (kt,kh,kw) into two sequential operations:

  1. A spatial convolution with kernel (1,kh,kw) that processes each frame independently.

  2. A temporal convolution with kernel (kt,1,1) that processes each spatial location across time.

With causal padding applied to the temporal convolution, the factorised operation preserves the causal property while reducing the parameter count from C2ktkhkw to C2(khkw+kt).

This factorisation was popularised by S3D [63] and R(2+1)D [64] in the video understanding literature and has been widely adopted in video generation. The Open-Sora [18] encoder uses this factorised design throughout, applying 2D spatial convolutions inherited from a pre-trained image autoencoder and adding temporal convolution layers that are trained from scratch.

Remark 21.

A practical advantage of the factorised design is that the spatial convolutions can be initialised from a pre-trained image autoencoder (such as the Stable Diffusion VAE), while only the temporal convolutions need to be trained from scratch. This “inflate and fine-tune” strategy dramatically reduces the amount of video data required for training and accelerates convergence.

Training Procedure

Training a causal 3D-VAE involves alternating between the autoencoder (encoder + decoder) and the discriminator, following the same adversarial training protocol used for image autoencoders.

Algorithm 3 (Causal 3D-VAE Training).

Input: Video dataset 𝒟video, encoder ϕ, decoder 𝒟θ, discriminator Dψ, learning rate η, loss weights λKL,λadv,λperc. Output: Trained encoder ϕ and decoder 𝒟θ.

  1. Initialise spatial convolution weights from a pre-trained image autoencoder (e.g., Stable Diffusion VAE). Initialise temporal convolutions randomly.

  2. For each mini-batch {𝖷1,,𝖷B}𝒟video: enumerate[(a)]

  3. Encode: (𝝁i,log𝝈i2)=ϕ(𝖷i) for each i.

  4. Sample: 𝖹i=𝝁i+𝝈i𝝐i, 𝝐iNormal(0,𝑰).

  5. Decode: 𝖷^i=𝒟θ(𝖹i).

  6. Compute losses: recon, KL, adv, perc as in Definition 14.

  7. Update autoencoder: (ϕ,θ)(ϕ,θ)η(ϕ,θ)total.

  8. Update discriminator: ψψηψD(ψ), where D=𝔼[logDψ(𝖷)]𝔼[log(1Dψ(𝖷^))]. enumerate

  9. Optional: Apply gradient penalty λgp𝔼[(Dψ1)2] to stabilise discriminator training.

Remark 22.

In practice, training a causal 3D-VAE proceeds in stages. First, the autoencoder is trained without the adversarial loss (λadv=0) for a warm-up period of 10,000 to 50,000 steps, allowing the reconstruction and KL losses to stabilise. The discriminator is then introduced, and the adversarial loss is gradually increased to its final value. This staged approach prevents the discriminator from overwhelming the autoencoder in the early stages of training, when reconstructions are poor and the discriminator can trivially distinguish real from generated video.

Remark 23.

Several video autoencoders (CogVideoX, Open-Sora) train on a mixture of image and video data. Images are treated as single-frame videos and processed through the same encoder, with the temporal convolutions reducing to identity operations (since there is only one frame). This mixed training strategy ensures that the autoencoder retains strong per-frame reconstruction quality (inherited from the image data) while learning temporal compression (from the video data). Typical mixing ratios allocate 20–50% of mini-batch slots to images and the remainder to video clips.

Discrete Tokenisation for Video

The previous two sections developed continuous latent video autoencoders, where the latent space is a real-valued tensor 𝖹F×H×W×C. An alternative approach, rooted in the VQ-VAE framework (see ch:vae2), replaces the continuous latent space with a discrete one. Each spatial (or spatiotemporal) location in the latent tensor is mapped to the nearest entry in a learned codebook, producing a sequence of discrete tokens that represent the video.

Discrete tokenisation has a compelling appeal: it unifies video generation with the autoregressive language modelling paradigm that has proven so successful for text. Once a video is encoded as a sequence of discrete tokens, it can be modelled by a standard autoregressive transformer (GPT-style) or a masked transformer (BERT-style), inheriting the powerful sequence modelling capabilities developed for natural language processing.

Key Idea.

From pixels to tokens. Discrete video tokenisation bridges the gap between continuous visual signals and discrete sequence modelling. A video 𝖷F×H×W×3 is mapped to a sequence of tokens 𝒔=(s1,s2,,sN) where each si{1,2,,K} indexes a learned codebook entry. This reduction, from millions of continuous pixel values to thousands of discrete tokens, enables the use of powerful autoregressive priors for video generation.

Vector Quantisation for Video

The foundation of discrete video tokenisation is vector quantisation (VQ), which maps continuous encoder outputs to the nearest entry in a finite codebook.

Definition 16 (Video Codebook).

A video codebook is a set of K learnable vectors (Codebook)𝒞={𝒆k}k=1K,𝒆kd, where d is the embedding dimension and K is the codebook size (typically K=210 to 218). The quantisation operator maps a continuous vector 𝒛d to its nearest codebook entry: (Quantise)q(𝒛)=𝒆k,wherek=arg mink𝒛𝒆k2.

For a video tensor, quantisation is applied independently to each spatiotemporal location in the latent tensor. The encoder produces 𝖹=(𝖷)F×H×W×d, and each vector 𝒛f,h,wd is quantised independently: (VQ Video)𝒛^f,h,w=q(𝒛f,h,w)=𝒆kf,h,w,kf,h,w=arg mink𝒛f,h,w𝒆k2. The resulting discrete token sequence has length N=F×H×W, with each token taking values in {1,,K}.

Remark 24.

The compression achieved by VQ is substantial. Consider a video with F=16 frames at 256×256 resolution. With 4× temporal and 16×16 spatial compression, the token sequence has length N=4×16×16=1024. With a codebook of size K=8192, each token requires log28192=13 bits, so the entire video is represented by 1024×1313,000 bits, compared to 16×256×256×3×825 million bits in the raw pixel representation. This represents a compression ratio exceeding 1900×.

Training with the Straight-Through Estimator

The quantisation operator q(𝒛)=arg mink𝒛𝒆k has zero gradients almost everywhere (and undefined gradients at the Voronoi boundaries). To train the encoder through the quantisation bottleneck, VQ-VAE [13] uses the straight-through estimator (STE): during the forward pass, the quantised values 𝒛^ are used; during the backward pass, gradients are copied directly from the decoder input to the encoder output, bypassing the quantisation step: (STE)𝒛^=𝒛+sg[𝒛^𝒛], where sg[] denotes the stop-gradient operator. This expression evaluates to 𝒛^ in the forward pass (since 𝒛+(𝒛^𝒛)=𝒛^) but has gradient 𝒛𝒛^=𝑰 in the backward pass (since the stop-gradient term contributes zero gradient).

The VQ-VAE training loss combines reconstruction with two commitment terms that keep encoder outputs and codebook entries close:

Definition 17 (VQ-VAE Training Loss for Video).

The VQ-VAE training loss for a video tokeniser is (VQ LOSS)VQ=𝖷𝖷^22reconstruction+sg[𝒛]𝒆22codebook+β𝒛sg[𝒆]22,commitment where 𝒛=(𝖷) is the encoder output, 𝒆=q(𝒛) is the quantised code, 𝖷^=𝒟(𝒆) is the reconstruction, sg[] is the stop-gradient operator, and β>0 is the commitment cost coefficient (typically β=0.25).

The three terms serve distinct purposes. The reconstruction loss trains the decoder. The codebook loss moves codebook entries toward encoder outputs (training only the codebook, since the encoder output is stopped). The commitment loss moves encoder outputs toward codebook entries (training only the encoder, since the codebook entry is stopped). Together, they ensure that encoder outputs and codebook entries remain close, preventing codebook collapse (where large portions of the codebook go unused).

Caution.

Codebook collapse is a persistent challenge. In practice, a large fraction of codebook entries may never be selected during training, effectively reducing the codebook size. Several techniques mitigate this problem:

  • Exponential moving average (EMA) updates: Instead of gradient-based codebook updates, replace each codebook entry with an exponential moving average of the encoder outputs that are assigned to it: 𝒆kγ𝒆k+(1γ)𝒛k, where 𝒛k is the mean of encoder outputs assigned to entry k and γ0.99.

  • Codebook reset: Periodically replace unused codebook entries with randomly selected encoder outputs from the current batch, ensuring that all entries remain active.

  • Entropy regularisation: Add a term λH𝖧(passign) to the loss that encourages a uniform distribution over codebook assignments, where passign(k)=1Ni𝟏[q(𝒛i)=𝒆k] and 𝖧 denotes entropy.

Example 17 (Codebook Utilisation in Practice).

A well-trained video VQ-VAE with K=8192 codebook entries typically achieves 60–90% codebook utilisation (meaning 4,900 to 7,400 entries are selected at least once per epoch). With EMA updates and periodic resets, utilisation can reach 95% or higher. MAGVIT [15] reported that without entropy regularisation, utilisation dropped below 20% for codebook sizes exceeding K=4096. With entropy regularisation, utilisation remained above 90% even for K=16,384.

Lookup-Free Quantisation

A persistent challenge with standard VQ is that increasing the codebook size K beyond a few thousand entries leads to codebook underutilisation: many codebook entries are never selected, wasting representational capacity. MAGVIT-v2 [16] introduced lookup-free quantisation (LFQ) to address this problem.

Definition 18 (Lookup-Free Quantisation).

Lookup-free quantisation (LFQ) replaces the explicit codebook with a simple sign function. Given an encoder output 𝒛d, the quantised representation is (LFQ)q(𝒛)=sign(𝒛){1,+1}d, where sign is applied element-wise. The implicit codebook is the set of all 2d vertices of the d-dimensional hypercube {1,+1}d, so the codebook size is K=2d with zero learnable codebook parameters.

LFQ eliminates the codebook collapse problem entirely: every “codebook entry” (vertex of the hypercube) is equally accessible, and utilisation is determined solely by the distribution of encoder outputs. The sign function is non-differentiable, but gradients can be estimated using a smooth approximation such as tanh(α𝒛) with α1, or by using the straight-through estimator.

Proposition 9 (LFQ Codebook Capacity).

With embedding dimension d, LFQ provides a codebook of size K=2d using zero learnable parameters. The information content per spatial location is exactly d bits. For d=18, the codebook size is K=262,144, vastly exceeding the typical VQ codebook sizes of K=1024 to 8192.

Proof.

Each dimension of the encoder output is quantised to {1,+1}, contributing exactly one bit of information. With d independent dimensions, the total number of distinct codes is 2d, and the information content is d bits. Since the codebook is defined implicitly by the sign function, no learnable codebook parameters are required.

Example 18 (MAGVIT-v2 Video Tokeniser).

MAGVIT-v2 [16] uses LFQ with d=18, giving an implicit codebook of K=262,144 entries. Combined with a causal 3D encoder using 4× temporal and 16×16 spatial compression, a 17-frame video at 256×256 is tokenised into 5×16×16=1280 tokens, each drawn from a vocabulary of 262,144. This large vocabulary enables the model to represent fine visual details that would be lost with smaller codebooks. The resulting token sequence can be modelled by an autoregressive transformer, unifying video generation with language modelling.

Remark 25 (Continuous vs. Discrete Latent Spaces for Video).

The choice between continuous and discrete latent spaces reflects a fundamental trade-off in video generation:

  • Continuous latents (as in causal 3D-VAEs) enable gradient flow from the diffusion model through the latent space to the autoencoder, facilitating end-to-end fine-tuning. The smooth geometry of continuous spaces is well-matched to the Gaussian noise process of diffusion models.

  • Discrete tokens (as in VQ-VAE and LFQ) enable the use of autoregressive priors, which can model complex dependencies through next-token prediction. Discrete tokens also provide a natural interface for multimodal models that operate on mixed sequences of text and visual tokens.

In practice, the field has converged toward continuous latents for diffusion-based generation (Sora, CogVideoX, Wan-Video) and discrete tokens for autoregressive generation (VideoGPT, MAGVIT-v2, VideoPoet). Some systems use both: a continuous latent space for the diffusion process and discrete tokens for conditioning or planning.

The VQ-Video Pipeline

fig:vdiff:vq-pipeline illustrates the complete VQ-based video tokenisation pipeline, from input frames through 3D encoding, quantisation, and decoding.

The vector-quantised video tokenisation pipeline. Input frames are processed by a 3D encoder to produce continuous latent representations. These are quantised to the nearest entry in a learned codebook 𝒞, producing discrete tokens. The 3D decoder reconstructs the video from the quantised latents. During training, the straight-through estimator enables gradient flow through the quantisation step.

Example 19 (VideoGPT).

VideoGPT [2] was one of the earliest systems to combine VQ-VAE video tokenisation with an autoregressive transformer prior. The architecture consists of:

  1. A 3D VQ-VAE with 2× temporal and 4×4 spatial downsampling, using axial attention in the encoder and decoder.

  2. A codebook of K=1024 entries with embedding dimension d=256.

  3. A GPT-2-style transformer that models the token sequence autoregressively, conditioned on text or class labels.

While VideoGPT's generation quality was limited by the small codebook and modest model scale, it demonstrated the viability of the “tokenise then model autoregressively” paradigm for video.

Latent Space Temporal Structure

The preceding sections developed the machinery for compressing video into a latent space, whether continuous (causal 3D-VAE) or discrete (VQ-based tokenisation). We now turn to a fundamental question: what properties does the latent space inherit from the temporal structure of the input video? Understanding this question is essential for designing diffusion models that generate temporally coherent video in latent space.

The central insight of this section is both simple and powerful: temporal smoothness in pixel space translates to temporal smoothness in latent space, provided the encoder satisfies mild regularity conditions. This means that if consecutive video frames are similar (as they almost always are in natural video), then their latent codes are also similar. The diffusion model can therefore generate smooth video by generating smooth trajectories in latent space.

Latent Temporal Lipschitz Continuity

We begin with the fundamental theorem connecting pixel-space smoothness to latent-space smoothness.

Theorem 3 (Latent Temporal Lipschitz Continuity).

Let :H×W×CH×W×C be a video frame encoder that is L-Lipschitz continuous with respect to the Frobenius norm: (Lipschitz Encoder)(𝒙)(𝒚)FL𝒙𝒚F𝒙,𝒚H×W×C. If consecutive video frames satisfy 𝒙f+1𝒙fFδ for all f=1,,F1, then the corresponding latent codes satisfy (Lipschitz Latent)𝒛f+1𝒛fFLδf=1,,F1, where 𝒛f=(𝒙f). In particular, if the video is temporally smooth (δ0), then the latent trajectory is also smooth, with smoothness scaled by the Lipschitz constant L.

Proof.

The proof is a direct application of the Lipschitz condition. For any consecutive frames 𝒙f and 𝒙f+1: (Lipschitz Proof STEP)𝒛f+1𝒛fF=(𝒙f+1)(𝒙f)FL𝒙f+1𝒙fFLδ, where the first inequality uses the L-Lipschitz condition on and the second uses the temporal smoothness assumption 𝒙f+1𝒙fFδ.

Remark 26.

Are neural network encoders Lipschitz continuous? In general, yes. A neural network composed of Lipschitz layers (linear layers, convolutions, ReLU activations, normalisation layers) is itself Lipschitz continuous, with a Lipschitz constant bounded by the product of the operator norms of the weight matrices. For a network with L layers and weight matrices 𝑾1,,𝑾L: (Lipschitz Network)Lnet=1L𝑾op, where 𝑾op is the spectral norm of the -th weight matrix. Techniques such as spectral normalisation (Miyato et al., 2018 [20]) can be used to control this bound.

Corollary 2 (Latent Trajectory Diameter).

Under the conditions of Theorem 3, the total length of the latent trajectory satisfies (Trajectory Length)f=1F1𝒛f+1𝒛fF(F1)Lδ, and the diameter of the trajectory (maximum distance between any two latent codes) satisfies (Trajectory Diameter)maxf,g𝒛f𝒛gF(F1)Lδ. For a smooth video with δ1 and moderate L, the latent trajectory is confined to a small region of the latent space, which the diffusion model can learn to navigate.

Proof.

The trajectory length bound follows by summing (Lipschitz Latent) over f=1,,F1. The diameter bound follows from the triangle inequality: 𝒛f𝒛gFj=min(f,g)max(f,g)1𝒛j+1𝒛jF|fg|Lδ(F1)Lδ.

First-Frame Conditioning

A common design pattern in video generation is to condition the diffusion model on the first frame of the video. The user provides an image, and the model generates a video that begins with that image and continues with plausible motion. This requires the autoencoder to treat the first frame specially.

Definition 19 (First-Frame Conditioning in Latent Space).

In first-frame conditioning, the latent representation of a video is decomposed as (First Frame)𝖹=[img(𝒙1);vid(𝒙2:F)], where img:H×W×C1×H×W×C encodes the first frame using an image encoder, and vid:(F1)×H×W×C(F1)×H×W×C encodes the remaining frames using a video encoder (which may apply temporal compression). The semicolon denotes concatenation along the temporal axis.

This decomposition has several advantages. First, it allows the first frame to be encoded at full temporal resolution (no temporal compression), preserving the fine details of the conditioning image. Second, it enables the use of a pre-trained image encoder (such as the Stable Diffusion VAE) for the first frame, while using a video-specific encoder for the remaining frames. Third, during inference, the first frame's latent code can be provided as a fixed conditioning signal, and the diffusion model only needs to generate the remaining latent frames.

Example 20 (CogVideoX First-Frame Conditioning).

In CogVideoX [17], the causal 3D-VAE encodes the first frame using purely spatial (2D) convolutions, while subsequent frames are encoded using causal 3D convolutions with 4× temporal compression. For a 49-frame input, the first frame produces 1 latent frame, and the remaining 48 frames produce 12 latent frames, giving 13 latent frames total. During image-to-video generation, the first latent frame is computed from the given image and held fixed, while the diffusion model generates only the remaining 12 latent frames.

Remark 27.

First-frame conditioning creates a natural anchor point for temporal consistency. Because the first frame is encoded without temporal compression, its latent code faithfully represents the conditioning image. The diffusion model can then focus on generating motion and temporal evolution, knowing that the starting point is fixed. This separation of concerns (appearance from the first frame, motion from the diffusion model) simplifies the generation task and typically improves quality.

Latent Interpolation and Smooth Generation

The Lipschitz continuity theorem (Theorem 3) tells us that smooth videos produce smooth latent trajectories. The converse is equally important for generation: smooth latent trajectories should produce smooth videos. This motivates the study of latent interpolation.

Definition 20 (Linear Latent Interpolation).

Given two latent codes 𝒛a,𝒛bd corresponding to two video frames, the linear interpolation at parameter α[0,1] is (Linear Interp)𝒛(α)=(1α)𝒛a+α𝒛b. The decoded interpolation produces a frame 𝒙^(α)=𝒟(𝒛(α)) that should visually interpolate between 𝒙^a=𝒟(𝒛a) and 𝒙^b=𝒟(𝒛b).

Proposition 10 (Interpolation Smoothness).

If the decoder 𝒟 is LD-Lipschitz continuous, then the decoded interpolation path α𝒙^(α)=𝒟(𝒛(α)) satisfies (Interp Smooth)𝒙^(α1)𝒙^(α2)FLD|α1α2|𝒛b𝒛aF for all α1,α2[0,1]. In particular, the decoded interpolation is Lipschitz continuous in α with constant LD𝒛b𝒛aF.

Proof.

The linear interpolation satisfies 𝒛(α1)𝒛(α2)F=|α1α2|𝒛b𝒛aF. Applying the Lipschitz condition on 𝒟: 𝒙^(α1)𝒙^(α2)F=𝒟(𝒛(α1))𝒟(𝒛(α2))FLD𝒛(α1)𝒛(α2)F=LD|α1α2|𝒛b𝒛aF.

Definition 21 (Spherical Latent Interpolation).

For latent spaces where the norm carries semantic meaning (as in normalised or KL-regularised latent spaces), spherical linear interpolation (SLERP) often produces better results. Given unit-norm latent codes 𝒛^a=𝒛a/𝒛a and 𝒛^b=𝒛b/𝒛b with angle Ω=arccos(𝒛^a,𝒛^b), the spherical interpolation is (Slerp)𝒛(α)=sin((1α)Ω)sinΩ𝒛a+sin(αΩ)sinΩ𝒛b. Unlike linear interpolation, SLERP maintains a constant norm along the interpolation path, avoiding the “norm dip” that occurs at α=0.5 with linear interpolation.

Remark 28.

The “norm dip” in linear interpolation deserves elaboration. For two unit-norm vectors 𝒛a and 𝒛b with angle Ω between them, the norm of the linear interpolation at α=0.5 is (NORM DIP)12𝒛a+12𝒛b=122+2cosΩ=cos(Ω/2). When Ω is large (distant points in latent space), this norm can be significantly less than 1, causing the decoded interpolation to pass through low-density regions of the latent space where the decoder has not been trained. SLERP avoids this by traversing the great circle on the unit sphere, maintaining 𝒛(α)=1 for all α. For VAE latent spaces where the prior is Normal(0,𝑰), the norm carries information about “typicality”: latent codes with norms far from d (the expected norm of a d-dimensional standard Gaussian) tend to produce poor-quality decoding.

Example 21 (Latent Interpolation for Video Frame Interpolation).

Latent interpolation provides a simple approach to video frame interpolation (generating intermediate frames between two given frames). Given frames 𝒙a and 𝒙b:

  1. Encode both frames: 𝒛a=(𝒙a), 𝒛b=(𝒙b).

  2. Interpolate in latent space at N evenly spaced values: 𝒛(αn) for αn=n/(N+1), n=1,,N.

  3. Decode the interpolated latents: 𝒙^n=𝒟(𝒛(αn)).

This produces N intermediate frames that smoothly transition from 𝒙a to 𝒙b. The quality of the interpolation depends on how well the latent space is structured: a well-regularised VAE latent space (with small KL weight) produces semantically meaningful interpolations where objects move smoothly, while a poorly structured latent space may produce artefacts at intermediate values.

Temporal Structure in the Latent Diffusion Process

The latent temporal structure has direct implications for the design of the diffusion model that operates in the latent space. Because the latent trajectory of a natural video is smooth (Theorem 3), the noise schedule and denoising architecture can be designed to exploit this smoothness.

Insight.

Temporal smoothness simplifies the diffusion task. Consider the noising process applied to a latent video 𝖹F×H×W×C. At noise level t, the noised latent is 𝖹t=αt𝖹+1αt𝝐, where 𝝐Normal(0,𝑰). The denoising model must predict the noise 𝝐 (or equivalently, the clean latent 𝖹) from 𝖹t.

When 𝖹 has smooth temporal structure, the clean signal along the temporal dimension is low-frequency. The noise 𝝐, being i.i.d. Gaussian, is high-frequency. This spectral separation makes the denoising task easier: the model can partially denoise by applying temporal smoothing, a much simpler operation than spatial denoising. This insight helps explain why video diffusion models often converge faster than one might expect given the high dimensionality of the latent space.

To formalise this, consider the temporal frequency content of the latent tensor. For a fixed spatial location (h,w) and channel c, the temporal signal 𝒛h,w,cF is a one-dimensional sequence. Its discrete Fourier transform reveals the frequency content: (Latent FFT)Z^h,w,c(ω)=f=0F1zf,h,w,ce2πiωf/F,ω=0,1,,F1.

For a temporally smooth latent (small 𝒛f+1𝒛f), the energy |Z^(ω)|2 is concentrated at low frequencies (ω0), while the noise 𝝐 has uniform spectral energy across all frequencies. The denoising model can exploit this asymmetry by attending to temporal patterns at different frequency scales.

Lemma 2 (Spectral Energy Concentration).

Let 𝒛=(z0,z1,,zF1)F be a temporal signal satisfying |zf+1zf|δ for all f. Then the high-frequency energy satisfies (Spectral Bound)ω=F/2F1|Z^(ω)|2Fδ24sin2(π/F), where Z^(ω) is the discrete Fourier transform of 𝒛. For large F, the bound is approximately F3δ2/(4π2), which is small when δ is small.

Proof.

The difference signal df=zf+1zf has |df|δ for all f. The DFT of 𝒛 and 𝒅 are related by D^(ω)=(e2πiω/F1)Z^(ω), so |Z^(ω)|2=|D^(ω)|2/|e2πiω/F1|2.

For high frequencies ωF/2, |e2πiω/F1|2=4sin2(πω/F)4sin2(π/2)=4 when ω=F/2. The minimum value over the high-frequency range is 4sin2(πF/2/F)4sin2(π/2π/F).

By Parseval's theorem, ω|D^(ω)|2=Ff|df|2F2δ2. The bound follows by dividing the total difference energy by the minimum denominator over high frequencies.

Latent Trajectories as Curves

A useful geometric perspective is to view the sequence of latent codes (𝒛1,𝒛2,,𝒛F) as a discrete curve in the latent space H×W×C. This curve-based view provides intuitions for how the diffusion model generates video.

Definition 22 (Latent Video Trajectory).

The latent video trajectory of a video 𝖷=(𝒙1,,𝒙F) under encoder is the discrete curve (Latent Trajectory)γ=(𝒛1,𝒛2,,𝒛F)H×W×C, where the 𝒛f are the latent codes obtained by encoding (and possibly temporally compressing) the input frames.

fig:vdiff:latent-trajectory visualises this concept. For a natural video containing smooth motion (e.g., a camera pan or a walking person), the latent trajectory forms a smooth curve. For a video with abrupt scene changes (e.g., a cut between shots), the trajectory contains discontinuities.

Latent video trajectories visualised as curves in a 2D projection of the latent space. A smooth natural video (blue) produces a smooth, slowly varying curve. A video with an abrupt scene cut (orange) produces a trajectory with a large discontinuity (dashed line). The diffusion model's task is to generate plausible trajectories in this space.

Implications for Diffusion Model Design

The temporal structure of the latent space has several important implications for the design of the diffusion model that operates within it.

Temporal attention is essential.

Because adjacent latent frames are correlated (as guaranteed by Theorem 3), the denoising model must attend across the temporal dimension to exploit these correlations. A model that processes each latent frame independently would ignore the most predictable structure in the data. This motivates the temporal attention mechanisms and 3D architectures discussed in Video Diffusion Transformer (DiT) of File C.

Noise scheduling can be temporal-aware.

The spectral concentration result (Lemma 2) suggests that temporal low-frequency components of the latent video should be denoised first (they contain the large-scale motion and scene structure), while high-frequency temporal details can be added later. This matches the coarse-to-fine generation observed in practice.

The diffusion model generates curves, not frames.

From the geometric perspective of Latent Trajectories as Curves, the diffusion model's task is not to generate F independent latent frames but to generate a smooth curve in the latent space. This is a lower-dimensional problem than generating F independent points, because the curve is constrained by temporal continuity.

Proposition 11 (Effective Dimensionality Reduction).

Let γ=(𝒛1,,𝒛F) be a latent trajectory with 𝒛f+1𝒛fFLδ for all f. The trajectory lies within a tube of radius R=(F1)Lδ around its starting point 𝒛1. The volume of this tube relative to the full latent hypercube [M,M]F×d (where d=HWC) scales as (Volume Ratio)VtubeVcube((F1)Lδ2M)d, which is exponentially small in d when (F1)Lδ2M. The diffusion model only needs to learn the distribution over this tiny fraction of the full latent space.

Proof.

By Corollary 2, the trajectory is contained within a ball of radius R=(F1)Lδ centred at 𝒛1. The volume of this ball in d is proportional to Rd, while the volume of the cube [M,M]d is (2M)d. The ratio follows directly. (For the full latent video tensor of dimension F×d, the constraint structure is richer, as each frame is constrained relative to its neighbours, but the scaling argument remains valid.)

Latent Space Quality and Downstream Diffusion

The quality of the latent space directly affects the quality of the downstream diffusion model. A well-structured latent space has several desirable properties that simplify the diffusion task.

Definition 23 (Latent Space Desiderata for Video Diffusion).

A latent space produced by a video autoencoder (,𝒟) is well-suited for diffusion if it satisfies:

  1. Near-Gaussian marginals: The distribution of latent codes 𝖹=(𝖷) over the training set is approximately Normal(0,𝑰). This ensures compatibility with the standard Gaussian noise process used in diffusion.

  2. Temporal smoothness: Consecutive latent frames 𝒛f and 𝒛f+1 are close in 2 distance, as guaranteed by Theorem 3 when the encoder is Lipschitz.

  3. Semantic disentanglement: Different dimensions of the latent space encode semantically distinct aspects of the video (e.g., appearance vs. motion, foreground vs. background).

  4. High reconstruction fidelity: The decoder 𝒟 faithfully reconstructs videos from latent codes, so that any video generated in latent space can be decoded to a high-quality pixel-space video.

Remark 29.

In practice, even with KL regularisation, the latent distribution may not be exactly standard Gaussian. A common post-processing step is to compute the per-channel mean 𝝁c and standard deviation σc of the latent codes over the training set, and normalise: 𝖹norm=(𝖹𝝁)/𝝈. This ensures that the diffusion model operates on latents with approximately zero mean and unit variance, matching the assumptions of the standard noise schedule. Stable Diffusion, for instance, applies such a scaling factor (approximately 0.18) to its latent codes before diffusion.

Exercise 10.

Consider a video autoencoder with the following specifications: input resolution 720×1280 at 24 fps for 4 seconds (96 frames), spatial compression 8×8, temporal compression 4×, and C=16 latent channels.

  1. Compute the total number of values in the input video tensor.

  2. Compute the total number of values in the latent tensor.

  3. What is the compression ratio?

  4. If each value requires 16 bits (FP16), how much memory does the latent tensor require?

Exercise 11.

Let be an encoder consisting of 5 convolutional layers with spectral norms 𝑾1op=1.2, 𝑾2op=0.9, 𝑾3op=1.1, 𝑾4op=0.8, 𝑾5op=1.0, using ReLU activations (which are 1-Lipschitz).

  1. Compute an upper bound on the Lipschitz constant of .

  2. If consecutive video frames differ by at most δ=0.5 in Frobenius norm, what is the maximum distance between consecutive latent codes?

  3. For a 24-frame video, what is the maximum diameter of the latent trajectory?

Exercise 12.

A video VQ-VAE uses a codebook of size K=4096 with embedding dimension d=256. The encoder produces a latent grid of shape 8×16×16 (temporal × height × width) from a 32×256×256 input video.

  1. How many tokens represent the video?

  2. How many bits of information does the token sequence carry?

  3. Compare this to the number of bits in the raw video (assuming 8 bits per channel, 3 channels).

  4. If a transformer models the token sequence autoregressively, what is the vocabulary size and sequence length?

Connecting Latent Compression to Video Diffusion

This section has established the mathematical foundations of latent space temporal structure. The key results can be summarised as follows:

  1. Temporal smoothness transfers (Theorem 3): Lipschitz encoders map smooth pixel-space videos to smooth latent trajectories.

  2. Spectral concentration (Lemma 2): smooth latent trajectories have energy concentrated at low temporal frequencies, creating a spectral separation between signal and noise that aids denoising.

  3. First-frame conditioning (Definition 19): treating the first frame specially provides an anchor point for generation and enables image-to-video tasks.

  4. Dimensionality reduction (Proposition 11): temporal smoothness constrains the latent trajectory to a small region of the full latent space, reducing the effective dimensionality of the generation problem.

Together, these results explain why latent video diffusion works as well as it does. The autoencoder compresses the video into a manageable latent space; the temporal structure of natural video ensures that the latent trajectories are smooth and low-dimensional; and the diffusion model exploits this structure to generate coherent video by tracing plausible curves through the latent space.

In File C, we build on this foundation to develop the architectures and training procedures for the diffusion model itself. The Diffusion Transformer (DiT) architecture (Video Diffusion Transformer (DiT)) will be designed to process spatiotemporal latent tensors, with temporal attention layers that exploit the smoothness properties established here. The conditioning mechanisms (Conditioning Mechanisms) will leverage the first-frame conditioning framework to enable text-to-video and image-to-video generation. The training recipes (Training at Scale) will use progressive strategies that align with the coarse-to-fine spectral structure of the latent space.

Video Diffusion Transformer (DiT)

The latent video diffusion framework developed in the preceding sections requires a neural network backbone that can process spatiotemporal latent tensors 𝖹F×H×W×C and predict either the noise 𝝐, the clean data 𝖹0, or the velocity field 𝒗t at each denoising step. Early video diffusion models inherited the U-Net architecture from image diffusion, inflating 2D convolutions to 3D and inserting temporal attention layers between spatial blocks. While functional, this approach suffers from several limitations: the U-Net's hierarchical structure complicates scaling, the interleaving of convolution and attention creates architectural heterogeneity, and the inductive biases of convolution (locality, translation equivariance) may be unnecessarily restrictive for a model that already operates in a compressed latent space.

The Diffusion Transformer (DiT), introduced by Peebles and Xie [9] for images and subsequently extended to video by multiple groups, replaces the U-Net entirely with a plain transformer. The key insight is that, after latent compression, the effective resolution is small enough that a transformer operating on patch tokens can match or exceed U-Net performance while offering superior scaling behaviour.

In this section, we develop the DiT architecture for video from first principles. We begin with the spatiotemporal patchification that converts a latent tensor into a token sequence, then describe the adaptive layer normalisation mechanism that conditions the transformer on the diffusion timestep, and finally compare the scaling properties of DiT and U-Net architectures.

Spatiotemporal Patchification

The first step in processing a latent video tensor with a transformer is to convert the 3D grid of latent values into a 1D sequence of tokens. This is accomplished by dividing the tensor into non-overlapping 3D patches and projecting each patch to a token vector.

Definition 24 (Spatiotemporal Patchification).

Let 𝖹F×H×W×C be a latent video tensor. Choose patch sizes pt,ph,pw>0 along the temporal, height, and width axes, respectively. The spatiotemporal patchification operator 𝒫 divides 𝖹 into non-overlapping 3D patches of size pt×ph×pw×C and flattens each patch into a vector: (Patchify)𝒫(𝖹)=(𝒑1,𝒑2,,𝒑N),𝒑iptphpwC, where the number of tokens is (NUM Tokens)N=FptHphWpw=NtNhNw. Each patch vector 𝒑i is then projected to the model's hidden dimension d via a learnable linear map 𝑬d×(ptphpwC): (Patch Embed)𝒉i(0)=𝑬𝒑i+𝒆ipos,i=1,,N, where 𝒆iposd is a positional embedding encoding the 3D location of patch i (see 3D Positional Encoding).

The patchification process is illustrated in fig:vdiff:patchify. Note the analogy with the Vision Transformer (ViT): just as ViT converts a 2D image into a sequence of 2D patch tokens, the video DiT converts a 3D latent tensor into a sequence of 3D patch tokens. The critical difference is that each patch spans multiple frames, so the initial token embedding already captures local spatiotemporal structure.

Spatiotemporal patchification. The latent video tensor 𝖹F×H×W×C is divided into non-overlapping 3D patches of size pt×ph×pw. Each patch is flattened and linearly projected to a d-dimensional token embedding. A positional encoding is added to each token to preserve the 3D spatial and temporal structure. The highlighted region (amber) shows a single 3D patch spanning multiple frames and spatial locations.

Example 22 (Token count for a typical video DiT).

Consider a latent tensor of shape 𝖹21×60×90×16, obtained from a 4× temporal and 8×8 spatial compression of a 84-frame, 480×720 video. With patch sizes pt=1, ph=2, pw=2, the number of tokens is N=211602902=21×30×45=28,350. Each patch vector has dimension ptphpwC=1×2×2×16=64. With a hidden dimension of d=3072, the patch embedding matrix has 3072×64=196,608 parameters.

With larger patch sizes pt=3, ph=2, pw=2, the token count drops to N=7×30×45=9,450, a 3× reduction at the cost of coarser temporal granularity in the initial embedding.

Remark 30.

The choice of patch sizes (pt,ph,pw) involves a fundamental trade-off. Larger patches reduce the token count N and hence the quadratic attention cost O(N2d), but each token covers a larger spatiotemporal region, reducing the model's ability to capture fine-grained details. In practice, the temporal patch size pt is the most impactful parameter because it directly controls the temporal resolution of the token sequence. Most contemporary video DiT models use pt{1,2} to preserve temporal detail, while using moderate spatial patches ph=pw{1,2}.

Proposition 12 (Patchification as strided convolution).

The spatiotemporal patchification operation of Definition 24 is equivalent to a 3D convolution with kernel size (pt,ph,pw), stride (pt,ph,pw), and d output channels, applied to the latent tensor 𝖹: (Patch AS CONV)𝑯(0)=Conv3Dpt,ph,pw(𝖹)Nt×Nh×Nw×d, where the convolution weight tensor 𝖶d×C×pt×ph×pw encodes the same linear map as the embedding matrix 𝑬.

Proof.

The convolution output at spatial position (nt,nh,nw) is 𝑯nt,nh,nw(0)=c=1Cτ=0pt1i=0ph1j=0pw1𝖶:,c,τ,i,j𝖹ntpt+τ,nhph+i,nwpw+j,c. This is exactly the inner product of the weight tensor (reshaped as a matrix of size d×ptphpwC) with the flattened patch at position (nt,nh,nw), which is the definition of the patch embedding 𝒉i(0)=𝑬𝒑i. The stride ensures non-overlapping coverage.

The DiT Block with Adaptive Layer Normalisation

After patchification, the token sequence (𝒉1(0),,𝒉N(0)) is processed by a stack of L transformer blocks. Each block follows the standard pre-normalisation transformer design (LayerNorm, Attention, LayerNorm, MLP), but with a critical modification: the layer normalisation is adaptive, conditioned on the diffusion timestep t and optionally on other global conditioning signals.

Definition 25 (Adaptive Layer Normalisation (adaLN)).

Let 𝒉d be a hidden representation, and let t[0,1] be the diffusion timestep. The adaptive layer normalisation (adaLN) is defined as (Adaln)adaLN(𝒉,t)=𝜸t𝒉μ(𝒉)σ(𝒉)+𝜷t, where μ(𝒉)=1dj=1dhj and σ(𝒉)=1dj=1d(hjμ(𝒉))2+ϵ are the mean and standard deviation computed over the feature dimension, ϵ>0 is a small constant for numerical stability, and the adaptive scale and shift parameters 𝜸t,𝜷td are predicted from the timestep embedding: (Adaln Params)(𝜸t,𝜷t)=MLP(emb(t)), where emb(t)demb is a sinusoidal or learnable timestep embedding and the MLP:demb2d predicts both parameters jointly.

Key Idea.

Timestep conditioning via normalisation. In a diffusion model, the network must behave differently at different noise levels: at high noise (t1), the model must make coarse, global predictions; at low noise (t0), it must refine fine details. AdaLN provides a lightweight mechanism for this adaptation by modulating the feature statistics at every layer. Rather than concatenating the timestep as an extra input token (which would require the attention mechanism to learn how to extract this information), adaLN directly controls the scale and shift of every feature channel, enabling the network to smoothly interpolate between different “operating modes” as a function of t.

The full DiT block combines adaLN with multi-head self-attention (MHSA) and a position-wise feed-forward network (FFN), using the adaLN-Zero initialisation strategy.

Definition 26 (DiT Block with adaLN-Zero).

Let 𝑯()=(𝒉1(),,𝒉N()) denote the token representations at layer . The DiT block at layer computes (DIT ATTN)𝑯^()=𝑯()+𝜶t(,1)MHSA(adaLN(𝑯(),t;𝜸t(,1),𝜷t(,1))),𝑯(+1)=𝑯^()+𝜶t(,2)FFN(adaLN(𝑯^(),t;𝜸t(,2),𝜷t(,2))), where 𝜶t(,1),𝜶t(,2)d are gating parameters predicted from the timestep embedding alongside 𝜸t and 𝜷t: (Adaln ZERO Params)(𝜸t(,1),𝜷t(,1),𝜶t(,1),𝜸t(,2),𝜷t(,2),𝜶t(,2))=MLP(emb(t))6d. The adaLN-Zero initialisation sets the final linear layer of each MLP to zero at the start of training, so that 𝜶t(,)=0 initially. This causes the DiT block to act as the identity function 𝑯(+1)=𝑯() before any learning occurs.

Insight.

Why zero initialisation helps. At initialisation, the residual branches contribute nothing, so the forward pass is simply a chain of identity mappings. This has two benefits. First, gradients flow freely through the network from the start of training, avoiding the vanishing gradient problems that can afflict deep transformers. Second, the model begins by “doing nothing” and gradually learns to apply increasingly complex transformations, which provides a natural form of curriculum learning. This is particularly important for video DiT models, which often have L=28 to 40 layers and would otherwise be difficult to train.

Architecture of a single DiT block with adaLN-Zero conditioning. The timestep embedding emb(t) is passed through an MLP to produce adaptive scale (𝜸t), shift (𝜷t), and gating (𝜶t) parameters. The gating parameters multiply the outputs of the attention and FFN branches before the residual addition. At initialisation, all gating parameters are zero, so the block acts as the identity.

Mathematical Analysis of adaLN

To understand why adaLN is an effective conditioning mechanism, we analyse its effect on the feature distribution at each layer.

Lemma 3 (adaLN as affine feature modulation).

Let 𝒉d be a feature vector with mean μ and standard deviation σ across its components. Then adaLN(𝒉,t) produces a vector with mean βt=1dj(βt)j and variance (Adaln VAR)𝖵ar[adaLN(𝒉,t)]=1dj=1d(γt)j2+𝖵ar[𝜷t], where the variance is taken over the feature dimensions. In particular, the output statistics are fully controlled by (𝜸t,𝜷t), independently of the input statistics (μ,σ).

Proof.

After standard layer normalisation, the normalised vector 𝒉~=(𝒉μ1)/σ has zero mean and unit variance across dimensions. The adaLN output is 𝜸t𝒉~+𝜷t. Its mean is 1dj(γt)jh~j+(βt)j. Since 1djh~j=0, the cross-term vanishes in expectation. The variance computation follows from the independence of the normalised features and the element-wise scaling.

Theorem 4 (Expressiveness of adaLN conditioning).

Let fθ:dd be any continuously differentiable function, and let LN:dd denote standard layer normalisation. For any 𝒉d with σ(𝒉)>0, there exist 𝜸,𝜷d such that (Adaln Universal)𝜸LN(𝒉)+𝜷=fθ(𝒉), if and only if fθ(𝒉) can be written as an element-wise affine function of LN(𝒉). More generally, by allowing (𝜸,𝜷) to vary with the input 𝒉 (as in the full adaLN mechanism), the family of achievable transformations includes all element-wise monotone maps.

Proof.

The “if” direction is immediate: if fθ(𝒉)=𝒂LN(𝒉)+𝒃, set 𝜸=𝒂 and 𝜷=𝒃. For the “only if” direction, note that 𝜸LN(𝒉)+𝜷 acts independently on each component j: [𝜸LN(𝒉)]j=γjLN(𝒉)j, which is affine in LN(𝒉)j. The second statement follows because when γj and βj are themselves functions of 𝒉 (predicted by the MLP), each output component is an arbitrary function of LN(𝒉)j.

Comparison with U-Net Architectures

The shift from U-Net to DiT for video diffusion is not merely an architectural preference; it reflects fundamental differences in how the two architectures scale with model size and data.

Remark 31 (Structural differences).

The U-Net architecture consists of an encoder path that progressively downsamples the spatial resolution, a bottleneck, and a decoder path that upsamples with skip connections from the encoder. Each level operates at a different resolution, and the skip connections enable fine-grained spatial detail to bypass the bottleneck. The DiT, by contrast, operates at a single resolution throughout (the patch token resolution) and relies on self-attention to capture both local and global dependencies.

Proposition 13 (Parameter scaling comparison).

Consider a U-Net with LU levels, base channels C0 (doubling at each level), and B residual blocks per level. The total parameter count scales as (UNET Params)ΘU-Net=O(BC02=0LU14)=O(BC024LU13), which grows exponentially with depth. A DiT with L blocks, hidden dimension d, and h attention heads has parameter count (DIT Params)ΘDiT=O(L(4d2+ddffn))=O(Ld2), which grows linearly in depth and quadratically in width. The DiT offers a more predictable and controllable scaling behaviour.

Proof.

For the U-Net, at level the channel count is 2C0. Each residual block contains two convolutions of size (2C0)2k3 (for kernel size k), giving per-level cost O(B4C02). Summing over levels yields the geometric series. For the DiT, each block has: (i) QKV projections costing 3d2, (ii) output projection d2, (iii) FFN with two layers ddffn+dffnd, where typically dffn=4d. Total per block is 4d2+8d2=12d2, giving O(Ld2) overall.

Example 23 (Scaling comparison in practice).

tab:vdiff:dit-unet compares representative configurations. The DiT achieves comparable or superior performance with more predictable compute-performance trade-offs.

tableComparison of U-Net and DiT architectures at similar parameter counts. GFLOPs are computed per denoising step for a 16×32×32×4 latent tensor.

ArchitectureParamsGFLOPsDepthWidth
U-Net-S (3 levels, C0=128)400M853128–512
U-Net-L (4 levels, C0=192)1.2B3104192–1536
DiT-B (L=12, d=768)130M4212768
DiT-L (L=24, d=1024)460M145241024
DiT-XL (L=28, d=1152)675M220281152
DiT-G (L=40, d=1536)1.8B620401536

Historical Note.

The Diffusion Transformer was introduced by Peebles and Xie [9] in 2023 for class-conditional image generation. Their key contribution was showing that, contrary to prevailing wisdom, a plain transformer without convolutional components could outperform U-Net architectures when properly scaled. The adaLN-Zero conditioning mechanism was inspired by film [21] (Feature-wise Linear Modulation) and earlier work on conditional normalisation in GANs. The extension to video was pursued independently by several groups, most notably in Open-Sora [22], Latte [23], and the architecture underlying Sora [6]. The U-ViT architecture of Bao et al. [24] explored a related but distinct design that adds skip connections between transformer layers, creating a U-Net-like structure within a transformer.

Exercise 13.

Consider a video DiT with L=28 layers, hidden dimension d=1152, h=16 attention heads, and FFN hidden dimension dffn=4×1152=4608. The input latent tensor has shape 17×48×72×16 with patch sizes pt=1, ph=2, pw=2.

  1. Compute the number of tokens N.

  2. Compute the total number of parameters (ignoring the timestep embedding MLP).

  3. Estimate the FLOPs for the self-attention operation in a single layer (both the 𝑸𝑲𝖳 product and the attention-weighted value computation).

  4. How does the total attention FLOP count compare to the FFN FLOP count?

Exercise 14.

Consider the adaLN-Zero initialisation from Definition 26.

  1. Show that when 𝜶t=0 for all layers, the full L-layer DiT computes 𝑯(L)=𝑯(0).

  2. Compute the Jacobian 𝑯(L)/𝑯(0) at initialisation and verify it is the identity.

  3. Explain why this property facilitates gradient flow during the early stages of training.

  4. Compare with the standard Xavier/He initialisation: what happens to gradient norms in a 40-layer transformer without adaLN-Zero?

Factored Attention for Video

The self-attention mechanism is both the greatest strength and the primary computational bottleneck of the video Diffusion Transformer. Given a token sequence of length N, standard multi-head self-attention has time and memory complexity O(N2d) and O(N2h), respectively, where d is the hidden dimension and h is the number of heads. For video, the token count N=NtNhNw is the product of temporal, height, and width dimensions, which can easily reach tens of thousands. Full spatiotemporal attention over all tokens is often computationally prohibitive, motivating the development of factored attention strategies that decompose the joint spatiotemporal attention into smaller, more manageable operations.

In this section, we analyse the computational cost of full spatiotemporal attention, develop the mathematical framework for factored attention, prove approximation bounds, and describe practical variants including joint attention and windowed attention.

Full Spatiotemporal Attention

We begin by quantifying the cost of the naive approach: computing attention over all video tokens simultaneously.

Definition 27 (Full Spatiotemporal Attention).

Let 𝑯N×d be the matrix of N=NtNhNw token representations, where each token corresponds to a spatiotemporal position (nt,nh,nw). The full spatiotemporal attention computes (FULL ST ATTN)Attnfull(𝑯)=softmax(𝑸𝑲𝖳dk)𝑽, where 𝑸=𝑯𝑾Q, 𝑲=𝑯𝑾K, 𝑽=𝑯𝑾VN×dk are the query, key, and value projections, and dk=d/h is the per-head dimension.

Proposition 14 (Cost of full spatiotemporal attention).

The computational cost of full spatiotemporal attention for a single head on N=NtNhNw tokens with per-head dimension dk is:

  1. QKV projections: O(Nddk) FLOPs.

  2. Attention matrix: O(N2dk) FLOPs to compute 𝑸𝑲𝖳.

  3. Softmax: O(N2) FLOPs.

  4. Value aggregation: O(N2dk) FLOPs to compute the weighted sum.

  5. Memory: O(N2) to store the attention matrix (or O(N) with FlashAttention, at the cost of recomputation).

The dominant cost is the O(N2dk)=O(Nt2Nh2Nw2dk) term from the attention matrix computation.

Example 24 (Infeasibility of full attention for video).

For the latent tensor from Example 22 with N=28,350 tokens and dk=72 (from d=1152 with h=16 heads), the attention matrix has 28,35028.0×108 entries. In FP16, storing this matrix requires approximately 1.5 GB per head, or 24 GB for all 16 heads. The FLOPs for a single attention layer exceed 1011, making full attention impractical for real-time or even batch training at this scale.

By contrast, with the reduced token count N=9,450 (using pt=3), the attention matrix has 8.9×107 entries, roughly a 9× reduction, but still requiring careful memory management.

Caution.

Full spatiotemporal attention has O(Nt2Nh2Nw2) complexity, which grows as the sixth power of the spatiotemporal resolution (since NtF, NhH, NwW). This scaling is fundamentally incompatible with the goal of generating high-resolution, long-duration video. Even with FlashAttention reducing the memory from O(N2) to O(N), the FLOPs remain quadratic and become the dominant bottleneck for sequences beyond a few thousand tokens.

Spatial-Then-Temporal Factorisation

The key observation that enables efficient video attention is that the spatiotemporal token grid has inherent structure: tokens at the same spatial location across different frames are temporally related, while tokens within the same frame are spatially related. Factored attention exploits this structure by decomposing the joint attention into separate spatial and temporal operations.

Definition 28 (Spatial-Then-Temporal Factored Attention).

Let 𝑯Nt×NhNw×d be the token representations, reshaped so that the first axis indexes time and the second indexes spatial position. The spatial-then-temporal factored attention computes:

Step 1 (Spatial attention): For each temporal index nt=1,,Nt, compute self-attention over the Ns=NhNw spatial tokens within frame nt: (Spatial ATTN)𝑯^nt=softmax(𝑸nt𝑲nt𝖳dk)𝑽nt,nt=1,,Nt, where 𝑸nt,𝑲nt,𝑽ntNs×dk are the query, key, and value matrices for frame nt.

Step 2 (Temporal attention): For each spatial index ns=1,,Ns, compute self-attention over the Nt temporal tokens at position ns: (Temporal ATTN)𝑯~ns=softmax(𝑸ns𝑲ns𝖳dk)𝑽ns,ns=1,,Ns, where 𝑸ns,𝑲ns,𝑽nsNt×dk are projections of the spatially-attended tokens 𝑯^ at spatial position ns across all frames.

Proposition 15 (Cost of factored attention).

The computational cost of spatial-then-temporal factored attention is:

  1. Spatial attention: Nt independent attention operations, each over Ns=NhNw tokens, costing O(NtNs2dk)=O(NtNh2Nw2dk) in total.

  2. Temporal attention: Ns independent attention operations, each over Nt tokens, costing O(NsNt2dk)=O(NhNwNt2dk) in total.

  3. Total: (Factored Total COST)𝒞factored=O(NtNh2Nw2dk+NhNwNt2dk).

Proof.

Each spatial attention for a single frame processes Ns tokens with an Ns×Ns attention matrix, requiring O(Ns2dk) FLOPs. There are Nt frames, giving O(NtNs2dk). Similarly, each temporal attention at a single spatial position processes Nt tokens, requiring O(Nt2dk), and there are Ns positions, giving O(NsNt2dk). The total is the sum.

Example 25 (Speedup from factorisation).

Using the token counts from Example 22: Nt=21, Nh=30, Nw=45, so Ns=1350 and N=28,350.

Full attention cost (ignoring dk): N2=28,35028.04×108.

Factored attention cost: NtNs2+NsNt2=21×13502+1350×212=38.27×106+0.60×1063.89×107.

The speedup factor is approximately 8.04×108/3.89×10720.7×. For longer videos with Nt=65, the speedup exceeds 60×.

The factored attention achieves dramatic computational savings, but at a potential cost: information can only flow between spatially distant positions in different frames indirectly, through the composition of spatial and temporal attention. The following theorem quantifies the error introduced by this factorisation.

Theorem 5 (Factored Attention Approximation Bound).

Let 𝑨full=softmax(𝑸𝑲𝖳/dk)N×N be the full spatiotemporal attention matrix, and let 𝑨fact=𝑨temp𝑨spat be the product of the temporal and spatial attention matrices (appropriately lifted to N×N). Assume that the query and key vectors satisfy 𝒒i,𝒌jB for all i,j. Then (Factored Approx Bound)𝑨full𝑨factFNB2dk(1+δcross), where δcross0 measures the magnitude of the cross-spatiotemporal attention entries, defined as (Cross TERM)δcross=max(i,j)𝒮cross|𝒒i,𝒌j|dk, with 𝒮cross being the set of token pairs (i,j) that differ in both spatial and temporal position. When the cross terms are small (δcross1), the factored attention closely approximates the full attention.

Proof.

Write the full attention logits as 𝑳=𝑸𝑲𝖳/dkN×N. Partition the logit matrix into blocks: 𝑳=𝑳spat+𝑳temp+𝑳cross, where 𝑳spat contains entries for token pairs in the same frame, 𝑳temp contains entries for pairs at the same spatial position, and 𝑳cross contains the remaining cross terms.

The factored attention implicitly zeros out 𝑳cross and factorises the remaining terms. The Frobenius norm of the difference is bounded by the softmax Lipschitz constant (which is at most 1 in each row) times the norm of the perturbation 𝑳cross.

Since each entry of 𝑳cross is bounded by B2/dk (by Cauchy-Schwarz), and there are at most N2 entries, we obtain 𝑳crossFNB2/dk. The factor (1+δcross) accounts for the interaction between the softmax normalisation and the cross terms: when δcross is small, the softmax denominators are negligibly affected by dropping the cross terms.

Remark 32.

In practice, the cross-term magnitude δcross is small for natural video because tokens that are far apart in both space and time tend to have low semantic relevance to each other. A patch showing the sky in frame 1 has little direct interaction with a patch showing the ground in frame 20. This natural locality of video semantics is what makes factored attention effective: it discards precisely the interactions that contribute least to the output.

Alternating Block Design

In practice, factored attention is implemented by alternating between spatial attention blocks and temporal attention blocks. Each block is a full DiT block (Definition 26) with the attention restricted to a subset of tokens.

Definition 29 (Alternating Spatial-Temporal Transformer).

An alternating spatial-temporal transformer with L total layers consists of L/2 spatial layers interleaved with L/2 temporal layers (assuming L is even): (Alternating)𝑯(+1)={DiTspat()(𝑯(),t)if  is even,DiTtemp()(𝑯(),t)if  is odd, where DiTspat() performs attention only within each frame (over Ns=NhNw tokens) and DiTtemp() performs attention only across frames at each spatial position (over Nt tokens). Both types of block include their own adaLN conditioning, attention, and FFN sub-layers.

Alternating spatial-temporal transformer architecture. Spatial attention blocks (blue) process tokens within each frame independently. Temporal attention blocks (green) process tokens across frames at each spatial position. By alternating these two types of blocks, information gradually propagates across both space and time.

Lemma 4 (Information propagation in alternating attention).

In an alternating spatial-temporal transformer with L layers (L/2 spatial, L/2 temporal), a token at position (ntA,nhA,nwA) can influence a token at position (ntB,nhB,nwB) through a path of length at most 2 layers: one spatial layer followed by one temporal layer (or vice versa). More precisely, after k spatial-temporal pairs, the effective receptive field covers all tokens within temporal distance k and spatial distance k (in the attention graph sense). After L/2 pairs, all tokens can interact with all other tokens.

Proof.

Consider two tokens A=(ntA,nsA) and B=(ntB,nsB) where ns denotes the flattened spatial index. In a spatial attention layer, A can communicate with any token C=(ntA,nsC) sharing the same frame. In the subsequent temporal attention layer, C can communicate with D=(ntB,nsC) sharing the same spatial position. If nsC=nsB, then D=B and information has flowed from A to B in two layers. If nsCnsB, one additional spatial layer allows D to communicate with B. Thus, any pair of tokens can exchange information in at most 3 layers, and after L/2 spatial-temporal pairs all tokens are fully connected in the computational graph.

Joint Attention with Text Tokens

An important variant of factored attention, used in models such as CogVideoX [17], interleaves text tokens with video tokens in the attention computation rather than relegating text to a separate cross-attention mechanism.

Definition 30 (Joint Video-Text Attention).

Let 𝑯vNv×d be the video token representations and 𝑯cNc×d be the text token representations (obtained from a text encoder). The joint attention operates on the concatenated sequence: (Joint Concat)𝑯joint=[𝑯c;𝑯v](Nc+Nv)×d. Self-attention is computed over this combined sequence: (Joint ATTN)Attnjoint(𝑯joint)=softmax(𝑸joint𝑲joint𝖳dk)𝑽joint, where queries, keys, and values are computed from the full concatenated sequence. After attention, the text and video representations are separated and processed by their respective FFN layers.

Remark 33.

Joint attention differs from cross-attention in that text tokens can attend to video tokens (and vice versa), and text tokens can attend to each other. This bidirectional information flow allows the text representation to be refined based on the current state of the video generation, enabling more nuanced text-video alignment. In cross-attention, by contrast, the text representation is fixed and only influences the video tokens, with no feedback path. The trade-off is computational: joint attention with Nc+Nv tokens costs O((Nc+Nv)2dk), while separate cross-attention costs O(NvNcdk). When NcNv (typical: Nc200 while Nv10,000), the overhead of joint attention is modest because (Nc+Nv)2Nv2+2NvNc.

Proposition 16 (Effective conditioning strength).

In joint attention, the influence of text token j on video token i at layer is given by the attention weight (Joint Weight)aij()=exp(𝒒i(),𝒌j()/dk)m=1Nc+Nvexp(𝒒i(),𝒌m()/dk). The total text influence on video token i is αi()=j=1Ncaij(), and the output is (Joint Decompose)Attn(𝒒i)=αij=1Ncaijαi𝒗j+(1αi)m=Nc+1Nc+Nvaim1αi𝒗m, which is a convex combination of a text-conditioned component and a video self-attention component, with mixing coefficient αi that is learned end-to-end.

Proof.

The attention weights aij sum to 1 over all Nc+Nv tokens by the softmax normalisation. Partitioning the sum into text indices {1,,Nc} and video indices {Nc+1,,Nc+Nv} gives the decomposition directly. The conditional distributions aij/αi and aim/(1αi) are valid probability distributions over text and video tokens, respectively.

3D Window Attention

A complementary approach to factored attention is to restrict attention to local 3D windows, analogous to the Swin Transformer for images.

Definition 31 (3D Window Attention).

Partition the token grid of shape Nt×Nh×Nw into non-overlapping 3D windows of size wt×wh×ww. Within each window, compute standard self-attention over the wtwhww tokens: (Window ATTN)Attnwin(𝑯window)=softmax(𝑸w𝑲w𝖳dk+𝑩rel)𝑽w, where 𝑩relwtwhww×wtwhww is a learnable relative position bias. The total cost is (Window COST)𝒞window=O(Nwtwhww(wtwhww)2dk)=O(Nwtwhwwdk), which is linear in the total token count N.

Definition 32 (Shifted 3D Window Attention).

To enable cross-window communication, alternate between regular and shifted window partitions: (Shifted Window)Shifted window offset:(wt/2,wh/2,ww/2). In the shifted configuration, each window overlaps with portions of 23=8 windows from the regular partition (in general, up to (2)3 neighbouring windows when all three shifts are non-zero). A masking mechanism ensures that tokens from different logical regions do not attend to each other within boundary windows, preserving the local attention structure while enabling cross-boundary information flow.

Proposition 17 (Receptive field growth with shifted windows).

After k layers of alternating regular and shifted 3D window attention, the effective receptive field of each token spans (Shifted RF)(wt+kwt/2)×(wh+kwh/2)×(ww+kww/2) tokens. For a 28-layer network with window size (wt,wh,ww)=(4,8,8), the receptive field reaches (4+14×2)×(8+14×4)×(8+14×4)=32×64×64 after 14 pairs, which exceeds typical token grid sizes.

Proof.

At each shifted window layer, the window boundary shifts by (wt/2,wh/2,ww/2). A token at the edge of its current window can now attend to tokens that were in the adjacent window in the previous layer, extending its receptive field by the shift amount in each direction. After k such shifts, the total extension is k times the shift in each dimension, added to the initial window size.

Exercise 15.

Consider a video DiT with Nt=33, Nh=40, Nw=60 tokens and per-head dimension dk=64.

  1. Compute the FLOPs for full spatiotemporal attention (single head, single layer).

  2. Compute the FLOPs for spatial-then-temporal factored attention.

  3. Compute the FLOPs for 3D window attention with (wt,wh,ww)=(3,8,8).

  4. Rank the three approaches by FLOP count and discuss the quality-efficiency trade-off.

Exercise 16.

A video DiT uses joint attention with Nv=12,000 video tokens and Nc=256 text tokens, with hidden dimension d=1024 and h=16 heads.

  1. Compute the attention matrix size for joint attention vs. separate self-attention plus cross-attention.

  2. What fraction of the joint attention FLOPs are “wasted” on text-to-text attention?

  3. At what Nc/Nv ratio does the overhead of joint attention exceed 10%?

  4. Argue that the text self-attention in joint attention is not truly “wasted” because it enables text refinement conditioned on video state.

3D Positional Encoding

Transformers are permutation-equivariant by design: without positional information, a transformer cannot distinguish between a token representing the top-left corner of frame 1 and a token representing the bottom-right corner of frame 50. For video generation, positional encoding is not merely a technical detail; it is the mechanism by which the model understands the fundamental distinction between spatial and temporal relationships.

In this section, we develop three approaches to 3D positional encoding: the direct extension of sinusoidal encodings to three axes, Rotary Position Embeddings (RoPE) adapted to 3D grids, and learnable positional embeddings. We analyse the extrapolation properties of each approach and discuss their implications for generating videos at resolutions and durations not seen during training.

Why Position Matters for Video

To appreciate the importance of positional encoding, consider what a video DiT would produce without it.

Key Idea.

Without positional encoding, the transformer sees an unordered bag of patches. Consider a video of a ball moving from left to right. After patchification, two patches that are spatially adjacent in frame 5 are indistinguishable (from the transformer's perspective) from two patches that are temporally adjacent at the same spatial location in frames 5 and 6. The model cannot determine whether two tokens are neighbours in space or in time, whether one token comes before or after another in the video, or whether two similar-looking patches are at the beginning or end of the clip. Positional encoding resolves all of these ambiguities by injecting explicit location information into each token.

Formally, each token in the video DiT corresponds to a 3D grid position (nt,nh,nw) where nt{0,,Nt1}, nh{0,,Nh1}, and nw{0,,Nw1}. The positional encoding must map this triple to a d-dimensional vector (or a modification of the attention computation) that enables the transformer to reason about spatiotemporal relationships.

Definition 33 (3D Positional Encoding).

A 3D positional encoding is a function (3D PE General)PE3D:{0,,Nt1}×{0,,Nh1}×{0,,Nw1}d, that assigns a unique d-dimensional vector to each grid position. The encoding is additive if it is summed with the patch embedding: 𝒉i(0)=𝑬𝒑i+PE3D(nti,nhi,nwi), and rotary if it modifies the attention computation via rotation matrices (see 3D Rotary Position Embeddings (RoPE)).

3D Sinusoidal Positional Encoding

The simplest approach extends the classical 1D sinusoidal encoding of Vaswani et al. to three independent axes.

Definition 34 (3D Sinusoidal Positional Encoding).

Partition the embedding dimension d into three groups of sizes dt, dh, dw with dt+dh+dw=d. For each axis, define the 1D sinusoidal encoding as (SIN 1D)PEsin(n,2k)=sin(nT2k/daxis),PEsin(n,2k+1)=cos(nT2k/daxis), where T>0 is a temperature parameter (typically T=10,000), daxis is the dimension allocated to that axis, and k=0,1,,daxis/21. The 3D sinusoidal encoding is the concatenation: (3D SIN)PE3Dsin(nt,nh,nw)=[PEsin(t)(nt);PEsin(h)(nh);PEsin(w)(nw)]d, where [;;] denotes concatenation.

Proposition 18 (Inner product structure of 3D sinusoidal PE).

The inner product between two 3D sinusoidal positional encodings decomposes as (SIN IP)PE3Dsin(nt,nh,nw),PE3Dsin(nt,nh,nw)=St(Δnt)+Sh(Δnh)+Sw(Δnw), where Δnt=ntnt, Δnh=nhnh, Δnw=nwnw, and each function S depends only on the relative displacement along its axis: (SIN Kernel)Saxis(Δn)=k=0daxis/21cos(ΔnT2k/daxis). In particular, the inner product is translation-invariant along each axis: it depends only on relative displacements, not absolute positions.

Proof.

By the product-to-sum identity, for each frequency k, sin(nT2k/d)sin(nT2k/d)+cos(nT2k/d)cos(nT2k/d)=cos(nnT2k/d). Summing over all frequencies and all three axes gives the decomposition. Translation invariance follows because each Saxis depends on Δn only.

Remark 34.

The additive decomposition St+Sh+Sw means that the sinusoidal encoding cannot capture interactions between spatial and temporal positions. For example, the encoding cannot distinguish between “same spatial position, different frame” and “different spatial position, same frame” when the respective S values happen to coincide. This limitation motivates the use of more expressive encodings such as RoPE.

3D Rotary Position Embeddings (RoPE)

Rotary Position Embeddings (RoPE), introduced by Su et al. [65], encode positional information by rotating query and key vectors in the attention computation. The 3D extension applies independent rotations for each spatial and temporal axis.

Definition 35 (1D Rotary Position Embedding).

Given a vector 𝒙dk and position n, the Rotary Position Embedding applies a block-diagonal rotation matrix: (ROPE 1D)RoPE(𝒙,n)=𝑹(n)𝒙, where 𝑹(n)dk×dk is block-diagonal with dk/2 rotation blocks: (ROPE Block)𝑹(n)=k=0dk/21(cos(nθk)sin(nθk)sin(nθk)cos(nθk)), with frequency parameters θk=T2k/dk for base temperature T>0.

Lemma 5 (Relative position property of RoPE).

For any positions n,m and vectors 𝒒,𝒌dk, (ROPE Relative)RoPE(𝒒,n),RoPE(𝒌,m)=𝑹(nm)𝒒,𝒌=𝒒,𝑹(mn)𝒌, so the attention logit depends only on the relative position nm.

Proof.

Since each 𝑹(n) is an orthogonal matrix, 𝑹(n)𝖳=𝑹(n). Therefore, 𝑹(n)𝒒,𝑹(m)𝒌=𝒒𝖳𝑹(n)𝖳𝑹(m)𝒌=𝒒𝖳𝑹(n)𝑹(m)𝒌=𝒒𝖳𝑹(mn)𝒌, where the last equality uses the group property 𝑹(a)𝑹(b)=𝑹(a+b).

Definition 36 (3D RoPE for Video).

Partition the per-head dimension dk into three groups of sizes dt, dh, dw with dt+dh+dw=dk. The 3D RoPE for a token at position (nt,nh,nw) applies independent rotations to each group of dimensions: (3D ROPE)RoPE3D(𝒙,nt,nh,nw)=[𝑹t(nt)𝒙[1:dt];𝑹h(nh)𝒙[dt+1:dt+dh];𝑹w(nw)𝒙[dt+dh+1:dk]], where 𝑹t,𝑹h,𝑹w are rotation matrices as in (ROPE Block), potentially with different base temperatures Tt,Th,Tw for each axis.

Theorem 6 (Factored relative position in 3D RoPE).

The attention logit under 3D RoPE decomposes as a sum of per-axis contributions: (3D ROPE Logit)RoPE3D(𝒒,nt,nh,nw),RoPE3D(𝒌,mt,mh,mw)=gt(Δnt;𝒒t,𝒌t)+gh(Δnh;𝒒h,𝒌h)+gw(Δnw;𝒒w,𝒌w), where Δnt=ntmt etc., and each gaxis(Δn;𝒒,𝒌)=𝑹axis(Δn)𝒒,𝒌 depends on the relative displacement along that axis and the content of the query and key vectors in the corresponding dimension group.

Proof.

Since the three groups of dimensions are disjoint, the inner product decomposes as RoPE3D(𝒒,),RoPE3D(𝒌,)=𝑹t(Δnt)𝒒t,𝒌t+𝑹h(Δnh)𝒒h,𝒌h+𝑹w(Δnw)𝒒w,𝒌w, where each term uses Lemma 5 applied to the respective axis.

3D positional encoding for video. Left: the token grid forms a 3D lattice indexed by temporal (t), height (h), and width (w) coordinates. Right: in 3D RoPE, the per-head dimension dk is partitioned into three groups, each receiving independent rotations corresponding to its axis. The attention logit between any two tokens decomposes as a sum of per-axis relative position terms.

Resolution and Length Generalisation

A critical practical question is whether a model trained at one spatiotemporal resolution can generate video at a different resolution or duration without retraining. The positional encoding scheme determines the answer.

Proposition 19 (RoPE extrapolation).

Let a model be trained with temporal positions nt{0,,Nttrain1}. At inference, consider generating with Nttest>Nttrain frames. The rotation matrix 𝑹t(nt) for ntNttrain is well-defined (it is simply a rotation by a larger angle), so the attention computation is mathematically valid. However, the resulting attention logits gt(Δnt) for Δnt>Nttrain involve relative displacements never seen during training, potentially leading to degraded attention patterns.

To mitigate extrapolation failures, several techniques have been proposed.

Definition 37 (NTK-Aware Interpolation for 3D RoPE).

To extend a video model from Nttrain to Nttest>Nttrain temporal frames, rescale the temporal base frequency: (NTK ROPE)Tt=Tt(NttestNttrain)dt/(dt2), which adjusts the rotation frequencies so that the range of rotation angles at inference matches the range seen during training. The spatial frequencies Th,Tw are adjusted analogously when the spatial resolution changes. This ensures that no frequency component rotates by more than the maximum angle encountered during training.

Remark 35.

Learnable positional embeddings assign a distinct vector 𝒆id to each grid position, optimised during training. They can potentially capture complex position-dependent patterns but have two significant drawbacks for video:

  1. No extrapolation: A model trained with Nttrain=17 temporal positions has no embedding for position nt=17 at inference. The model must be retrained or fine-tuned for new resolutions.

  2. Parameter overhead: With NtNhNw distinct positions and d dimensions per position, learnable PE adds Nd parameters, which can be substantial for high-resolution video.

In practice, 3D RoPE has become the dominant choice for video DiT models due to its superior generalisation properties and zero parameter overhead.

Exercise 17.

Consider a video DiT with Nt=17, Nh=32, Nw=32, d=1024, and dk=64 with h=16 heads.

  1. For 3D sinusoidal PE with equal dimension allocation (dt=dh=dw), compute the number of dimensions per axis. Is this sufficient to represent 17 distinct temporal positions?

  2. For 3D RoPE with dt=dh=dw, verify that the number of rotation frequencies per axis is sufficient.

  3. For learnable PE, compute the total number of parameters. Compare this to the total parameters in a single DiT block with d=1024.

  4. A model trained at 17×32×32 is now applied to 33×64×64. Discuss the extrapolation behaviour of each PE type.

Exercise 18.

A video DiT uses 3D RoPE with base temperature Tt=10,000 and dt=24 temporal dimensions. The model was trained with Nttrain=21 frames.

  1. Compute the maximum rotation angle (in radians) seen during training for the lowest frequency component (k=0).

  2. Compute the rotation angle for nt=65 (inference with 65 frames) at the same frequency. By what factor does it exceed the training range?

  3. Apply NTK-aware interpolation (Definition 37) and recompute the angle. Verify that it is now within the training range.

Conditioning Mechanisms

A video diffusion model rarely generates video unconditionally. In practice, generation is guided by text descriptions, reference images, camera parameters, motion maps, or combinations thereof. The conditioning mechanism is the architectural component that injects this external information into the denoising process. Different types of conditioning signals have different characteristics (sequential text, spatial images, scalar timesteps), and each requires a tailored injection pathway.

In this section, we formalise three principal conditioning pathways used in modern video DiT architectures: cross-attention for sequential conditioning (text), adaptive layer normalisation for global conditioning (timestep, noise level), and concatenation for spatial conditioning (reference images, masks). We then analyse how these mechanisms interact and prove an information-theoretic result relating conditioning to entropy reduction.

Three Conditioning Pathways

Definition 38 (Conditioning Pathway Taxonomy).

Let ϵθ(𝖹t,t,𝒄) be a video diffusion model conditioned on signal 𝒄. The three principal pathways for injecting 𝒄 are:

  1. Cross-attention (for sequential signals 𝒄Lc×dc): The conditioning sequence is projected to keys and values, and the video tokens attend to them via cross-attention. Used for: text prompts, audio features.

  2. Adaptive normalisation (for global signals 𝒄dc): The conditioning vector modulates the scale and shift parameters of layer normalisation at every block. Used for: timestep t, noise level σt, global embeddings (resolution, aspect ratio, frame rate).

  3. Concatenation (for spatial signals 𝒄F×H×W×Cc): The conditioning tensor is concatenated with the noisy latent 𝖹t along the channel dimension before patchification. Used for: reference images, inpainting masks, depth maps, optical flow.

Three conditioning pathways in a video DiT block. Cross-attention (orange) injects sequential text conditioning as keys and values. Adaptive normalisation (purple) modulates feature statistics using timestep or global embeddings. Concatenation (green) appends spatial conditioning signals (reference images, masks) to the input before patchification.

Cross-Attention for Text Conditioning

Text conditioning is the most common form of control in video generation. Given a text prompt (e.g., “A cat playing piano in a jazz club”), a pre-trained text encoder produces a sequence of contextual embeddings that guide the denoising process.

Definition 39 (Text Cross-Attention).

Let 𝑯vNv×d be the video token representations and 𝑯c=TextEnc(prompt)Nc×dc be the text encoder output, where Nc is the text sequence length and dc is the text embedding dimension. The text cross-attention computes (Cross ATTN QKV)𝑸v=𝑯v𝑾Q,𝑲c=𝑯c𝑾K,𝑽c=𝑯c𝑾V,CrossAttn(𝑯v,𝑯c)=softmax(𝑸v𝑲c𝖳dk)𝑽c, where 𝑾Qd×dk, 𝑾Kdc×dk, 𝑾Vdc×dv are learnable projection matrices. The queries come from the video tokens, while the keys and values come from the text tokens.

Proposition 20 (Cross-attention as soft dictionary lookup).

The cross-attention output for video token i can be written as (Cross ATTN Lookup)CrossAttn(𝒉iv,𝑯c)=j=1Ncaij𝒗jc,aij=exp(𝒒iv,𝒌jc/dk)m=1Ncexp(𝒒iv,𝒌mc/dk), which is a soft weighted average of the text value vectors {𝒗jc}j=1Nc. The weights aij form a probability distribution over text tokens, with higher weight on tokens whose keys are more aligned with the video query. This can be interpreted as a differentiable dictionary lookup: the video token “asks a question” (its query), and the text tokens “answer” according to their relevance (their key-value pairs).

Proof.

This follows directly from the definition of softmax attention. The weights aij0 and jaij=1 by the softmax normalisation, so the output is a convex combination of value vectors.

Dual Text Encoders

Modern video generation systems typically employ two text encoders with complementary strengths: a language model (such as T5 or LLaMA) that provides rich semantic embeddings, and a contrastive model (such as CLIP) that provides embeddings aligned with visual features.

Definition 40 (Dual Text Encoder Conditioning).

Given a text prompt 𝒄text, two encoders produce (DUAL ENC T5)𝑯sem=T5(𝒄text)Nsem×dsem,𝑯vis=CLIP(𝒄text)Nvis×dvis, where 𝑯sem captures detailed linguistic semantics (entity relationships, attributes, spatial descriptions) and 𝑯vis captures visual-semantic alignment (what the described scene “looks like”).

The two encodings are combined by either:

  1. Concatenation: 𝑯c=[𝑯sem;𝑯vis](Nsem+Nvis)×dc (after projection to a common dimension dc).

  2. Separate cross-attention: Two independent cross-attention layers, one attending to 𝑯sem and another to 𝑯vis, with outputs summed.

  3. Pooled global conditioning: The CLIP [CLS] token embedding 𝒈visdvis is used as a global conditioning signal via adaLN, while the T5 sequence is used for cross-attention.

Remark 36.

The rationale for dual encoders is that each captures different aspects of the text. T5, being an encoder-decoder language model, produces contextualised embeddings that capture complex linguistic structure: negation (“a cat not wearing a hat”), spatial relations (“to the left of”), and temporal sequencing (“first walks, then runs”). CLIP, trained with contrastive image-text pairs, produces embeddings that are well-aligned with visual concepts but less sensitive to linguistic nuance. By combining both, the model accesses complementary information streams.

Example 26 (Conditioning dimensions in practice).

In a model following the Stable Diffusion 3 / CogVideoX design:

  • T5-XXL produces Nsem=256 tokens of dimension dsem=4096.

  • CLIP-L/14 produces Nvis=77 tokens of dimension dvis=768.

  • Both are projected to dc=4096 before concatenation, giving Nc=333 text tokens.

  • With Nv=9,450 video tokens and dk=64 per head, the cross-attention matrix has 9,450×3333.15×106 entries, much smaller than the 9,45028.93×107 entries of self-attention.

Concatenation Conditioning

For conditioning signals that have the same spatiotemporal structure as the video (reference images, masks, depth maps), the simplest injection pathway is channel-wise concatenation before patchification.

Definition 41 (Concatenation Conditioning).

Let 𝖹tF×H×W×C be the noisy latent and 𝖢F×H×W×Cc be the conditioning tensor. The concatenation conditioning forms the augmented input (Concat COND)𝖹taug=[𝖹t;𝖢]channelF×H×W×(C+Cc), where [;]channel denotes concatenation along the channel axis. The patchification layer is modified to accept C+Cc input channels: 𝑬d×ptphpw(C+Cc).

Example 27 (Image-to-video via concatenation).

For image-to-video generation, the reference image is encoded by the video autoencoder's image encoder to obtain 𝒛refH×W×C. This is replicated F times along the temporal axis and concatenated with the noisy latent: (IMG TO Video Concat)𝖢=1F𝒛refF×H×W×C, doubling the input channels to 2C. A binary mask 𝒎{0,1}F indicating which frames are conditioned (typically only frame 0) is also provided, either as an additional channel or through the timestep embedding.

Remark 37.

Concatenation conditioning is the most flexible pathway because it preserves the full spatial structure of the conditioning signal. It is particularly effective for tasks requiring pixel-level alignment between the conditioning signal and the generated video, such as video inpainting, super-resolution, and depth-conditioned generation. The trade-off is that it increases the per-patch dimension (and hence the embedding matrix size) and requires the conditioning signal to be available at the same spatial resolution as the latent tensor.

Conditioning as Entropy Reduction

We now provide an information-theoretic perspective on conditioning, showing that each conditioning signal reduces the entropy of the generation distribution in a quantifiable way.

Theorem 7 (Conditioning as Entropy Reduction).

Let 𝖹0 denote the clean latent video and 𝒄 a conditioning signal. Then (Entropy Reduction)𝖧(𝖹0|𝒄)𝖧(𝖹0), with equality if and only if 𝖹0 and 𝒄 are independent. The entropy reduction is exactly the mutual information: (Mutual INFO)𝖧(𝖹0)𝖧(𝖹0|𝒄)=𝖨(𝖹0;𝒄)0. For multiple conditioning signals 𝒄=(𝒄text,𝒄img,𝒄cam), the chain rule gives (Chain RULE Entropy)𝖨(𝖹0;𝒄)=𝖨(𝖹0;𝒄text)+𝖨(𝖹0;𝒄img|𝒄text)+𝖨(𝖹0;𝒄cam|𝒄text,𝒄img), where each term represents the additional information provided by each signal beyond what was already known.

Proof.

The inequality 𝖧(𝖹0|𝒄)𝖧(𝖹0) is a fundamental property of Shannon entropy (conditioning reduces entropy). The equality 𝖧(𝖹0)𝖧(𝖹0|𝒄)=𝖨(𝖹0;𝒄) is the definition of mutual information. Non-negativity 𝖨(𝖹0;𝒄)0 follows from the Gibbs inequality (or equivalently, from the non-negativity of KL divergence). The chain rule decomposition follows from the chain rule for mutual information: 𝖨(𝖹0;𝒄1,𝒄2)=𝖨(𝖹0;𝒄1)+𝖨(𝖹0;𝒄2|𝒄1), applied recursively.

Insight.

Each conditioning pathway reduces a different type of uncertainty. The chain rule in (Chain RULE Entropy) reveals that conditioning signals have diminishing marginal returns if they are redundant. A detailed text description already constrains the scene layout and content, so a reference image provides less additional information than it would without the text. Conversely, if the text is vague (“a nice video”), the reference image provides much more information. This information-theoretic view explains why the effectiveness of each conditioning pathway depends on the specificity of the other signals, and suggests that the model should learn to dynamically allocate attention to the most informative conditioning source at each denoising step.

Proposition 21 (Gaussian entropy reduction bound).

If 𝖹0 and 𝒄 are jointly Gaussian with 𝖹0d, 𝒄dc, and cross-covariance 𝚺𝖹𝒄d×dc, then the entropy reduction is (Gaussian MI)𝖨(𝖹0;𝒄)=12logdet(𝑰d𝚺𝖹𝒄𝚺𝒄𝒄1𝚺𝒄𝖹𝚺𝖹𝖹1), where 𝚺𝖹𝖹 and 𝚺𝒄𝒄 are the marginal covariances. When the cross-covariance has rank r (i.e., only r modes of 𝖹0 are correlated with 𝒄), the mutual information is bounded by 𝖨(𝖹0;𝒄)r2log(1+SNRc), where SNRc measures the signal-to-noise ratio of the correlated modes.

Proof.

For jointly Gaussian variables, the conditional distribution 𝖹0|𝒄 is also Gaussian with covariance 𝚺𝖹|𝒄=𝚺𝖹𝖹𝚺𝖹𝒄𝚺𝒄𝒄1𝚺𝒄𝖹. The mutual information for Gaussian distributions is 𝖨=12logdet(𝚺𝖹𝖹)12logdet(𝚺𝖹|𝒄)=12logdet(𝑰𝚺𝖹𝒄𝚺𝒄𝒄1𝚺𝒄𝖹𝚺𝖹𝖹1). The rank-r bound follows from the fact that at most r eigenvalues of the matrix inside the det are non-zero, with each contributing at most 12log(1+λk) to the sum, where λkSNRc.

Exercise 19.

Consider a video generation model with three conditioning signals: text (𝒄t), reference image (𝒄i), and camera trajectory (𝒄c). Assume the following mutual information values (in nats): 𝖨(𝖹0;𝒄t)=50, 𝖨(𝖹0;𝒄i)=80, 𝖨(𝖹0;𝒄c)=20, 𝖨(𝖹0;𝒄t,𝒄i)=100, 𝖨(𝖹0;𝒄t,𝒄c)=65.

  1. Compute the conditional mutual information 𝖨(𝖹0;𝒄i|𝒄t), the additional information from the image given the text.

  2. Compute 𝖨(𝖹0;𝒄c|𝒄t).

  3. Interpret the result: which conditioning signal provides more unique information beyond the text?

  4. If the unconditional entropy is 𝖧(𝖹0)=500 nats, what fraction of the uncertainty is resolved by all three signals? What does this imply about the remaining “creative freedom” of the model?

Exercise 20.

Consider a single cross-attention head with dk=64, Nv=5000 video tokens, and Nc=200 text tokens.

  1. Compute the size of the cross-attention matrix and compare it to the self-attention matrix for video tokens alone.

  2. If the text encoder produces embeddings of dimension dc=4096 and the video model has dimension d=1024, compute the number of parameters in the 𝑾K and 𝑾V projection matrices.

  3. Show that the cross-attention output for each video token lies in the convex hull of the text value vectors.

  4. What happens when all text tokens produce identical key vectors? What does this imply about the text encoder's role?

Mixture-of-Experts for Video

Scaling a video diffusion model to billions of parameters improves quality, but the computational cost of each denoising step grows proportionally with the parameter count. For video, where each sample requires dozens of sequential denoising steps on a high-dimensional latent tensor, this cost quickly becomes prohibitive. Mixture-of-Experts (MoE) architectures address this tension by decoupling model capacity (total parameters) from per-token computation (FLOPs per forward pass). The idea is simple: replace the dense feed-forward network in each transformer block with a collection of expert sub-networks, and for each token, route it to only a small subset of experts. The total parameter count can be enormous (providing capacity to represent complex functions), while the per-token FLOPs remain manageable (because only a few experts are activated per token).

In this section, we formalise the MoE layer, analyse the routing mechanism, derive the load balancing loss, and discuss the intriguing phenomenon of expert specialisation by noise level in video diffusion models.

The MoE Layer

Definition 42 (Mixture-of-Experts Layer).

A Mixture-of-Experts layer with E experts consists of:

  1. A set of E expert networks {f1,f2,,fE}, where each expert fi:dd is typically a feed-forward network (two linear layers with a non-linearity).

  2. A gating network (router) g:dE that produces a score for each expert.

The output for input token 𝒙d is (MOE Output)MoE(𝒙)=i=1Egi(𝒙)fi(𝒙), where gi(𝒙)0 is the gating weight for expert i and i=1Egi(𝒙)=1 (or the sum is over only the selected experts in sparse MoE).

Remark 38.

In a dense MoE, all experts are evaluated for every token. This provides maximum expressiveness but no computational savings. In a sparse MoE, only a small subset of kE experts is evaluated per token, with the remaining experts receiving zero gate weight. Sparse MoE is the standard choice in practice because it achieves the capacity-compute decoupling that motivates the architecture.

Top-k Routing

The most common routing strategy selects the top-k experts for each token based on the gating scores.

Definition 43 (Top-k Expert Routing).

Given an input token 𝒙d and a router weight matrix 𝑾gE×d, compute the router logits (Router Logits)𝒍=𝑾g𝒙E. Select the indices of the top-k logits: (TOPK Indices)𝒯k(𝒙)=top-k({l1,l2,,lE}), and compute the gating weights via a restricted softmax: (TOPK GATE)gi(𝒙)={exp(li)j𝒯k(𝒙)exp(lj)if i𝒯k(𝒙),0otherwise. The MoE output is then (MOE Sparse Output)MoE(𝒙)=i𝒯k(𝒙)gi(𝒙)fi(𝒙).

Proposition 22 (Computational savings of sparse MoE).

Let each expert be a two-layer FFN with hidden dimension dffn, requiring 2ddffn parameters and 4ddffn FLOPs per token (accounting for both linear layers). A dense FFN with the same per-token cost has 2ddffn parameters. A sparse MoE layer with E experts and top-k routing has: (MOE Params)Total parameters:E2ddffn+Ed,FLOPs per token:k4ddffn+Ed. The capacity amplification factor is (MOE Amplification)Total parametersEffective per-token parametersEk, which can be large (e.g., E/k=64/2=32×) while the per-token FLOPs increase by only a factor of k (plus the small routing overhead).

Proof.

The total parameter count sums the E expert FFNs (each with 2ddffn parameters in the two linear layers) and the routing matrix (Ed). The per-token FLOPs include k expert evaluations (k4ddffn for the two matrix multiplications in each FFN) plus the routing computation (Ed for the matrix-vector product 𝑾g𝒙). The approximation in (MOE Amplification) drops the routing overhead, which is small when dffn1.

Example 28 (MoE in a video DiT).

Consider a video DiT with d=1536, dffn=4096, E=16 experts, and k=2 active experts per token.

  • Dense FFN: 2×1536×409612.6M parameters per layer.

  • MoE layer: 16×12.6M+16×1536201.3M parameters per layer.

  • FLOPs per token: Dense: 4×1536×409625.2M. MoE (k=2): 2×25.2M+16×153650.4M.

  • Capacity amplification: 16/2=8× more parameters with only 2× more FLOPs per token.

For a 40-layer network where every other layer is MoE (20 MoE layers), this adds roughly 20×(201.312.6)3.8B parameters beyond the dense baseline, while only doubling the FFN FLOPs in those layers.

Load Balancing

A well-known failure mode of MoE is expert collapse: the router learns to always send tokens to the same small subset of experts, leaving most experts unused. This wastes parameters and reduces the effective capacity of the model.

Definition 44 (Load Balancing Loss).

Given a batch of B tokens {𝒙1,,𝒙B}, define the fraction of tokens routed to expert i: (Expert Fraction)f^i=1Bb=1B𝟏[i𝒯k(𝒙b)], and the average routing probability for expert i: (Expert PROB)p^i=1Bb=1Bexp(li(b))j=1Eexp(lj(b)), where li(b)=(𝑾g𝒙b)i is the router logit for token b and expert i. The load balancing loss is (LOAD Balance LOSS)bal=αEi=1Ef^ip^i, where α>0 is a balancing coefficient (typically α[0.001,0.1]) and the factor E ensures that the loss is O(1) regardless of the number of experts.

Proposition 23 (Minimiser of the load balancing loss).

The load balancing loss bal is minimised when the routing is perfectly uniform: f^i=k/E and p^i=1/E for all experts i, giving (Balance MIN)balmin=αEEkE1E=αk. Conversely, the loss is maximised when all tokens are routed to a single expert (f^i=k and p^i=1 for one expert, zero for others), giving balmax=αEk.

Proof.

With uniform routing, each expert receives k/E fraction of tokens and probability 1/E. The sum becomes E(k/E)(1/E)=k/E, and the total loss is αEk/E=αk. For collapsed routing to expert i, f^i=k (each token selects k experts, all the same), p^i=1, and all other terms are zero. The loss becomes αEk1=αEk. By Cauchy-Schwarz, the product f^ip^i achieves its sum-minimiser at the uniform distribution.

Lemma 6 (Gradient of the load balancing loss).

The load balancing loss bal provides gradients only through the soft routing probabilities p^i (which are differentiable with respect to the router weights), not through the hard token assignments f^i (which involve a non-differentiable argmax). The gradient with respect to the router logit li(b) is (Balance GRAD)balli(b)=αEBf^ipi(b)(1pi(b)), where pi(b)=exp(li(b))/jexp(lj(b)). This pushes the router to decrease the probability of over-utilised experts (large f^i) and increase the probability of under-utilised ones.

Proof.

Differentiating p^i=1Bbpi(b) with respect to li(b) gives p^i/li(b)=1Bpi(b)(1pi(b)) (the standard softmax derivative). Since f^i is non-differentiable (it depends on discrete token assignments), the gradient of bal=αEif^ip^i with respect to li(b) treats f^i as a constant. This yields the stated result.

Expert Specialisation by Noise Level

A remarkable empirical observation in MoE-based video diffusion models is that different experts tend to specialise for different noise levels (timesteps). At high noise (t1), certain experts dominate, handling coarse, global structure prediction. At low noise (t0), different experts activate, handling fine detail refinement.

Definition 45 (Timestep-Dependent Expert Utilisation).

For a given timestep t, define the expert utilisation profile as the vector (Expert Utilisation)𝒖(t)=(u1(t),u2(t),,uE(t))[0,1]E, where ui(t)=𝔼𝒙pt[f^i(𝒙)] is the expected fraction of tokens routed to expert i when the input is at noise level t. The utilisation profile 𝒖(t) is a probability vector (iui(t)=k/EE=k in expectation with top-k routing).

Proposition 24 (Noise-level specialisation as mode separation).

Consider a simplified model where the denoising task at noise level t requires one of M distinct “modes” of computation (e.g., coarse structure prediction, mid-level feature generation, fine detail refinement). If EM and the router is trained to minimise the denoising loss with the load balancing regulariser, the equilibrium routing satisfies: (Specialisation)ui(t){k/Emif expert i is assigned to mode m(t),0otherwise, where m(t) maps timestep t to its associated mode and Em is the number of experts assigned to mode m. That is, experts naturally cluster into groups, with each group handling a specific range of noise levels.

Proof sketch.

The denoising objective at different noise levels requires different types of transformations: at high noise, the gradients favour low-frequency prediction (global structure), while at low noise, they favour high-frequency prediction (fine details). If the expert FFNs have limited capacity, it is more efficient for each expert to specialise in one type of transformation than to be a generalist. The load balancing loss prevents all tokens from collapsing to the same experts but does not prevent noise-level clustering. A more rigorous treatment requires analysing the optimisation dynamics of the router in the presence of timestep-varying input distributions, which we leave as an open question.

Mixture-of-Experts routing in a video DiT. The router assigns each token to the top-k experts (here k=2, shown in amber). Different experts tend to specialise for different noise levels: early experts (left) handle high-noise, coarse structure; middle experts handle mid-level features; late experts (right) refine fine details at low noise. The output is a gated sum of the selected expert outputs.

Capacity Factor and Auxiliary Losses

In distributed training, MoE layers introduce a unique challenge: tokens must be dispatched to the devices hosting each expert, and imbalanced routing can cause memory overflow on some devices while leaving others idle. The capacity factor controls how many tokens each expert can process.

Definition 46 (Capacity Factor).

Given a batch of B tokens distributed across E experts with top-k routing, the expert buffer size is (Capacity Factor)Cbuf=kBECF, where CF1 is the capacity factor. Each expert processes at most Cbuf tokens; tokens that would exceed this capacity are dropped (their expert computation is skipped, and the token passes through a residual connection instead). A capacity factor of CF=1.0 means each expert receives exactly the average number of tokens under perfect balance; CF=1.25 provides a 25% buffer for imbalance.

Caution.

Setting the capacity factor too low causes token dropping, which degrades generation quality because some tokens miss their expert computation entirely. Setting it too high wastes memory and compute on empty buffer slots. For video diffusion, where every token contributes to the final frame quality, aggressive token dropping (CF <1.1) can cause visible artefacts in the generated video, particularly in regions with unusual motion patterns that trigger non-uniform routing.

Definition 47 (Z-Loss Regulariser).

An additional auxiliary loss that prevents router logits from growing too large (which would cause numerical instability in the softmax) is the Z-loss: (Z LOSS)z=βBb=1B(logi=1Eexp(li(b)))2, where β>0 is a small coefficient (typically β=0.001). This loss penalises large logsumexp values, encouraging the router logits to remain moderate in magnitude.

Proposition 25 (Total training objective with MoE).

The total training objective for a video diffusion model with MoE layers is (MOE Total LOSS)total=diffusion+MoE layers(bal()+z()), where diffusion is the standard denoising objective (e.g., ϵ-prediction MSE or flow matching loss) and the sum runs over all MoE layers . The auxiliary losses bal and z are summed over layers (not averaged) to ensure that each layer receives adequate regularisation.

Remark 39.

Not every layer in a video DiT needs to be an MoE layer. A common design pattern is to use MoE layers at every other position (or every fourth position), with standard dense FFN layers in between. This reduces the routing overhead and the total parameter count while still providing substantial capacity amplification. For a 40-layer network with MoE at every other layer, the 20 MoE layers can provide 8× capacity amplification, yielding an effective model capacity of 160 dense-equivalent layers in the FFN pathway, while requiring only 40+20×2=80 dense-FFN-equivalents of FLOPs per token (with k=2).

Exercise 21.

Consider a video DiT with the following specifications: L=32 layers, d=2048, dffn=5460, and h=32 attention heads. Every even-numbered layer uses MoE with E=32 experts and top-k=2 routing.

  1. Compute the total parameter count for the attention layers (all 32 layers are identical).

  2. Compute the total parameter count for the FFN layers, distinguishing between dense (16 layers) and MoE (16 layers).

  3. Compute the total model parameters and compare to a fully dense model of the same depth and width.

  4. Estimate the per-token FLOPs for a forward pass and compare to the dense baseline.

  5. If perfect load balancing is achieved, how many tokens does each expert process in a batch of B=16,000 tokens?

Exercise 22.

Consider a simplified MoE with E=4 experts and k=1 routing. Suppose the denoising task at noise level t is characterised by a “task vector” 𝒕(t)d such that the optimal FFN transformation at that noise level is approximately f(𝒙,t)𝒕(t)𝒙.

  1. If the experts are linear functions fi(𝒙)=𝑾i𝒙, show that the optimal routing assigns each timestep t to the expert i whose weight matrix 𝑾i is closest to diag(𝒕(t)) in Frobenius norm.

  2. Suppose 𝒕(t) varies smoothly with t. Argue that the optimal expert assignment partitions the interval [0,1] into (at most) E=4 contiguous segments.

  3. Relate this to the empirical observation that experts specialise by noise level.

Exercise 23.

Prove that for any routing distribution with f^i,p^i0 and if^i=k, ip^i=1:

  1. if^ip^ik/E (by Cauchy-Schwarz or the rearrangement inequality).

  2. Equality holds if and only if f^i=k/E and p^i=1/E for all i.

  3. The load balancing loss is thus convex in the routing distribution and has a unique minimiser.

Noise Schedules for Video

The noise schedule is the heartbeat of every diffusion model. It determines how quickly the data signal is destroyed during the forward process and, consequently, how the denoiser must allocate its capacity across timesteps. For images, the design of noise schedules is well-studied: the cosine schedule of Nichol and Dhariwal, the linear schedule of Ho et al., and the learned schedules of Kingma et al. all provide effective ways to spread the denoising task across a manageable number of steps.

For video, however, the situation is fundamentally different. A video tensor 𝖹F×H×W×C contains far more elements than an image tensor 𝒛H×W×C, and those elements are highly correlated along the temporal axis. Both of these facts have profound consequences for the signal-to-noise ratio (SNR) at each timestep, and ignoring them leads to degenerate training behaviour. In this section, we develop the theory of noise schedules for video, starting from the observation that standard image schedules fail when applied naively to video data.

Why Image Schedules Fail for Video

Recall the forward process of a continuous-time diffusion model. Given a clean data sample 𝖹0, the noisy version at time t[0,1] is (Forward ZT)𝖹t=αt𝖹0+σt𝝐,𝝐Normal(0,𝑰), where αt and σt define the schedule. The signal-to-noise ratio at time t is (SNR DEF)SNR(t)=αt2σt2. For images, a typical cosine schedule produces SNR(0)1 (nearly clean) and SNR(1)1 (nearly pure noise), with a smooth transition between the two extremes.

The problem arises when we consider what the denoiser “sees” at each timestep. At intermediate t, the denoiser receives a mixture of signal and noise. For the denoiser to learn effectively, it must encounter timesteps where the task is neither trivially easy (pure signal) nor impossibly hard (pure noise). The range of “useful” timesteps depends on the dimensionality of the data.

Insight.

Higher dimensions shift the effective noise level. Consider a denoiser trying to distinguish signal from noise in a d-dimensional tensor. The expected squared norm of the signal component is αt2𝔼[𝖹02]=αt2d (assuming unit-variance data), while the expected squared norm of the noise is σt2d. The per-element SNR is the same regardless of d, but the denoiser's ability to detect the signal depends on the aggregate SNR across all elements. By a law-of-large-numbers effect, the denoiser can reliably detect signal at much lower per-element SNR when d is large, because the signal averages coherently while noise cancels. This means that timesteps which are “informative” for an image may be “too easy” for a video, wasting training capacity.

To make this precise, consider the log-SNR, defined as λt=log(αt2/σt2). For an image diffusion model at resolution H×W with C latent channels, the effective dimensionality is dimage=H×W×C. For a video with F latent frames, it is dvideo=F×H×W×C. The ratio dvideo/dimage=F can be large (e.g., F=16 to 33 for typical video models).

Example 29 (SNR mismatch between image and video).

Consider a cosine schedule designed for 256×256×4 latent images (d=262,144). For a video with F=21 latent frames at the same spatial resolution, dvideo=5,505,024. At a timestep where SNR(t)=1 (equal signal and noise power), the per-element SNR is 1/d in both cases, but the denoiser has 21× more elements to average over. The effective detection threshold is lowered by a factor of roughly 214.6, meaning the video denoiser can extract useful signal at SNR values roughly 21× smaller than the image denoiser. Consequently, the “informative” range of timesteps shifts toward lower SNR (higher noise), and the image schedule wastes capacity on timesteps that are trivially easy for the video model.

The SNR Shift Principle

The solution, first proposed in Imagen Video [5] and analysed in detail by Chen [25], is to shift the noise schedule so that the SNR at each timestep is adjusted for the data dimensionality.

Definition 48 (Shifted SNR Schedule for Video).

Let SNRref(t) be a reference noise schedule designed for data of dimensionality dref (e.g., a 256×256×4 latent image). The shifted SNR schedule for video data of dimensionality dvideo is defined by (Shifted SNR)SNRvideo(t)=SNRref(t)s(F,H,W), where the shift factor s(F,H,W) accounts for the increased dimensionality: (Shift Factor)s(F,H,W)=drefdvideo=HrefWrefCFHWC=HrefWrefFHW. In log-SNR space, the shift becomes an additive offset: (Logsnr Shift)λvideo(t)=λref(t)+logs(F,H,W)=λref(t)logdvideodref.

The shift factor s<1 when dvideo>dref, which decreases the SNR at every timestep. Equivalently, the log-SNR curve is shifted downward, moving the “informative” range to lower SNR values. This ensures that the video denoiser encounters the same effective difficulty distribution as the image denoiser, despite operating on higher-dimensional data.

Remark 40.

The shift can be understood intuitively as follows. A video with F frames contains roughly F times as much information as a single frame. To “destroy” this information at the same rate, we need to add proportionally more noise. The shift factor s=dref/dvideo achieves exactly this: it scales the noise variance up by dvideo/dref relative to the reference schedule.

Optimal Noise Schedule under Temporal Autocorrelation

The shift principle of Definition 48 treats all dimensions of the video tensor equally, ignoring the strong temporal correlations present in natural video. In reality, the temporal redundancy means that the “effective dimensionality” of a video is much less than F×H×W×C. The following theorem provides an optimal noise schedule that accounts for this structure.

Theorem 8 (Optimal Video Noise Schedule).

Let 𝖹0F×D be a clean latent video tensor (with D=H×W×C) drawn from a distribution with temporal autocorrelation function R(τ)=𝔼[𝒛0f,𝒛0f+τ]/D, normalised so that R(0)=1. Define the effective temporal dimension as (EFF DIM)Feff=F1F2f=1Fg=1FR(fg). Then the noise schedule that maximises the expected Fisher information of the denoising score across all timesteps satisfies (Optimal Logsnr)λvideo(t)=λref(t)logFeffDdref, where λref(t) is the log-SNR schedule optimal for reference data of dimensionality dref. In particular:

  1. When frames are independent (R(τ)=δτ,0), Feff=F and we recover the naive shift of Definition 48.

  2. When all frames are identical (R(τ)=1 for all τ), Feff=1 and the video schedule coincides with the single-image schedule (no shift needed).

  3. For exponentially decaying autocorrelation R(τ)=e|τ|/τ0, the effective dimension satisfies FeffF/(1+2τ0/F) for Fτ0 and FeffF/(2τ0) for Fτ0.

Proof.

The Fisher information of the score function 𝖹tlogpt(𝖹t) with respect to the noise level σt is proportional to the trace of the data covariance matrix projected onto the noisy observation. For Gaussian noise, this takes the form (Fisher INFO)(λt)SNR(t)(1+SNR(t))2trace(𝑪data), where 𝑪dataFD×FD is the full spatiotemporal covariance of 𝖹0.

The trace of the spatiotemporal covariance decomposes as (COV Trace)trace(𝑪data)=f=1Fg=1F𝔼[𝒛0f,𝒛0g]=Df=1Fg=1FR(fg)=DF2/Feff. The Fisher information is maximised when SNR(t)=1, i.e., when λt=0. To spread the informative region uniformly across t[0,1], we want the same effective Fisher information at each t as the reference schedule achieves for data of dimensionality dref.

Matching the Fisher information profiles requires (Fisher Match)SNRvideo(t)(1+SNRvideo(t))2DF2/Feff=SNRref(t)(1+SNRref(t))2dref. This equation is satisfied (to leading order in the high-dimensional limit where SNRd) by SNRvideo(t)=SNRref(t)dref/(FeffD), which in log-space gives (Optimal Logsnr).

The three special cases follow by direct computation of Feff. For case (i), f,gR(fg)=F, so Feff=F. For case (ii), f,gR(fg)=F2, so Feff=1. For case (iii), the double sum evaluates to F(1+2τ0(1eF/τ0)/F) for large F, giving the stated approximations.

Remark 41.

In practice, Feff can be estimated from a batch of training videos by computing the sample autocorrelation function and evaluating the double sum in (EFF DIM). Typical values for natural video at 24 fps with 4× temporal compression in the VAE are Feff0.3F to 0.6F, reflecting the substantial temporal redundancy that persists even after compression.

Resolution-Adapted SNR

Modern video generation systems produce outputs at multiple resolutions, either through cascaded super-resolution or through direct generation at variable resolution with packing strategies. The noise schedule should adapt to the target resolution.

Proposition 26 (Resolution-Adapted SNR).

Let dvideo=FHWC be the dimensionality of the video latent at the target resolution and dref the reference dimensionality (e.g., a 32×32×4 latent image). The resolution-adapted log-SNR schedule is (Resolution Adapted)λadapted(t)=λref(t)logdvideodref. Equivalently, if the reference schedule uses signal and noise coefficients (αtref,σtref), the adapted schedule uses (Adapted Coefficients)αt=αtref,σt=σtrefdvideodref.

Proof.

This follows directly from Definition 48 by substituting s=dref/dvideo into (Logsnr Shift). Expressing in terms of (αt,σt): the adapted SNR is αt2/σt2=(αtref)2/(σtref)2dref/dvideo. Keeping αt=αtref and solving for σt yields the stated formula.

Example 30 (Schedule shifts for common configurations).

tab:vdiff:schedule-shifts shows the log-SNR shift for several common video generation configurations relative to a 32×32×4 reference latent image.

tableLog-SNR shifts for various video latent configurations. Negative values indicate that the schedule must be shifted toward higher noise.

ConfigurationFH×Wdvideolog(dref/dvideo)
Image (322×4, ref)132×324,0960.0
Image (642×4)164×6416,3841.39
Short video (17 lat. frames)1732×3269,6322.83
Medium video (33 lat. frames)3348×48304,1284.31
Long video (65 lat. frames)6564×641,064,9605.56

Remark 42.

Chen [25] showed that applying this resolution-adapted shift is essential for training diffusion models at high resolution. Without the shift, the model spends most of its capacity on timesteps where the task is trivially easy (the signal overwhelms the noise in high-dimensional space), leading to poor sample quality. The same principle applies with even greater force to video, where the dimensionality increase is an order of magnitude beyond what is encountered in high-resolution image generation.

Visualising the SNR Shift

The following figure illustrates how the log-SNR curve shifts downward as the data dimensionality increases from a single image to increasingly long video sequences.

Log-SNR curves for image and video data at various resolutions and frame counts. Each curve is a downward shift of the reference image schedule by log(dref/dvideo). The “informative” region (where the denoiser learns most effectively) shifts to earlier timesteps as dimensionality increases. Values in parentheses show the log-shift magnitude.

Implementation: Shifted Cosine Schedule

In practice, the shifted schedule is implemented by modifying the standard cosine schedule. The reference cosine schedule defines (Cosine REF)αtref=cos(πt2),σtref=sin(πt2), so that SNRref(t)=cot2(πt/2). The shifted video schedule is obtained by applying the log-SNR offset: (Shifted Cosine)SNRvideo(t)=cot2(πt2)drefdvideo. To express this in terms of (αt,σt) satisfying αt2+σt2=1 (variance-preserving), we define (Shifted Alpha Sigma)αt=11+1/SNRvideo(t),σt=11+SNRvideo(t).

Caution.

When the shift factor dref/dvideo is very small (long, high-resolution videos), the SNR at t=0 may no longer be large enough to ensure that 𝖹0α0𝖹0 is close to the clean data. In this regime, it is common to clamp the SNR at t=0 to a minimum value (e.g., SNR(0)100) and at t=1 to a maximum noise level (e.g., SNR(1)104). The clamping ensures that the boundary conditions of the diffusion process remain well-defined.

Exercise 24 (Computing the shift factor).

A video diffusion model generates 65 latent frames at spatial resolution 64×64 with C=16 latent channels. The reference schedule was designed for 32×32×4 latent images.

  1. Compute dvideo and dref.

  2. Compute the log-SNR shift Δλ=log(dref/dvideo).

  3. If the reference schedule has λref(0.5)=0 (unit SNR at the midpoint), what is λvideo(0.5)?

  4. For exponentially decaying autocorrelation with τ0=8 frames, compute Feff and the corrected log-SNR shift using Theorem 8.

Exercise 25 (Deriving the effective temporal dimension).

Prove case (iii) of Theorem 8: for R(τ)=e|τ|/τ0, show that (Double SUM EXP)1F2f=1Fg=1Fe|fg|/τ0=1F2(F+2k=1F1(Fk)ek/τ0). Evaluate the sum in closed form using the geometric series, and derive the approximations for Fτ0 and Fτ0. Hint: Let r=e1/τ0 and use k=1Nkrk=r(1(N+1)rN+NrN+1)/(1r)2.

Flow Matching for Video

The diffusion models we have discussed so far are formulated as stochastic processes: the forward process adds noise through a stochastic differential equation (SDE), and the reverse process removes it by running the SDE backwards in time. An alternative formulation, flow matching, replaces the stochastic process with a deterministic ordinary differential equation (ODE) that transports samples from a noise distribution to the data distribution. This ODE-based viewpoint offers several advantages: simpler training objectives, straighter sampling trajectories (enabling fewer integration steps), and a natural connection to optimal transport theory.

Flow matching has become the dominant training paradigm for modern video diffusion models. Stable Video Diffusion [8], CogVideoX [17], Movie Gen [33], and many other state-of-the-art systems are trained with flow matching objectives rather than traditional DDPM-style losses. In this section, we develop the mathematical foundations of flow matching for video, building on the framework of Lipman et al. [26] and Liu et al. [66].

From Diffusion to Flow

Recall the forward process of a diffusion model: 𝖹t=αt𝖹0+σt𝝐, where 𝝐Normal(0,𝑰). This can be viewed as defining a probability path pt(𝖹) that interpolates between the data distribution p0=pdata and the noise distribution p1=Normal(0,𝑰).

There exists a time-dependent velocity field 𝒖t(𝖹) such that the probability path pt is the pushforward of p0 along the flow induced by 𝒖t. Formally, pt satisfies the continuity equation: (Continuity)ptt+(pt𝒖t)=0. The key insight of flow matching is that we can directly learn 𝒖t without ever working with the SDE formulation. Instead of training a score function 𝖹logpt(𝖹) and converting it to a velocity field, we train a neural network vθ(𝖹t,t) to predict the velocity field directly.

Key Idea.

Flow matching simplifies training. In the DDPM framework, the model predicts noise 𝝐θ(𝖹t,t), and the loss involves the score function of the marginal distribution pt(𝖹), which is intractable for complex data. Flow matching avoids this by conditioning on the data point 𝖹0 and learning the conditional velocity field 𝒖t(𝖹t|𝖹0), which has a simple closed form. This conditional formulation gives the same marginal velocity field in expectation, but each individual training target is a deterministic function of (𝖹0,t).

The Video Flow Matching Objective

We now formalise the flow matching framework for video generation. Let 𝖹0pdata be a clean latent video and 𝖹1Normal(0,𝑰) be pure noise.

Definition 49 (Video Flow Matching Objective).

The video flow matching (VFM) objective trains a velocity network vθ:F×H×W×C×[0,1]F×H×W×C by minimising (VFM LOSS)VFM(θ)=𝔼t𝒰(0,1),𝖹0pdata,𝖹1Normal(0,𝑰)vθ(𝖹t,t)ut(𝖹t|𝖹0)2, where 𝖹t is the interpolated sample at time t and ut(𝖹t|𝖹0) is the conditional velocity field defined by the chosen interpolation path.

The definition is general; it applies to any choice of interpolation between 𝖹0 and 𝖹1. The most common choice, and the one that connects to optimal transport theory, is the linear (or optimal transport) path.

Definition 50 (Optimal Transport Path).

The optimal transport (OT) path defines the interpolation (OT Interp)𝖹t=(1t)𝖹1+t𝖹0, with the associated conditional velocity field (OT Velocity)ut(𝖹t|𝖹0)=𝖹0𝖹1. Note the convention: t=0 corresponds to pure noise (𝖹0flow=𝖹1, the noise sample) and t=1 corresponds to clean data (𝖹1flow=𝖹0, the data sample).

Remark 43.

The time convention varies across papers. Some works (Lipman et al. [26]) use t=0 for noise and t=1 for data, while others (matching the DDPM convention) reverse this. We follow the convention where t=0 is noise and t=1 is data for flow matching, as this is the most common choice in the video generation literature. The OT path in (OT Interp) should be read as: at t=0, 𝖹0flow=𝖹1 (pure noise); at t=1, 𝖹1flow=𝖹0 (clean data).

Under the OT path convention of Definition 50, the VFM loss becomes particularly simple: (VFM OT LOSS)VFM(θ)=𝔼t,𝖹0,𝖹1vθ((1t)𝖹1+t𝖹0,t)(𝖹0𝖹1)2. The training target 𝖹0𝖹1 is simply the displacement from noise to data, which is a fixed vector for each training pair (𝖹0,𝖹1).

Why OT Paths Are Preferred

The OT path is not the only possible interpolation. One could also use the variance-preserving (VP) path defined by 𝖹t=cos(πt/2)𝖹1+sin(πt/2)𝖹0, which corresponds to the DDPM forward process. However, the OT path has a crucial geometric advantage.

Proposition 27 (Straighter Trajectories).

Among all interpolation paths 𝖹t=a(t)𝖹1+b(t)𝖹0 with boundary conditions a(0)=1,a(1)=0,b(0)=0,b(1)=1, the linear (OT) path a(t)=1t,b(t)=t minimises the trajectory curvature (Curvature)κ=01d2𝖹tdt22dt. Specifically, the OT path achieves κ=0 (zero curvature) for each individual sample pair (𝖹0,𝖹1), since d2𝖹t/dt2=0 everywhere.

Proof.

For the linear path, 𝖹t=(1t)𝖹1+t𝖹0, so d𝖹t/dt=𝖹0𝖹1 (constant) and d2𝖹t/dt2=0. Hence κ=0. For any other path with a(t)0 or b(t)0, we have d2𝖹t/dt2=a(t)𝖹1+b(t)𝖹00 in general, giving κ>0.

Insight.

Straight paths enable few-step sampling. The practical significance of Proposition 27 is enormous. When the learned velocity field generates approximately straight trajectories, the ODE d𝖹t/dt=vθ(𝖹t,t) can be solved with very few Euler steps (as few as 1 to 4 steps) without significant discretisation error. Curved trajectories, by contrast, require many steps to track accurately. For video generation, where each step involves a full forward pass through a large transformer, reducing the step count from 50 to 4 translates to a 12.5× speedup.

Rectified Flow and Iterative Straightening

While the OT path is straight for individual sample pairs, the marginal velocity field vθ(𝖹t,t) may still generate curved trajectories, because different data points 𝖹0 paired with different noise points 𝖹1 create crossing paths in the shared space. Rectified flow [66] addresses this by iteratively straightening the learned flow.

Theorem 9 (Rectified Flow for Video).

Let vθ(k) denote the velocity network learned at the k-th iteration of rectified flow. Define the reflow procedure:

  1. Sample 𝖹1Normal(0,𝑰).

  2. Integrate d𝖹t/dt=vθ(k)(𝖹t,t) from t=0 to t=1 to obtain 𝖹0(k).

  3. Form the new training pair (𝖹0(k),𝖹1) and train vθ(k+1) with the OT flow matching objective on this new pair.

Then the sequence of flows {vθ(k)}k1 satisfies:

  1. Transport cost is non-increasing: 𝔼[𝖹0(k+1)𝖹12]𝔼[𝖹0(k)𝖹12].

  2. Trajectory curvature is non-increasing: the average curvature κ(k+1)κ(k).

  3. In the limit, if the reflow converges, the resulting flow generates the optimal transport map between Normal(0,𝑰) and pdata, with straight trajectories that do not cross.

Proof sketch.

Part (a) follows from the fact that the OT path minimises the expected squared displacement 𝔼[𝖹0𝖹12] among all couplings with the same marginals (by Brenier's theorem). The reflow procedure replaces the coupling (𝖹0,𝖹1) at iteration k with a new coupling (𝖹0(k),𝖹1) that is generated by the flow, and then re-optimises the OT path on this new coupling. Each re-optimisation can only decrease (or maintain) the transport cost.

Part (b) follows because the new training pairs (𝖹0(k),𝖹1) are already approximately connected by the flow vθ(k), so the OT path between them has less “crossing” than the original pairs. Less crossing means the marginal velocity field has less curvature.

Part (c) is a consequence of parts (a) and (b): in the limit, the flow must generate non-crossing straight-line trajectories, which is precisely the characterisation of the OT map for Gaussian source distributions.

Remark 44.

In practice, one or two reflow iterations suffice to achieve nearly straight trajectories. The Stable Diffusion 3 model [27] uses a single reflow iteration combined with distillation to enable high-quality generation in 4 to 8 steps. For video models, reflow is more expensive (each iteration requires generating a full dataset of video samples), but even without reflow, the OT path provides much straighter trajectories than the VP path used in DDPM.

Comparison of VP/DDPM sampling trajectories (left) and OT/rectified flow trajectories (right). VP paths are curved and may cross, requiring many discretisation steps to follow accurately. OT paths are straight lines from noise to data, enabling accurate sampling with as few as 1 to 4 Euler steps. Rectified flow iteratively straightens an initial flow to approach the OT solution.

v-Prediction Parameterisation

The flow matching velocity vθ(𝖹t,t) is closely related to the classical parameterisations used in diffusion models. We now make this connection precise.

Under the linear interpolation 𝖹t=(1t)𝖹1+t𝖹0 (where 𝖹1Normal(0,𝑰) is noise and 𝖹0 is data), the velocity field can be decomposed in terms of either the noise prediction 𝝐θ or the data prediction 𝖹^0,θ.

Proposition 28 (Equivalence of Parameterisations).

Given the OT interpolation 𝖹t=(1t)𝖹1+t𝖹0, the following parameterisations are equivalent:

  1. Velocity (v-prediction): vθ(𝖹t,t)=𝖹0𝖹1.

  2. Data prediction (x0-prediction): 𝖹^0,θ(𝖹t,t) predicts 𝖹0. The velocity is recovered as (V FROM X0)vθ(𝖹t,t)=𝖹^0,θ(𝖹t,t)𝖹t1t=𝖹^0,θ(1t)𝖹1t𝖹01t.

  3. Noise prediction (ϵ-prediction): 𝝐θ(𝖹t,t) predicts 𝖹1 (the noise). The velocity is recovered as (V FROM EPS)vθ(𝖹t,t)=𝖹t(1t)𝝐θ(𝖹t,t)t𝝐θ(𝖹t,t)=𝖹tt𝝐θ(𝖹t,t)t.

The conversions between parameterisations are: (X0 FROM V)𝖹^0,θ=𝖹t+(1t)vθ(𝖹t,t),𝝐θ=𝖹ttvθ(𝖹t,t).

Proof.

From the interpolation 𝖹t=(1t)𝖹1+t𝖹0, we can express the data and noise as: (DATA Noise FROM ZT)𝖹0=𝖹t(1t)𝖹1t,𝖹1=𝖹tt𝖹01t. The velocity is v=𝖹0𝖹1. Substituting 𝖹0=𝖹^0,θ into v=𝖹0𝖹1 and using 𝖹1=(𝖹tt𝖹^0,θ)/(1t) gives (V FROM X0). Similarly, substituting 𝖹1=𝝐θ and using 𝖹0=(𝖹t(1t)𝝐θ)/t gives (V FROM EPS). The conversion formulae follow by solving for 𝖹0 and 𝖹1 from v=𝖹0𝖹1 and 𝖹t=(1t)𝖹1+t𝖹0.

Remark 45.

The v-prediction parameterisation has a practical advantage: it is numerically stable across all timesteps t[0,1]. By contrast, x0-prediction becomes unstable near t=0 (where 𝖹t𝖹1 is nearly pure noise and predicting 𝖹0 is extremely difficult), and ϵ-prediction becomes unstable near t=1 (where 𝖹t𝖹0 is nearly clean and predicting the small noise residual is numerically ill-conditioned). The velocity v=𝖹0𝖹1 has bounded magnitude at all timesteps, avoiding these instabilities.

Training Algorithm

We now present the complete training procedure for video flow matching.

Algorithm 4 (Video Flow Matching Training).

Input: Video dataset 𝒟, velocity network vθ, learning rate η, noise schedule shift Δλ (from Noise Schedules for Video), classifier-free guidance dropout probability pcfg. Output: Trained velocity network vθ.

  1. For each training iteration: enumerate[(a)]

  2. Sample a mini-batch of videos {𝖷i}i=1B from 𝒟.

  3. Encode to latent space: 𝖹0,i=(𝖷i) for each i.

  4. Sample timesteps ti𝒰(0,1), adjusted according to the shifted noise schedule.

  5. Sample noise: 𝖹1,iNormal(0,𝑰).

  6. Compute interpolated samples: 𝖹ti=(1ti)𝖹1,i+ti𝖹0,i.

  7. Compute target velocities: ui=𝖹0,i𝖹1,i.

  8. With probability pcfg, replace the text conditioning with the null embedding (for classifier-free guidance).

  9. Compute the loss: (VFM Batch LOSS)=1Bi=1Bw(ti)vθ(𝖹ti,ti,𝒄i)ui2, where w(t) is a timestep-dependent weighting function and 𝒄i is the conditioning signal (text embedding, reference image, etc.).

  10. Update parameters: θθηθ. enumerate

Remark 46.

The weighting function w(t) in (VFM Batch LOSS) controls the relative importance of different timesteps during training. Common choices include:

  • Uniform: w(t)=1. Each timestep contributes equally to the loss.

  • SNR-weighted: w(t)=SNR(t)/(1+SNR(t)). Emphasises timesteps where signal and noise are balanced.

  • Min-SNR: w(t)=min(SNR(t),γ)/(1+SNR(t)) with γ=5. Clips the weight at high SNR to prevent easy timesteps from dominating.

  • Logit-normal: Sample t from a logit-normal distribution rather than uniform, concentrating samples near t=0.5 where the denoising task is most informative. This is the approach used by Stable Diffusion 3 [27].

Sampling Algorithm

Given a trained velocity network vθ, generating a video requires solving the ODE (FLOW ODE)d𝖹tdt=vθ(𝖹t,t,𝒄),𝖹0Normal(0,𝑰), from t=0 (noise) to t=1 (data). The simplest approach is the Euler method.

Algorithm 5 (Video Flow Matching Sampling (Euler ODE)).

Input: Trained velocity network vθ, conditioning signal 𝒄, number of steps N, classifier-free guidance scale ω. Output: Generated latent video 𝖹1.

  1. Sample initial noise: 𝖹0Normal(0,𝑰), 𝖹0F×H×W×C.

  2. Set step size: Δt=1/N.

  3. For n=0,1,,N1: enumerate[(a)]

  4. Set tn=nΔt.

  5. Compute the unconditional velocity: vuncond=vθ(𝖹tn,tn,).

  6. Compute the conditional velocity: vcond=vθ(𝖹tn,tn,𝒄).

  7. Apply classifier-free guidance: (CFG Velocity)v~=(1ω)vuncond+ωvcond.

  8. Euler step: 𝖹tn+1=𝖹tn+Δtv~. enumerate

  9. Decode: 𝖷^=𝒟(𝖹1).

  10. Return 𝖷^.

Remark 47.

While the Euler method is simple, higher-order ODE solvers can improve sample quality at the same number of function evaluations. Common choices for video generation include:

  • Midpoint method (2nd order): evaluate vθ at the midpoint tn+1/2 and use this velocity for the full step. Requires 2 function evaluations per step but achieves 2nd-order accuracy.

  • Heun's method (2nd order): take a predictor Euler step, evaluate vθ at the predicted point, then average the two velocities. Also 2 evaluations per step.

  • DPM-Solver (2nd/3rd order): a solver specifically designed for diffusion ODEs that exploits the structure of the noise schedule to achieve higher accuracy with fewer evaluations.

For well-trained flow matching models with nearly straight trajectories, even the simple Euler method produces high-quality results in 20 to 50 steps. With rectified flow or distillation (Sampling Acceleration), as few as 4 to 8 steps may suffice.

Stochastic Interpolants Perspective

The flow matching framework can be generalised through the stochastic interpolants framework of Albergo et al. [67], which provides a unified view encompassing both deterministic flows and stochastic diffusion processes.

Definition 51 (Stochastic Interpolant).

A stochastic interpolant is a process of the form (Stochastic Interpolant)𝖹t=α(t)𝖹0+β(t)𝖹1+γ(t)𝜼,𝜼Normal(0,𝑰), where α,β,γ:[0,1]0 are smooth functions satisfying the boundary conditions: (Interpolant BC)α(0)=0,α(1)=1,β(0)=1,β(1)=0,γ(0)=γ(1)=0.

Setting γ(t)=0 recovers the deterministic flow matching framework. Setting γ(t)>0 adds stochasticity to the interpolation, which can improve mode coverage at the cost of requiring more sampling steps. The OT flow matching framework corresponds to α(t)=t, β(t)=1t, γ(t)=0.

Example 31 (Common interpolation schemes).

tab:vdiff:interpolation-schemes summarises several interpolation schemes used in practice.

tableInterpolation schemes and their properties. Here 𝖹0pdata and 𝖹1Normal(0,𝑰).

Schemeα(t)β(t)γ(t)Used by
OT / Lineart1t0SD3, CogVideoX
VP (cosine)sin(πt/2)cos(πt/2)0SVD
VP (linear β)1eβteβt/20DDPM
Stochastic OTt1tσt(1t)Research
Iterative straightening via rectified flow. At each iteration, the model is re-trained on sample pairs (𝖹0(k),𝖹1) generated by the flow from the previous iteration. The paths become progressively straighter and less crossing, approaching the optimal transport map. After 1 to 2 iterations, trajectories are nearly straight, enabling accurate few-step sampling.

Exercise 26 (Flow matching derivations).

  1. Starting from the VP interpolation 𝖹t=cos(πt/2)𝖹1+sin(πt/2)𝖹0, derive the conditional velocity field ut(𝖹t|𝖹0). Show that it depends on t (unlike the OT case where ut=𝖹0𝖹1 is constant).

  2. Verify that the OT flow matching loss 𝔼[vθ(𝖹t,t)(𝖹0𝖹1)2] and the DDPM ϵ-prediction loss 𝔼[𝝐θ(𝖹t,t)𝝐2] have the same minimiser (up to reparameterisation) under the VP interpolation.

  3. For a trained flow matching model with velocity field vθ, derive the formula for the log-likelihood logpθ(𝖹0) using the instantaneous change of variables formula logp1(𝖹1)=logp0(𝖹0)+01vθ(𝖹t,t)dt.

Exercise 27 (Euler discretisation error).

Consider the ODE d𝖹t/dt=v(𝖹t,t) with a Lipschitz velocity field satisfying v(𝖹,t)v(𝖹,t)L𝖹𝖹 for all 𝖹,𝖹,t.

  1. Show that the Euler method with step size Δt=1/N has global error bounded by 𝖹1𝖹1EulerCM(eL1)/(2N), where M=suptvtt(𝖹t,t) bounds the second derivative.

  2. For a perfectly rectified flow (straight trajectories), show that M=0 and the Euler method is exact in one step.

  3. Estimate M for a typical video diffusion model with L10 and argue that N=25 steps suffice for high-quality generation.

Sampling Acceleration

Generating a high-quality video with a flow matching or diffusion model typically requires 25 to 100 ODE or SDE steps, each of which involves a full forward pass through a large transformer. For a model with billions of parameters operating on tens of thousands of spatiotemporal tokens, a single forward pass may take 1 to 5 seconds on a modern GPU. Multiplying by the number of steps, generating a single short video clip can take minutes, and producing long, high-resolution content can take hours.

This computational burden is the single largest barrier to the practical deployment of video diffusion models. In this section, we survey three complementary strategies for accelerating sampling: (1) deterministic sampling with DDIM-type methods, (2) consistency distillation to reduce the number of required steps, and (3) temporal feature caching to reduce the cost of each step.

Deterministic Sampling with DDIM

The Denoising Diffusion Implicit Models (DDIM) framework [10] provides a family of non-Markovian reverse processes that share the same marginal distributions as the DDPM reverse process but allow deterministic sampling.

For video diffusion, the DDIM update rule at timestep t with noise schedule (αt,σt) is: (DDIM Update)𝖹t1=αt1(𝖹tσt𝝐θ(𝖹t,t)αt)predicted 𝖹0+σt12η2σ~t2𝝐θ(𝖹t,t)direction pointing to 𝖹t+ησ~t𝝐random noise, where 𝝐Normal(0,𝑰), σ~t=σt1σt11αt2/αt12, and η[0,1] controls the stochasticity.

Definition 52 (DDIM for Video).

Setting η=0 in (DDIM Update) yields the deterministic DDIM update: (DDIM Deterministic)𝖹t1=αt1𝖹^0,θ(𝖹t,t)+σt1𝝐θ(𝖹t,t), where 𝖹^0,θ(𝖹t,t)=(𝖹tσt𝝐θ(𝖹t,t))/αt is the one-step prediction of the clean video. This is equivalent to solving the probability flow ODE (PROB FLOW ODE)d𝖹tdt=α˙tαt𝖹t+(σ˙tσtα˙tαt)σt𝝐θ(𝖹t,t) with Euler discretisation.

Remark 48.

DDIM enables a crucial practical trick: step skipping. Instead of using all T timesteps of the training schedule (e.g., T=1000), one selects a subset of NT evenly-spaced timesteps and applies the DDIM update only at these timesteps. For video generation, reducing from T=1000 to N=50 steps yields a 20× speedup with minimal quality degradation. Further reduction to N=20 or N=10 is possible with higher-order solvers (DPM-Solver, DPM-Solver++), though quality begins to degrade noticeably below N=10 without distillation.

Remark 49.

For models trained with the flow matching objective (Flow Matching for Video), DDIM is not directly applicable because the forward process is defined differently. Instead, the analogous deterministic sampler is the Euler ODE solver from Algorithm 5. The conceptual parallel is exact: both solve a deterministic ODE that transports noise to data, and both can be accelerated with higher-order solvers or distillation.

Consistency Distillation for Video

Consistency models [60] offer a principled approach to few-step generation. The core idea is to train a model that maps any point on the ODE trajectory directly to the trajectory's endpoint (the clean data), enabling one-step generation.

Definition 53 (Consistency Distillation for Video).

Let vθ be a pre-trained velocity network (the “teacher”) and let fϕ:F×H×W×C×[0,1]F×H×W×C be a “consistency” network (the “student”) satisfying the boundary condition fϕ(𝖹,1)=𝖹 (the identity at t=1). The consistency distillation objective is (Consistency LOSS)CD(ϕ)=𝔼t𝒰(0,1),𝖹tfϕ(𝖹t,t)fϕ(𝖹^t+Δt,t+Δt)2, where 𝖹^t+Δt is obtained by taking one ODE step from 𝖹t using the teacher velocity vθ: (Teacher STEP)𝖹^t+Δt=𝖹t+Δtvθ(𝖹t,t,𝒄), and ϕ denotes an exponential moving average (EMA) of the student parameters (the “target network”).

The consistency loss enforces a simple property: any two points on the same ODE trajectory should map to the same output. If fϕ satisfies this property exactly, then evaluating fϕ(𝖹0,0) at the initial noise point directly produces the clean video, enabling one-step generation.

Remark 50.

While consistency models enable one-step generation, the quality can be improved by using k>1 steps. In the multi-step protocol, one alternates between applying fϕ (to jump toward the clean data) and adding noise (to return to an intermediate point on the trajectory):

  1. Start at 𝖹0Normal(0,𝑰).

  2. Apply fϕ(𝖹0,0)𝖹^1 (one-step prediction).

  3. Add noise: 𝖹tk=αtk𝖹^1+σtk𝝐 for some tk<1.

  4. Repeat from step 2 with the new noisy input.

With 2 to 4 consistency steps, the quality approaches that of 50-step ODE sampling while being 10 to 25 times faster.

Example 32 (AnimateLCM).

AnimateLCM [28] applies consistency distillation to video generation with a key modification: decoupled consistency learning. Instead of distilling the full video model end-to-end, AnimateLCM first distils the spatial (image) component of the model using latent consistency distillation on image data, then fine-tunes only the temporal layers on video data. This decoupled approach has two advantages:

  1. It leverages the abundance of image data (which is much more plentiful than video data) for the spatial distillation step.

  2. It reduces the cost of video distillation, since only the temporal parameters need to be updated.

The resulting model generates 16-frame videos in 4 to 8 steps, achieving a 5 to 10× speedup over the teacher model while maintaining comparable quality.

Temporal Feature Caching

The strategies above reduce the number of denoising steps. A complementary approach is to reduce the cost per step by reusing computations across consecutive timesteps. This is motivated by a key observation: the features computed by the denoiser change slowly across adjacent timesteps.

Definition 54 (Temporal Feature Caching).

Let vθ(𝖹t,t)=gLgL1g1(𝖹t,t) be the velocity network decomposed into L layers (or blocks), with intermediate features 𝒉t=gg1(𝖹t,t) at layer . Temporal feature caching reuses cached features from a previous timestep tΔt at layer when the feature change is below a threshold δ: (Caching RULE)𝒉~t={g(𝒉~t1,t)if 𝒉tΔtg(𝒉~t1,t)>δ,𝒉tΔtotherwise (use cache). In practice, the decision is typically made at the block level (e.g., per transformer block) rather than per element.

The caching strategy is particularly effective for video diffusion because the denoising trajectory is smooth: consecutive timesteps produce similar intermediate features, especially in the early (high-noise) and late (low-noise) stages of the trajectory where the model's behaviour changes slowly.

Proposition 29 (Caching Speedup Bound).

Let vθ be an L-layer velocity network where each layer g is L-Lipschitz. If features are cached from timestep tΔt with threshold δ, and the velocity field is M-Lipschitz in t (i.e., vθ(𝖹,t)vθ(𝖹,t)M|tt| for all 𝖹), then:

  1. The fraction of layers that can be cached at timestep t is at least 1CLMΔt/δ, where CL==1LL is the product of per-layer Lipschitz constants.

  2. The output error from caching is bounded by (Caching Error)vθ(𝖹t,t)v~θ(𝖹t,t)Ltailδ, where Ltail==+1LL is the Lipschitz constant of the layers after the cached layer, and v~θ denotes the output with caching.

  3. The induced error in the final generated sample 𝖹1𝖹~1 is bounded by NΔtLtailδeLv, where N is the number of sampling steps and Lv is the Lipschitz constant of vθ in 𝖹.

Proof.

For part (i), at each layer , the feature change between timesteps tΔt and t is bounded by 𝒉t𝒉tΔt(j=1Lj)MΔt. The layer can be cached if this change is less than δ, which gives the stated fraction.

Part (ii) follows from the Lipschitz property of the remaining layers: replacing 𝒉t with 𝒉tΔt (which differ by at most δ) changes the output by at most Ltailδ.

Part (iii) follows from standard ODE error accumulation: a per-step velocity error of Ltailδ over N steps, with the Lipschitz stability of the ODE providing the exponential factor.

Caching Strategies in Practice

Several recent works have developed practical caching strategies for video diffusion.

Example 33 (PAB: Pyramid Attention Broadcast).

PAB [29] observes that different attention types in video DiT models change at different rates across timesteps:

  • Spatial self-attention changes rapidly (captures fine-grained spatial details that evolve with denoising).

  • Temporal self-attention changes moderately (temporal relationships are relatively stable across nearby timesteps).

  • Cross-attention (text conditioning) changes slowly (the text embedding is fixed throughout sampling).

PAB exploits this hierarchy by caching each attention type at a different frequency: cross-attention is cached every 5 to 10 steps, temporal attention every 2 to 3 steps, and spatial attention every 1 to 2 steps. This “pyramid” of caching intervals achieves 1.5 to 2× speedup with negligible quality degradation.

Example 34 (T-GATE: Temporal Gating).

T-GATE [30] takes an even more aggressive approach to cross-attention caching. It observes that cross-attention outputs (the text-conditioned features) are nearly constant after the first few denoising steps. T-GATE caches the cross-attention output after step tgate (typically 20% to 40% of the total steps) and reuses it for all subsequent steps. For the cached steps, the cross-attention computation is completely eliminated, saving both compute and memory. Combined with PAB-style temporal attention caching, T-GATE achieves up to 2.5× speedup.

Pyramid attention caching schedule (PAB-style). Different components of the transformer are cached at different frequencies based on how quickly their outputs change across timesteps. Cross-attention (slowest-changing) is cached most aggressively, while spatial attention and feed-forward layers (fastest-changing) are recomputed at every step. Green cells indicate cached computations (zero cost); orange cells indicate full recomputation.

Distillation Pipeline

Consistency distillation (Definition 53) is one instance of a broader family of distillation approaches. The general idea is to train a “student” model that mimics the output of a “teacher” model (the full multi-step sampler) in fewer steps.

Definition 55 (Progressive Distillation for Video).

Progressive distillation [31] trains a sequence of student models, each reducing the step count by half:

  1. Start with a teacher model that generates videos in N steps.

  2. Train a student model to match the teacher's output in N/2 steps, by learning to predict the result of two teacher steps in a single student step.

  3. Use the student as the new teacher and repeat, halving the step count at each round.

After k rounds, the final student generates in N/2k steps. The training objective at each round is (Progressive Distill)PD(ϕ)=𝔼t,𝖹tvϕ(𝖹t,t)sg[vθ(2-step)(𝖹t,t)]2, where sg[] denotes the stop-gradient operator and vθ(2-step) is the effective velocity obtained by running two teacher steps from 𝖹t.

Progressive distillation pipeline. Each distillation round halves the number of sampling steps. After three rounds, the student model generates in 6 steps (8× faster than the teacher). Each round requires training a new student on outputs from the previous round's model.

Combining Acceleration Strategies

The three acceleration strategies described above are complementary and can be combined for multiplicative speedup:

  1. Step reduction (consistency distillation or progressive distillation): reduce from 50 steps to 4 to 8 steps, yielding 6× to 12× speedup.

  2. Feature caching (PAB + T-GATE): reduce the cost per step by 1.5× to 2.5× through selective reuse of attention outputs.

  3. Higher-order solvers (DPM-Solver, Heun): achieve the same quality with 1.5× to 2× fewer steps than Euler.

Example 35 (Combined acceleration).

Consider a baseline video DiT that generates a 5-second, 720p video in 50 Euler steps, taking 200 seconds total (4 seconds per step). Applying the three strategies:

  1. Consistency distillation to 8 steps: 200×(8/50)=32 seconds.

  2. PAB caching (1.8× speedup per step): 32/1.818 seconds.

  3. These combined yield roughly 11× speedup: from 200 seconds to 18 seconds.

This brings the generation time into a range that is practical for interactive applications, though still far from real-time.

Caution.

Each acceleration strategy introduces a quality-speed tradeoff. Consistency distillation can blur fine details. Feature caching can introduce temporal artifacts if the caching threshold δ is too large. Higher-order solvers can amplify numerical errors at very few steps. The optimal combination depends on the target application: a social media platform may tolerate some quality reduction for faster generation, while a film production pipeline demands the highest possible quality and can afford longer generation times.

Exercise 28 (Caching analysis).

A video DiT has L=28 transformer blocks. Each block has 4 sub-components: spatial self-attention (SA), temporal self-attention (TA), cross-attention (CA), and a feed-forward network (FFN). The compute cost of each sub-component is: SA = 40%, TA = 25%, CA = 15%, FFN = 20% of the total per-block cost.

  1. If cross-attention is cached every 4 steps and temporal attention is cached every 2 steps (all other components computed every step), what is the average per-step compute saving?

  2. If the total generation uses N=30 steps, what is the overall speedup compared to no caching?

  3. What constraint does Proposition 29 place on the caching threshold δ if the maximum acceptable output error is ϵ=0.1 and the tail Lipschitz constant is Ltail=5?

Exercise 29 (Consistency model boundary condition).

The consistency model fϕ(𝖹,t) must satisfy fϕ(𝖹,1)=𝖹 (identity at the clean endpoint).

  1. Why is this boundary condition necessary? Hint: consider what happens at t=1 where 𝖹1𝖹0 (the clean data).

  2. A common implementation enforces this by parameterising fϕ(𝖹,t)=cskip(t)𝖹+cout(t)Fϕ(𝖹,t), where cskip(1)=1 and cout(1)=0. Propose smooth functions cskip(t) and cout(t) that satisfy these boundary conditions.

  3. Show that your proposed parameterisation automatically satisfies the boundary condition regardless of the network output Fϕ(𝖹,t).

Training at Scale

Training a state-of-the-art video diffusion model is one of the most resource-intensive tasks in machine learning. The models contain billions of parameters, the training data consists of millions of video clips, and the training runs consume thousands of GPU-days. Naive approaches (randomly initialising a large model and training it end-to-end on full-resolution video) are both wasteful and unstable. Instead, every successful video generation system uses a carefully staged training procedure that progressively increases the resolution, duration, and complexity of the training data.

In this section, we formalise the multi-stage training paradigm, derive a transfer learning bound that explains why image pretraining helps, and describe the progressive resolution curriculum used by leading systems.

Multi-Stage Training

The multi-stage training paradigm decomposes the video generation training process into a sequence of stages, each building on the previous one.

Definition 56 (Multi-Stage Training Objective).

A multi-stage training procedure consists of K stages {(𝒟k,k,k)}k=1K, where 𝒟k is the training dataset at stage k, k=(Fk,Hk,Wk) specifies the resolution (frame count, height, width), and k is the training objective. The model parameters θk at stage k are initialised from the previous stage: (Multi Stage INIT)θk={θpretrainif k=1 (from image pretraining),θk1if k>1 (from previous stage), where θk1=arg minθ𝔼𝖹0𝒟k1[k1(θ;𝖹0,k1)] are the optimised parameters from stage k1. The resolution increases across stages: (Resolution Progression)F1F2FK,H1H2HK,W1W2WK.

The typical progression for a modern video generation system is:

  1. Stage 1: Image pretraining. Train (or fine-tune) the model on a large dataset of images, treating each image as a single-frame “video.” This stage teaches the model spatial generation (objects, textures, composition) using the abundant supply of image data.

  2. Stage 2: Low-resolution video. Extend the model to short video clips at low resolution (e.g., 16 frames at 256×256). The temporal layers (temporal attention, temporal convolutions) are initialised randomly or from a motion module. This stage teaches basic motion and temporal coherence.

  3. Stage 3: Medium-resolution video. Increase the resolution and duration (e.g., 33 frames at 480×480). The model learns finer motion details and higher-quality spatial features.

  4. Stage 4: High-resolution video. Train at the target resolution (e.g., 65 frames at 720p or 1080p) on a curated, high-quality dataset. This final stage refines the model's output quality.

Key Idea.

Image pretraining provides a massive head start. The spatial structure of video frames is essentially the same as the structure of natural images: objects, textures, lighting, and composition follow the same statistical regularities. By pretraining on images (of which billions are available), the model learns strong spatial priors before it ever sees a video. The subsequent video stages need only learn temporal dynamics (motion, temporal coherence, physics), which requires far less data and compute than learning spatial structure from scratch. This explains why even a model fine-tuned on “only” a few million videos can produce photorealistic output: it inherits spatial knowledge from image pretraining.

Transfer Learning Bound

Why does image pretraining help with video generation? The following theorem provides a formal justification based on the decomposition of the video score into spatial and temporal components.

Theorem 10 (Transfer Learning Bound for Video).

Let sθimg(𝒛,t) be a score network trained on images (single frames) and sθvid(𝖹,t) be the target score network for video. Decompose the video score as (Score Decomp)𝖹tlogptvid(𝖹t)=f=1F𝒛tflogptimg(𝒛tf)spatial component (from image model)+Δstemp(𝖹t,t)temporal correction, where Δstemp captures the inter-frame dependencies. If the video distribution has temporal autocorrelation ρ(τ), then the magnitude of the temporal correction is bounded by (Temporal Correction)𝔼[Δstemp(𝖹t,t)2]CFD(1ρ(1)2)h(SNR(t)), where C is a constant depending on the data distribution, D=H×W×C is the per-frame latent dimension, and h(SNR(t))=SNR(t)/(1+SNR(t))2 peaks at SNR(t)=1. Consequently, when temporal autocorrelation is high (ρ(1)1), the temporal correction vanishes, and the image score is a good approximation to the video score.

Proof.

The video score decomposes via the chain rule of probability. For a video 𝖹=(𝒛1,,𝒛F) with joint distribution pvid: (Score Decomp Detail)𝒛flogpvid(𝖹)=𝒛flogpimg(𝒛f)+𝒛flogpvid(𝖹)g=1Fpimg(𝒛g)=𝒛flogpimg(𝒛f)+𝒛flogr(𝖹), where r(𝖹)=pvid(𝖹)/gpimg(𝒛g) is the ratio capturing inter-frame dependencies. The temporal correction is Δsftemp=𝒛flogr(𝖹).

For the noisy versions at time t, the same decomposition holds with the noisy distributions. The bound follows from analysing logr for a multivariate Gaussian model where the temporal covariance is characterised by ρ(τ). Under this model, 𝒛flogr2 is proportional to (1ρ(1)2) (the conditional variance of frame f given its neighbours), multiplied by the Fisher information factor h(SNR(t)) that accounts for the noise level. Summing over all F frames and D spatial dimensions gives the stated bound.

Remark 51.

Theorem 10 has several practical implications:

  1. High-autocorrelation videos benefit most from transfer. For slow-motion or static-camera footage where ρ(1)0.99, the temporal correction is tiny, and an image-pretrained model needs very little video fine-tuning.

  2. The temporal correction is localised in timestep space. It peaks at SNR(t)=1 (where signal and noise are balanced) and vanishes at both extremes. This suggests that video-specific training should focus on intermediate timesteps.

  3. The bound scales with FD. Longer, higher-resolution videos require more video-specific training data to learn the temporal correction accurately.

Progressive Resolution Curriculum

The resolution progression from low to high is not merely a convenience; it provides a coarse-to-fine learning signal that stabilises training and improves final quality.

Example 36 (Progressive training curriculum (Open-Sora style)).

tab:vdiff:curriculum shows a typical progressive training curriculum inspired by Open-Sora [32] and CogVideoX [17].

tableProgressive training curriculum for video generation. Each stage increases resolution and/or duration while decreasing the batch size to fit within GPU memory.

StageData typeResolutionFramesBatchSteps
1Images256×25612048200K
2Images512×51211024100K
3Videos256×25616256150K
4Videos512×5123264150K
5Videos (HQ)720p6516100K

Several design choices govern the curriculum:

  1. Image stages precede video stages. Stages 1 and 2 train only on images, building spatial generation capability. The temporal layers are either absent or frozen during these stages.

  2. Resolution increases gradually. Jumping directly from 2562 to 720p often leads to training instability (loss spikes, mode collapse). Intermediate steps allow the model to adapt its spatial features progressively.

  3. Frame count increases with resolution. At low resolution, training with many frames is computationally feasible and teaches long-range temporal coherence. At high resolution, memory constraints limit the frame count, but the temporal knowledge from earlier stages transfers.

  4. Batch size decreases as resolution increases. GPU memory is the binding constraint. The effective batch size (in terms of total pixels processed per step) may remain roughly constant across stages.

  5. High-quality data in later stages. Early stages can use large, noisy datasets (web-scraped videos). Later stages use smaller, carefully curated datasets with high aesthetic quality, stable motion, and accurate captions.

Mixed Image-Video Training

A key practical technique is to mix image and video data within the same training batch, even during video-focused stages. This prevents catastrophic forgetting of spatial generation quality during video fine-tuning.

The mixed training objective is: (Mixed LOSS)mixed(θ)=(1λvid)𝔼𝒛0pimage[FM(θ;𝒛0)]+λvid𝔼𝖹0pvideo[FM(θ;𝖹0)], where λvid(0,1) controls the mixing ratio and FM is the flow matching loss. Images are treated as single-frame videos (F=1) and processed by the same model architecture, with the temporal attention layers receiving a single token in the temporal dimension.

Remark 52.

The mixing ratio λvid is typically set between 0.5 and 0.8, with the exact value depending on the relative sizes of the image and video datasets. CogVideoX uses λvid=0.75 in the video training stages, while Movie Gen [33] uses a curriculum where λvid increases from 0.3 in early stages to 0.9 in late stages. The key insight is that some image data should always be present in the training mix, even in the final high-resolution video stage, to prevent spatial quality degradation.

Remark 53.

Modern video models must handle multiple aspect ratios (16:9, 9:16, 1:1, 4:3, etc.) to support different output formats. This is achieved by bucketing: the training data is grouped into aspect-ratio buckets, and each mini-batch draws from a single bucket so that all samples have the same spatial dimensions (enabling efficient batched computation). The model learns resolution and aspect-ratio awareness through positional encodings that encode the absolute coordinates within the video frame.

Data Curation

The quality of the training data is at least as important as the model architecture and training recipe. Video data from the web is noisy, poorly captioned, and highly variable in quality. Careful curation is essential.

Example 37 (Video data curation pipeline).

A typical data curation pipeline includes the following stages:

  1. Collection. Crawl video data from the web or license proprietary datasets. Raw datasets may contain tens of millions of clips.

  2. Safety filtering. Remove content that is unsafe, illegal, or violates content policies. This typically uses both automated classifiers and human review.

  3. Technical filtering. Remove videos with: itemize

  4. Very low resolution (<360p).

  5. Excessive compression artifacts.

  6. Static content (e.g., slideshows, still images with music).

  7. Excessive camera shake or motion blur.

  8. Watermarks or overlaid text covering more than 10% of the frame. itemize

  9. Aesthetic scoring. Assign an aesthetic quality score to each clip using a trained aesthetic predictor. Retain only clips above a threshold (e.g., top 30% to 50%).

  10. Temporal quality scoring. Evaluate temporal coherence using metrics such as optical flow smoothness, scene-cut frequency, and inter-frame SSIM. Remove clips with excessive scene cuts or temporal artifacts.

  11. Captioning. Generate detailed text descriptions for each clip using a vision-language model (e.g., a fine-tuned LLaVA or CogVLM). The captions should describe the visual content, actions, camera motion, and temporal progression.

  12. Deduplication. Remove near-duplicate clips (which are common in web-scraped data) using perceptual hashing or learned embeddings.

After the full pipeline, the dataset typically shrinks to 10% to 30% of its original size, but the remaining clips are of substantially higher quality.

Remark 54.

The quality of text captions is critical for text-conditioned video generation. Poorly captioned data teaches the model to ignore the text conditioning (since the text provides no useful signal), leading to low text-video alignment at inference time. Several systems (Movie Gen, CogVideoX) invest heavily in caption quality, using multi-stage captioning pipelines that generate both short summaries and detailed frame-by-frame descriptions.

Scaling Laws and Compute Budgets

The relationship between model size, data size, and generation quality for video diffusion models is an active area of research. While precise scaling laws analogous to the Chinchilla scaling laws for language models have not yet been established, several empirical observations guide practice.

Example 38 (Compute budgets for recent systems).

tab:vdiff:compute-budgets provides estimated compute budgets for several prominent video generation systems.

tableEstimated model sizes and compute budgets for recent video generation systems. GPU-hours are approximate and based on public reports or estimates.

SystemParametersGPU typeEst. GPU-hours
Open-Sora 1.21.1BH10050K
CogVideoX5BA100200K
Stable Video Diffusion1.5BA100150K
Movie Gen30BH1001M+
Sora (est.)3B+H100/A1001M+

Remark 55.

Empirically, the following trends have been observed:

  1. Model size improves quality sub-linearly. Doubling model parameters typically improves FVD by 10% to 20%, with diminishing returns beyond 5 to 10 billion parameters (for current architectures).

  2. Data quality matters more than data quantity. Training on 2 million high-quality, well-captioned clips often produces better results than training on 20 million poorly-captioned, low-quality clips.

  3. Longer training helps, up to a point. Most systems see continuous improvement up to 200K to 500K training steps per stage, with diminishing returns beyond.

  4. Image pretraining provides the largest single improvement. Initialising from an image model (rather than random initialisation) typically improves final video quality by 30% to 50% (measured by FVD), while also reducing training time by 2 to 4×.

Multi-stage training pipeline for video generation. The first two stages train on images to build spatial generation capability. Stage 3 introduces temporal layers and trains on low-resolution video. Stages 4 and 5 progressively increase resolution and duration while using increasingly curated data. Arrows indicate weight initialisation from the previous stage.

Practical Training Considerations

Beyond the high-level training pipeline, several practical considerations are critical for training video diffusion models at scale.

  1. Learning rate scheduling. Each stage typically uses a warmup period (1K to 5K steps) followed by cosine decay. The peak learning rate often decreases across stages (e.g., 3×104 for image pretraining, 1×104 for low-resolution video, 5×105 for high-resolution video) to prevent overwriting the knowledge from earlier stages.

  2. Gradient accumulation. At high resolution, the batch size per GPU is severely limited (often 1 to 2 videos). Gradient accumulation across multiple micro-batches is used to achieve an effective batch size of 16 to 64, which is necessary for stable optimisation.

  3. Model parallelism. For models exceeding 5B parameters, single-GPU training is impossible. Tensor parallelism (splitting layers across GPUs), sequence parallelism (splitting the token sequence), and pipeline parallelism are all used. The Open-Sora project [32] provides implementations of these parallelism strategies specifically optimised for video DiT models.

  4. Noise schedule adaptation. The noise schedule (Noise Schedules for Video) must be adjusted at each stage to account for the changing resolution. As the resolution increases, the log-SNR shift Δλ from Proposition 26 increases in magnitude, requiring the schedule to be shifted toward higher noise levels.

  5. EMA for sampling. An exponential moving average of the model weights is maintained throughout training and used for evaluation and sampling. The EMA decay rate is typically 0.9999 to 0.99999, with lower decay (faster averaging) in early stages and higher decay (slower averaging) in later stages where the model is closer to convergence.

Caution.

Training at scale is prone to instabilities. Common failure modes include:

  • Loss spikes during resolution transitions, caused by the sudden change in input statistics. Mitigation: use a warmup period at each new stage and gradually increase the learning rate.

  • Mode collapse in later stages, where the model produces only a narrow range of outputs. Mitigation: maintain sufficient data diversity and use a mixed image-video training objective.

  • Catastrophic forgetting of spatial quality during video fine-tuning. Mitigation: include image data in all training stages (Mixed Image-Video Training).

  • Numerical overflow in attention computations at high resolution, caused by large attention logits. Mitigation: use query-key normalisation (QK-Norm) and mixed-precision training with careful loss scaling.

Exercise 30 (Multi-stage training analysis).

A video generation system uses the following 4-stage training curriculum on a cluster of 256 H100 GPUs:

  1. Images at 2562, batch size 2048, 200K steps.

  2. Images at 5122, batch size 1024, 100K steps.

  3. Videos (2562×16), batch size 128, 150K steps.

  4. Videos (5122×32), batch size 32, 100K steps.

Assume each forward-backward pass takes 0.5s per image at 2562 and scales quadratically with spatial resolution and linearly with frame count.

  1. Compute the time per step at each stage (assuming perfect data parallelism across 256 GPUs).

  2. Compute the total training time in GPU-hours for each stage.

  3. What fraction of the total compute is spent on video training (stages 3 and 4)?

  4. If the temporal autocorrelation of the training videos is ρ(1)=0.95, use Theorem 10 to estimate the relative magnitude of the temporal correction compared to the spatial component of the score.

Exercise 31 (Data curation impact).

A team has collected 10 million web-scraped video clips, of which 30% are high-quality (sharp, well-lit, smooth motion, accurate captions) and 70% are low-quality (blurry, poorly captioned, with artifacts).

  1. If the team trains on all 10M clips for 200K steps with batch size 64, how many epochs does training complete?

  2. If instead they filter to only the 3M high-quality clips and train for the same number of steps, how many epochs does training complete?

  3. Based on the empirical observation that “data quality matters more than data quantity,” which approach would you expect to produce better results? Justify your answer qualitatively.

  4. Propose a curriculum that uses both subsets: the full 10M clips for early stages and the curated 3M clips for later stages. What advantages might this approach offer?

Summary and Looking Ahead

This section has covered the core training methodology for large-scale video diffusion models. The key insights are:

  1. Noise schedules must adapt to video dimensionality (Noise Schedules for Video). The log-SNR curve should be shifted by log(dvideo/dref), with a further correction for temporal autocorrelation.

  2. Flow matching is the dominant training paradigm (Flow Matching for Video). The OT path provides straight trajectories that enable efficient sampling, and the v-prediction parameterisation is numerically stable across all timesteps.

  3. Sampling acceleration is essential for practical deployment (Sampling Acceleration). Consistency distillation, temporal feature caching, and higher-order solvers combine to yield order-of-magnitude speedups.

  4. Multi-stage training with image pretraining is the established recipe (Training at Scale). Progressive resolution curricula, mixed image-video training, and careful data curation are all critical for achieving state-of-the-art quality.

In File E, we turn to the controllability dimension: how to guide video generation with diverse conditioning signals including text prompts, reference images, camera trajectories, and motion controls. We will also examine evaluation metrics for video generation, including the Fréchet Video Distance (FVD) and human evaluation protocols, which provide the feedback signal for assessing the techniques developed throughout this chapter.

Classifier-Free Guidance for Video

Classifier-free guidance (CFG) has become the default mechanism for improving sample quality in diffusion models. In the image domain, the idea is straightforward: during training, randomly drop the conditioning signal and learn both a conditional and an unconditional denoiser; at inference, extrapolate away from the unconditional prediction toward the conditional one. For video, the situation is considerably richer because the conditioning signal is no longer a single text prompt. A video diffusion model may be conditioned on text descriptions, reference images, camera trajectories, motion maps, audio tracks, or any combination of these. Each conditioning modality carries different information and may warrant a different guidance strength.

In this section, we formalise multi-condition CFG for video, establish its Bayesian interpretation, describe the dropout schedules used during training, and illustrate the geometric intuition behind guided denoising.

Review: Single-Condition CFG

We begin with a brief review of the single-condition case, following [62]. Let ϵθ(𝖹t,t,c) denote a noise-prediction network conditioned on signal c, and let ϵθ(𝖹t,t,) denote the same network evaluated with the conditioning signal replaced by a null token . The guided noise prediction is (CFG Single)ϵ^θ(𝖹t,t,c)=ϵθ(𝖹t,t,)+w(ϵθ(𝖹t,t,c)ϵθ(𝖹t,t,)), where w1 is the guidance scale. When w=1, we recover the standard conditional prediction. When w>1, we amplify the “direction” from the unconditional prediction toward the conditional one, producing samples that are more strongly aligned with c at the cost of reduced diversity.

Remark 56 (Score-function interpretation).

Recall that the noise prediction ϵθ relates to the score function via 𝖹tlogpt(𝖹t|c)ϵθ(𝖹t,t,c)/σt. Substituting into (CFG Single), the guided score becomes (CFG Score)𝖹tlogp~t(𝖹t|c)=(1w)𝖹tlogpt(𝖹t)+w𝖹tlogpt(𝖹t|c), which is the score of the tempered distribution p~(𝖹0|c)p(𝖹0|c)wp(𝖹0)1w. For w>1, this sharpens the conditional distribution; for w<1, it broadens it toward the prior.

Multi-Condition CFG for Video

In video generation, the model typically receives multiple conditioning signals simultaneously. A text-to-video model conditioned on text ctext and a reference image cimg must balance fidelity to the textual description against visual consistency with the reference frame. Adding camera parameters ccam or motion trajectories cmotion introduces further dimensions of control.

Definition 57 (Multi-Condition CFG).

Let {ck}k=1K be a set of K conditioning signals, each with its own guidance weight wk0. The multi-condition classifier-free guidance prediction is (Multi CFG)ϵ^θ(𝖹t,t,{ck})=ϵθ(𝖹t,t,)+k=1Kwk(ϵθ(𝖹t,t,ck)ϵθ(𝖹t,t,)), where ϵθ(𝖹t,t,ck) denotes the prediction with only condition ck active (all other conditions replaced by ), and ϵθ(𝖹t,t,) is the fully unconditional prediction.

For the common case of text and image conditioning, this becomes (CFG TEXT IMG)ϵ^θ=ϵθ(𝖹t,)+wtext(ϵθ(𝖹t,ctext)ϵθ(𝖹t,))+wimg(ϵθ(𝖹t,cimg)ϵθ(𝖹t,)), where we suppress the time argument for brevity. This formulation allows independent control over how strongly the generated video aligns with the text description versus the reference image.

Example 39 (Guidance weights in Stable Video Diffusion).

Stable Video Diffusion [8] uses image-to-video generation with text as an auxiliary signal. In practice, the default guidance weights are wimg3.0 and wtext1.0, reflecting the fact that image conditioning provides much stronger structural information (exact appearance, layout, lighting) than the text prompt, which serves mainly to disambiguate motion and scene dynamics.

Caution.

Over-guidance degrades temporal coherence. In image diffusion, high guidance scales (w10) produce saturated, “HDR-like” artefacts. In video, the failure mode is more severe: over-guidance introduces temporal flickering, where each frame is individually sharp but adjacent frames are inconsistent. This occurs because the guidance amplifies per-frame conditional alignment at the expense of the inter-frame correlations captured by the unconditional model. Typical video guidance scales are much lower than image scales: wtext[3,7] and wimg[1,4].

Compositional Guidance

The multi-condition formulation in Definition 57 treats each conditioning signal independently: the guidance directions are summed without accounting for potential interactions. A more nuanced approach considers joint conditioning, where some combinations of conditions are dropped together.

Definition 58 (Compositional Guidance Schedule).

Let 𝒮2{1,,K} be a collection of subsets of conditions. For each subset S𝒮, let ϵθ(𝖹t,t,cS) denote the prediction with conditions {ck:kS} active and all others set to . The compositional guidance prediction is (Compositional CFG)ϵ^θ=ϵθ(𝖹t,t,)+S𝒮wS(ϵθ(𝖹t,t,cS)ϵθ(𝖹t,t,)), where wS is the guidance weight for subset S.

For two conditions (text and image), the compositional formulation includes three guidance terms: text only, image only, and joint text-plus-image. With appropriate weights, this captures synergistic effects that the additive formulation in (Multi CFG) misses.

Remark 57 (Computational cost of compositional guidance).

Each term in (Compositional CFG) requires a separate forward pass through the denoiser network. With |𝒮|+1 subsets (including the unconditional pass), the cost per denoising step is multiplied by |𝒮|+1. For two conditions, the full compositional expansion requires 22=4 forward passes (the unconditional pass, text-only, image-only, and joint), compared to 3 passes for the additive scheme. This cost grows exponentially with K, making full compositional guidance impractical for more than two or three conditions. In practice, most systems use the additive formulation with carefully tuned per-condition weights.

CFG as Approximate Bayesian Inference

The score-function viewpoint in Remark 56 hints at a deeper probabilistic interpretation. We now formalise this.

Theorem 11 (CFG as Tempered Posterior Sampling).

Let p(𝖹0) be the unconditional data distribution and p(𝖹0|c) the conditional distribution. Define the tempered posterior (Tempered Posterior)p~w(𝖹0|c)p(𝖹0|c)wp(𝖹0)1w. Then the guided score at noise level t is exactly the score of the noised tempered posterior: (Tempered Score)𝖹tlogp~w,t(𝖹t|c)=w𝖹tlogpt(𝖹t|c)+(1w)𝖹tlogpt(𝖹t). In particular, the CFG sampling process with guidance weight w generates samples from p~w(𝖹0|c) rather than from the true conditional p(𝖹0|c).

Proof.

By Bayes' rule, p(𝖹0|c)p(c|𝖹0)p(𝖹0). Substituting into (Tempered Posterior), p~w(𝖹0|c)[p(c|𝖹0)p(𝖹0)]wp(𝖹0)1w=p(c|𝖹0)wp(𝖹0). Taking the log and differentiating with respect to 𝖹0: 𝖹0logp~w(𝖹0|c)=w𝖹0logp(c|𝖹0)+𝖹0logp(𝖹0). The conditional score decomposes as 𝖹0logp(𝖹0|c)=𝖹0logp(c|𝖹0)+𝖹0logp(𝖹0), so 𝖹0logp(c|𝖹0)=𝖹0logp(𝖹0|c)𝖹0logp(𝖹0). Substituting: 𝖹0logp~w(𝖹0|c)=w[𝖹0logp(𝖹0|c)𝖹0logp(𝖹0)]+𝖹0logp(𝖹0)=w𝖹0logp(𝖹0|c)+(1w)𝖹0logp(𝖹0). The same decomposition holds at any noise level t since the forward process is applied independently of c. This yields (Tempered Score).

Insight.

Guidance as temperature control. The tempered posterior p~w(𝖹0|c)p(c|𝖹0)wp(𝖹0) raises the likelihood to the power w. For w>1, modes of the likelihood are amplified, concentrating the distribution around samples that most strongly match the condition c. This is analogous to reducing the temperature in a Boltzmann distribution, trading diversity for quality. For video, this trade-off is particularly consequential: high guidance sharpens per-frame fidelity but can destroy the smooth temporal transitions that characterise natural video.

Multi-Condition Extension

For multiple conditions, the Bayesian interpretation extends naturally under a conditional independence assumption.

Proposition 30 (Multi-Condition Tempered Posterior).

Assume the conditions {ck}k=1K are conditionally independent given 𝖹0, i.e., p(c1,,cK|𝖹0)=k=1Kp(ck|𝖹0). Then the multi-condition CFG prediction in (Multi CFG) corresponds to sampling from the tempered posterior (Multi Tempered)p~(𝖹0|c1,,cK)p(𝖹0)k=1Kp(ck|𝖹0)wk.

Proof.

Under conditional independence, the joint conditional score decomposes as 𝖹tlogpt(𝖹t|c1,,cK)=𝖹tlogpt(𝖹t)+k=1K[𝖹tlogpt(𝖹t|ck)𝖹tlogpt(𝖹t)]. Replacing each conditional score difference with its weighted version and collecting terms yields the score of p~(𝖹0|c1,,cK).

This result provides principled guidance for choosing the weights wk: each weight controls the “temperature” of the corresponding likelihood term. Setting wk=1 recovers the standard posterior contribution from condition ck; wk>1 amplifies it; wk=0 ignores it entirely.

Example 40 (Weight selection heuristics).

Practical video systems use the following heuristics for weight selection:

  • Text-to-video: wtext[5,9], similar to image generation but slightly lower to preserve temporal coherence.

  • Image-to-video: wimg[1.5,3.5], lower than text guidance because the image already provides strong structural constraints.

  • Camera-conditioned: wcam[1.0,2.0], camera conditions are geometric and tolerate less amplification before introducing perspective distortions.

  • Motion trajectories: wmotion[1.0,2.5], higher values enforce stricter adherence to the specified motion paths.

These ranges are empirical and vary across architectures. The key principle is that stronger conditioning signals (those that more precisely constrain the output) require lower guidance weights, while weaker signals benefit from amplification.

Training with Conditional Dropout

For CFG to work, the model must be trained to handle missing conditions. This is achieved by randomly dropping conditions during training with specified probabilities.

Definition 59 (Multi-Condition Dropout Schedule).

Let {pkdrop}k=1K be per-condition dropout probabilities and palldrop the probability of dropping all conditions simultaneously. During training, at each step, the conditioning configuration is sampled as follows:

  1. With probability palldrop, set all conditions to (fully unconditional training).

  2. Otherwise, for each condition k independently, replace ck with with probability pkdrop.

This produces a mixture of training examples with various subsets of active conditions.

Example 41 (Dropout rates in practice).

Typical dropout rates for video diffusion models:

ConditionpkdropNotes
Text caption0.10–0.15Standard for text-conditional models
Reference image0.05–0.10Lower because image is critical
Camera pose0.10–0.20Can be higher; camera is auxiliary
Motion map0.10–0.20Similar to camera
All conditions0.05Small but essential for unconditional baseline
Setting pkdrop too high degrades conditional generation quality; setting it too low prevents the unconditional model from being well-calibrated, which weakens guidance.

Remark 58 (Joint versus independent dropout).

The training dropout schedule should be designed so that the model encounters all the conditioning configurations that will be needed at inference time. For the additive multi-condition CFG in (Multi CFG), the model needs to evaluate ϵθ(𝖹t,t,ck) for each k individually, as well as ϵθ(𝖹t,t,). This means the model must see training examples with exactly one condition active. Independent dropout naturally produces such examples, but with probability jkpjdrop(1pkdrop), which may be small for large K. Some training schedules explicitly sample single-condition configurations to ensure adequate coverage.

Dynamic Guidance Schedules

A constant guidance scale throughout the denoising process is suboptimal. Early denoising steps (high noise) determine large-scale structure; late steps (low noise) refine fine details. Applying the same guidance weight at both stages can lead to over-saturation in the details or under-specification of the structure.

Definition 60 (Time-Dependent Guidance Schedule).

A time-dependent guidance schedule replaces the constant weight w with a function w(t):[0,T]0. The guided prediction at time t is (Dynamic CFG)ϵ^θ(𝖹t,t,c)=ϵθ(𝖹t,t,)+w(t)(ϵθ(𝖹t,t,c)ϵθ(𝖹t,t,)). Common schedules include:

  1. Linear decay: w(t)=wmax(t/T), applying strong guidance at high noise and tapering off.

  2. Cosine schedule: w(t)=wmin+(wmaxwmin)cos2(π(Tt)/(2T)), providing a smooth transition.

  3. Step schedule: w(t)=whigh for t>t and w(t)=wlow for tt, with a hard transition at threshold t.

For video, dynamic schedules are particularly important because temporal coherence is primarily established during the early (high-noise) denoising steps, when the model determines the overall motion trajectory and scene layout. Applying strong guidance at these stages can corrupt the motion field by over-emphasising per-frame conditional alignment.

Key Idea.

Guide structure early, refine details late. For video generation, an effective heuristic is to use moderate guidance (w35) during the first half of the denoising trajectory (high noise) and stronger guidance (w69) during the second half (low noise). This allows the model to establish a coherent motion field before sharpening the per-frame details to match the conditioning signal.

Geometric Illustration of CFG

The following diagram illustrates the geometry of multi-condition CFG. The unconditional denoising direction, the text-conditional direction, and the image-conditional direction are vectors in the latent space. CFG forms a weighted combination of the differences between the conditional and unconditional directions.

Geometric illustration of multi-condition classifier-free guidance. The unconditional denoising direction (grey) serves as a baseline. The difference vectors Δtext (blue) and Δimg (green) point from the unconditional prediction toward each conditional prediction. The guided prediction (orange) is the unconditional baseline plus weighted sums of these difference vectors. Larger weights wtext,wimg extend the guided prediction further in each direction.

Negative Prompts and Guidance Rejection

An extension of CFG replaces the unconditional prediction with a negative prompt prediction. Instead of extrapolating away from ϵθ(𝖹t,t,), we extrapolate away from ϵθ(𝖹t,t,cneg), where cneg is a text description of undesired attributes (e.g., “blurry, low quality, jittery motion, deformed hands”).

(Negative Prompt)ϵ^θ=ϵθ(𝖹t,t,cneg)+w(ϵθ(𝖹t,t,c)ϵθ(𝖹t,t,cneg)).

For video, negative prompts are especially useful for suppressing common artefacts such as temporal flickering, morphing faces, and physically implausible motion. The negative prompt effectively steers the denoising trajectory away from the manifold of low-quality videos, complementing the positive guidance that steers toward the desired content.

Exercise 32 (Negative prompt as modified prior).

Show that using a negative prompt cneg in place of the null token in CFG corresponds to sampling from a modified distribution p~(𝖹0|c)p(c|𝖹0)wp(cneg|𝖹0)1wp(𝖹0). Discuss the conditions under which this produces better samples than standard CFG.

Image-to-Video Synthesis

One of the most practically useful modes of video generation is image-to-video (I2V) synthesis: given a single still image, generate a plausible video that “brings the image to life.” The input image provides a strong visual prior (appearance, layout, lighting, identity of objects), and the model must hallucinate coherent motion, camera dynamics, and temporal evolution consistent with both the image and an optional text description.

Image-to-video synthesis is central to creative workflows (animating photographs, concept art, and product images), visual effects (creating establishing shots from matte paintings), and scientific visualisation (simulating dynamics from initial conditions). It is also a stepping stone toward longer video generation, where autoregressive approaches generate each clip conditioned on the last frame of the previous clip.

In this section, we formalise the I2V problem, describe the conditioning mechanisms used by state-of-the-art systems, and analyse how information from the first frame propagates through the network.

Problem Formulation

Definition 61 (Image-to-Video Conditioning).

Let 𝒛01H×W×C be the latent encoding of the first frame (the conditioning image), and let 𝖹02:F=[𝒛02,,𝒛0F] denote the latent codes of the remaining frames. The image-to-video generation task is to sample from the conditional distribution (I2V Distribution)pθ(𝖹02:F|𝒛01,ctext), where ctext is an optional text prompt describing the desired motion and scene dynamics. The first frame 𝒛01 is fixed (given), and frames 2 through F are generated.

The quality of an I2V model is measured along three axes: (i) visual fidelity of each generated frame, (ii) temporal coherence of the motion across frames, and (iii) identity preservation of objects, textures, and lighting established by the conditioning image. The third axis distinguishes I2V from text-to-video: the generated video must look like a natural continuation of the specific input image, not merely a plausible video matching the text description.

Conditioning Mechanisms

There are three principal mechanisms for injecting the first-frame information into the diffusion model: concatenation conditioning, cross-attention conditioning, and hybrid approaches that combine both.

Concatenation conditioning

The most direct approach concatenates the clean first-frame latent with the noised latents of the remaining frames along the channel dimension.

Definition 62 (Concatenation I2V Conditioning).

At each denoising step, construct the augmented input tensor (I2V Concat)𝖹~t=[𝒛01;𝖹t2:F]F×H×W×(C+C), where 𝒛01 is the clean (noise-free) first-frame latent, replicated across the temporal dimension or placed at the first temporal position, and 𝖹t2:F are the noised latents at diffusion time t. The denoiser operates on this augmented tensor: ϵθ(𝖹~t,t,ctext).

An alternative formulation, used by Stable Video Diffusion [8], concatenates the first-frame latent only at the first temporal position: (SVD Concat)𝖹~t=[[𝒛01;𝖹t1];[0;𝖹t2];;[0;𝖹tF]], where 0 is a zero tensor of the same shape as 𝒛01, serving as a placeholder for non-first frames. This approach adds C channels to the first convolutional layer of the denoiser, which must be initialised appropriately (typically with zeros for the additional input channels to preserve the pre-trained weights).

Remark 59 (Why the first frame is noise-free).

A crucial detail in I2V conditioning is that the first-frame latent 𝒛01 is injected without noise, while the remaining frames 𝖹t2:F carry noise at level t. This asymmetry is intentional: the first frame is a known quantity (observed data), not a variable to be denoised. Injecting it without noise provides the denoiser with a clean reference signal at every step of the reverse process, anchoring the generation to the given image.

Cross-attention conditioning

An alternative to concatenation injects the first-frame information through cross-attention layers, analogous to how text embeddings are injected in text-to-image models. The first frame is encoded by a frozen image encoder (e.g., CLIP or DINOv2) to produce a sequence of image tokens 𝑬imgNimg×d, where Nimg is the number of spatial tokens. Each attention layer in the denoiser computes (I2V Crossattn)CrossAttn(𝑸,𝑬img)=softmax(𝑸𝑾Q(𝑬img𝑾K)𝖳d)𝑬img𝑾V, where 𝑸 are queries derived from the noised video latents.

Cross-attention conditioning is more parameter-efficient than concatenation (no additional input channels needed) and allows the model to selectively attend to different parts of the reference image at different frames and layers. However, it provides a more “semantic” representation of the first frame, which may lose fine-grained pixel-level details that concatenation preserves.

Hybrid conditioning

State-of-the-art I2V systems typically combine both mechanisms: concatenation for pixel-level detail and cross-attention for semantic guidance. This hybrid approach, used in systems such as Stable Video Diffusion [8] and DynamiCrafter [68], provides the denoiser with both low-level (exact pixel values of the reference frame) and high-level (semantic features extracted by a vision encoder) information about the conditioning image.

Key Idea.

Dual pathways for image conditioning. The most effective I2V architectures provide two pathways for first-frame information: (1) concatenation of the raw latent codes, which preserves exact pixel-level detail, and (2) cross-attention to image encoder features, which provides semantic and structural context. The concatenation pathway dominates at low noise levels (where fine details matter), while the cross-attention pathway dominates at high noise levels (where global structure is being determined).

Information Propagation from the First Frame

A fundamental question in I2V synthesis is: how does information from the first frame reach distant frames? If the model processes only local temporal neighbourhoods, frame F may receive little influence from frame 1. The answer depends on the architectural choices of the denoiser.

Proposition 31 (First-Frame Information Flow).

Consider a video diffusion transformer with L layers, each containing temporal self-attention with receptive field spanning all F frames. Let af() denote the attention weight that frame f assigns to frame 1 at layer . Under the assumption that attention weights are approximately uniform at initialisation, the cumulative information from frame 1 reaching frame f after L layers satisfies (INFO FLOW Bound)I(f,L)1(11F)L, where I(f,L) is the fraction of frame f's representation that is influenced by frame 1. In particular, for LFlnF, the information flow exceeds 11/F for all frames.

Proof.

At each layer, frame f receives at least a 1/F fraction of information from frame 1 through the uniform attention distribution. The fraction of information that has not been influenced by frame 1 after layers is at most (11/F). Therefore, I(f,L)1(11/F)L. For L=FlnF, we have (11/F)FlnFelnF=1/F, giving I(f,L)11/F.

Remark 60 (Logarithmic depth suffices).

Proposition 31 shows that O(logF) layers of full temporal attention suffice for the first-frame information to reach all frames with high probability. This is a worst-case bound assuming uniform attention. In practice, trained models develop attention patterns that strongly favour the first frame (and temporally adjacent frames), so the effective propagation is much faster.

For models with factored temporal attention (where each temporal attention layer has a limited window of W frames), the information takes O(F/W) layers to propagate, which may require deeper networks. This trade-off between attention window size and network depth is a key architectural consideration in I2V models.

In practice, the attention weights exhibit a characteristic decay pattern: frames closer to the conditioning image attend to it more strongly. Empirical measurements on Stable Video Diffusion show that the average attention weight to the first frame decays approximately as af1/f, with frame 2 attending roughly 5× more strongly to frame 1 than frame 16 does.

State-of-the-Art I2V Systems

We briefly survey three influential I2V systems that illustrate different design choices.

Stable Video Diffusion (SVD).

Blattmann et al. [8] extend the Stable Diffusion image model to video by inserting temporal attention layers between the existing spatial attention layers. The first frame is injected via concatenation conditioning ((SVD Concat)). The model is trained in three stages: (1) image pre-training, (2) video pre-training on a large but noisy dataset, and (3) video fine-tuning on a smaller, high-quality dataset. SVD generates 14–25 frames at 576×1024 resolution and serves as the backbone for many downstream I2V applications.

I2VGen-XL.

Zhang et al. [69] propose a cascaded I2V pipeline with two stages: a base model that generates low-resolution video from the input image, and a refinement model that upsamples to high resolution. The key insight is that the base model focuses on motion generation (getting the dynamics right), while the refinement model focuses on visual quality (sharpening textures and preserving identity). This decomposition allows each stage to be optimised independently.

DynamiCrafter.

Xing et al. [68] take a hybrid conditioning approach, combining concatenation with dual cross-attention to both CLIP image features and text features. A distinguishing feature is the use of a “visual context” module that extracts multi-scale features from the conditioning image and injects them at multiple layers of the denoiser. This provides richer structural information than single-scale cross-attention and helps preserve fine details across long temporal horizons.

I2V Pipeline Diagram

Image-to-video pipeline. The input image is processed through two pathways: the VAE encoder produces a clean latent 𝒛01 for concatenation conditioning, and a vision encoder (CLIP or DINOv2) produces semantic features for cross-attention conditioning. The denoiser (Video DiT or U-Net) processes the concatenated tensor with cross-attention to both image and text features. The VAE decoder maps the denoised latents back to pixel space.

Exercise 33 (I2V training objective).

Write the explicit training loss for an I2V model that uses concatenation conditioning. Starting from the standard video diffusion loss 𝔼t,ϵ,𝖹0ϵϵθ(𝖹t,t,c)2, show how the first-frame conditioning modifies the input to the denoiser. Should the loss include the first frame? Argue that excluding the first frame from the loss computation (since it is given, not generated) is important for training stability.

Exercise 34 (Autoregressive video extension).

Explain how an I2V model can be used autoregressively to generate arbitrarily long videos. Given a video of F frames generated from a conditioning image, describe how to use the last frame (or last few frames) as the conditioning image for the next clip. Discuss the challenges of drift (gradual degradation of quality and divergence from the original content) and propose at least two strategies to mitigate it.

Motion and Camera Control

Text prompts and reference images specify what should appear in a video, but they provide limited control over how the scene moves. A filmmaker does not merely describe “a dog running in a park”; they specify the camera angle, the tracking shot direction, the speed of the zoom, and the trajectory of the subject. This level of control requires conditioning signals that go beyond language and into the domain of geometry and physics.

In this section, we introduce two families of spatial control for video diffusion: camera control, which specifies the viewpoint trajectory, and motion control, which specifies the movement of objects within the scene. We formalise the mathematical representations used for each (Plücker coordinates for cameras, dense flow fields and sparse trajectories for motion) and describe the architectural mechanisms that inject these signals into the diffusion model.

Camera Representations

A camera in 3D space is characterised by its pose: a rotation matrix 𝑹SO(3) and a translation vector 𝒕3. Together, these define the rigid transformation from world coordinates to camera coordinates. For video, we have a sequence of camera poses {(𝑹f,𝒕f)}f=1F, one per frame, defining the camera trajectory.

The intrinsic parameters are captured by the camera matrix 𝑲3×3: (Intrinsic Matrix)𝑲=(fx0cx0fycy001), where (fx,fy) are the focal lengths in pixel units and (cx,cy) is the principal point. For a pixel at coordinates (u,v) in frame f, the corresponding 3D ray direction in world coordinates is (RAY Direction)𝒅f(u,v)=𝑹f𝖳𝑲1(uv1).

While rotations and translations are sufficient to describe camera pose, they are not ideal as conditioning signals for neural networks. Rotations live on the non-Euclidean manifold SO(3), and naively encoding them as 3×3 matrices introduces redundant parameters and discontinuities. Plücker coordinates provide a more natural parameterisation for camera rays.

Definition 63 (Plücker Coordinates for Camera Rays).

A 3D line through the camera centre 𝒕f with direction 𝒅f(u,v) can be represented by its Plücker coordinates (𝒅,𝒎)6, where (Plucker D)𝒅=𝑹f𝖳𝑲1(uv1),𝒎=𝒕f×𝒅, where 𝒅3 is the ray direction in world coordinates and 𝒎3 is the moment of the ray about the origin. The six-dimensional vector (𝒅,𝒎) uniquely represents the ray (up to a positive scale factor) and satisfies the constraint 𝒅𝒎=0.

Remark 61 (Why Plücker coordinates?).

Plücker coordinates offer several advantages over raw camera parameters for neural network conditioning:

  1. Per-pixel representation. Each pixel (u,v,f) in the video maps to a unique 6D Plücker vector, creating a dense conditioning signal of shape F×H×W×6 that aligns naturally with the video tensor.

  2. Continuity. Unlike rotation matrices (which have discontinuities under any 3D parameterisation due to the topology of SO(3)), Plücker coordinates vary smoothly as the camera moves along a smooth trajectory.

  3. Encoding geometry directly. The moment 𝒎=𝒕×𝒅 encodes both the camera position and orientation in a single vector, making it easy for the network to reason about parallax and depth.

The Plücker ray map for an entire video is a tensor 𝖯F×H×W×6, where the entry at (f,h,w) contains the 6D Plücker coordinates of the ray from the f-th camera through pixel (h,w). This tensor can be precomputed from the camera trajectory and intrinsics before generation begins.

Camera-Conditioned Diffusion

Definition 64 (Camera-Conditioned Diffusion).

A camera-conditioned video diffusion model takes as input the noised video latent 𝖹t, the diffusion timestep t, and the camera trajectory {(𝑹f,𝒕f)}f=1F, and predicts the noise: (CAM COND)ϵ^=ϵθ(𝖹t,t,{(𝑹f,𝒕f)}f=1F). The camera trajectory is injected into the model via one of the following mechanisms:

  1. Plücker ray concatenation: Compute the Plücker ray map 𝖯F×H×W×6 and concatenate it with the noised latent along the channel dimension: 𝖹~t=[𝖹t;𝖯].

  2. Camera embedding addition: Encode each frame's pose (𝑹f,𝒕f) into a d-dimensional vector via an MLP: 𝒆fcam=MLP(flatten(𝑹f,𝒕f)), and add it to the timestep embedding or to the input of each temporal attention layer.

  3. Camera ControlNet: Process the Plücker ray map through a parallel encoder network and inject the features into the main denoiser via zero-convolution (see Video ControlNet).

Example 42 (CameraCtrl).

CameraCtrl [34] adopts the Plücker ray concatenation approach. For each frame f, the Plücker ray map is downsampled to match the spatial resolution of the latent space (H×W) and concatenated with the latent along the channel dimension. The first convolutional layer is expanded from C input channels to C+6 channels, with the additional weights initialised to zero so that the pre-trained model is preserved at the start of fine-tuning.

Empirically, CameraCtrl achieves precise camera trajectory control (rotation error <2°, translation error <5% of scene scale) while maintaining the visual quality of the base video diffusion model.

Camera Ray Diagram

Camera ray parameterisation using Plücker coordinates. The camera centre 𝒕f emits a ray through pixel (u,v) on the image plane. The ray direction 𝒅 (green) is computed from the camera rotation and intrinsics. The moment vector 𝒎=𝒕f×𝒅 (purple) encodes the spatial relationship between the ray and the world origin. Together, (𝒅,𝒎) forms a 6D representation of the ray.

Motion Control via Trajectories and Flow

Camera control specifies how the viewpoint moves; motion control specifies how objects within the scene move. There are two principal representations for motion conditioning: sparse trajectories (a small number of control points with specified 2D paths) and dense optical flow (a per-pixel displacement field).

Sparse trajectory conditioning

A sparse trajectory specifies the motion of N control points across F frames: (Sparse TRAJ)𝒯={(unf,vnf)}n=1,,Nf=1,,F, where (unf,vnf) is the 2D position of control point n in frame f. The user specifies these trajectories (e.g., by drawing arrows on the first frame), and the model generates video where the corresponding image regions follow the specified paths.

DragNUWA [36] encodes sparse trajectories as a sequence of Gaussian heatmaps centred at each control point, producing a conditioning tensor of shape F×H×W×N. Each channel corresponds to one control point, with the heatmap peak indicating the desired position at each frame.

Dense flow conditioning

Dense flow conditioning provides a per-pixel motion specification. The conditioning signal is an optical flow field 𝑭ff+1H×W×2 for each consecutive pair of frames, specifying the 2D displacement (Δu,Δv) of each pixel from frame f to frame f+1. This is the richest possible motion specification but requires the user (or an upstream motion planning module) to provide detailed per-pixel flow, which is rarely available in practice.

Remark 62 (Motion from language).

A middle ground between sparse user-specified trajectories and dense optical flow is to infer motion from the text prompt. Systems such as MotionCtrl [35] use a motion planner module (often an LLM or a specialised motion prediction network) to convert textual motion descriptions (“the ball rolls from left to right”) into trajectory or flow representations that condition the diffusion model. This bridges the gap between the ease of text input and the precision of geometric control.

Video ControlNet

ControlNet [70] is the dominant architecture for injecting structured spatial control into diffusion models. Originally designed for images (conditioning on edges, depth maps, pose skeletons), it extends naturally to video by processing spatiotemporal control signals.

Definition 65 (Video ControlNet).

Let ϵθ be a pre-trained video diffusion model (the base model) with encoder blocks producing intermediate features {𝒉ibase}i=1M. A Video ControlNet consists of a parallel encoder ϕ (a trainable copy of the base encoder) that processes the control signal 𝒄control and produces features {𝒉ictrl}i=1M. The features are combined via zero-convolution layers: (Controlnet)𝒉iout=𝒉ibase+ZeroConvi(ϕ(𝒄control)i), where ZeroConvi is a 1×1 convolution (or, for video, a 1×1×1 convolution) initialised with all weights and biases set to zero: (ZERO INIT)𝑾ZeroConv=0,𝒃ZeroConv=0.

The zero initialisation is the key design principle of ControlNet. At the start of training, the zero-convolution layers output exactly 0, so the combined features 𝒉iout=𝒉ibase and the model behaves identically to the pre-trained base model. As training progresses, the zero-convolution weights grow from zero, gradually introducing the control signal without disrupting the learned representations.

Insight.

Zero-convolution as controlled initialisation. The zero-convolution trick solves the “cold start” problem in fine-tuning: how to add new conditioning pathways to a pre-trained model without destroying its existing capabilities. By starting the control pathway at zero, training begins from the exact output distribution of the pre-trained model, and the control signal is introduced as a gentle perturbation that grows as the model learns to use it. This is far more stable than random initialisation of the control pathway, which would produce large, unstructured perturbations to the base model's features.

Proposition 32 (Training Stability of Zero-Convolution).

Let 0 be the training loss of the base model (without control input) and let (ϕ,{𝑾i,𝒃i}) be the loss with ControlNet parameters ϕ and zero-convolution parameters {𝑾i,𝒃i}. At initialisation (𝑾i=0, 𝒃i=0), (ZERO CONV INIT LOSS)(ϕ,{0,0})=0, and the gradient with respect to the zero-convolution parameters is (ZERO CONV GRAD)𝑾i|𝑾i=0=(𝒉iout)𝖳𝒉ictrl, which is bounded by 𝑾i/𝒉iout𝒉ictrl. This shows that the initial gradient signal is proportional to the product of the base model's sensitivity and the control encoder's output, providing a natural scaling that prevents large initial perturbations.

Proof.

At 𝑾i=0 and 𝒃i=0, the zero-convolution outputs ZeroConvi(𝒉ictrl)=0, so 𝒉iout=𝒉ibase and =0. The gradient follows from the chain rule: 𝑾i=(/𝒉iout)𝖳(ZeroConvi/𝑾i). For a linear map ZeroConvi(𝒉)=𝑾i𝒉+𝒃i, the derivative (𝑾i𝒉)/𝑾i evaluated at input 𝒉ictrl gives the outer product, yielding (ZERO CONV GRAD). The bound follows from the submultiplicativity of the Frobenius norm.

ControlNet Architecture Diagram

Video ControlNet architecture. The base model (left, blue, frozen) processes the noised video latent 𝖹t. The parallel ControlNet encoder (right, green, trainable) processes the control signal 𝒄control (e.g., Plücker ray maps, depth maps, edge maps, or pose skeletons). Zero-convolution layers (amber) inject the control features into the base model's decoder blocks. At initialisation, all zero-convolutions output zero, preserving the pre-trained model's behaviour.

Types of Motion and Camera Control

We summarise the principal forms of spatial control for video diffusion and the systems that implement them.

llll@ Control TypeRepresentationInjectionSystem
Camera trajectoryPlücker raysConcatenation / ControlNetCameraCtrl [34]
Camera + object motionPose + flowDual ControlNetMotionCtrl [35]
Drag-based motionSparse trajectoriesHeatmap encodingDragNUWA [36]
Character animationPose skeletonReference attentionAnimateAnyone [37]
Motion patternsLearned motion LoRAAdapter injectionAnimateDiff [38]
Taxonomy of motion and camera control approaches for video diffusion models.
MotionCtrl.

Wang et al. [35] propose a unified controller that handles both camera motion and object motion. Camera motion is encoded as per-frame pose embeddings added to the temporal attention layers. Object motion is encoded as sparse trajectory maps processed by a lightweight convolutional encoder. The two motion types are disentangled during training by alternating between camera-motion and object-motion supervision, allowing independent control at inference time.

AnimateAnyone.

Hu et al. [37] address the specific problem of character animation: given a single image of a person and a sequence of target body poses (represented as OpenPose skeletons), generate a video of that person performing the corresponding motion. The architecture uses a reference attention mechanism, where features from the reference image are injected into the temporal attention layers of the denoiser to preserve the identity and appearance of the subject.

Caution.

Motion control can conflict with text guidance. When both text prompts and explicit motion specifications (camera trajectories, sparse drags) are provided, they may specify conflicting dynamics. For example, the text “the camera pans slowly to the left” conflicts with a camera trajectory that moves right. In such cases, the model must resolve the conflict, and the result depends on the relative guidance weights. Practical systems typically give priority to explicit geometric control over textual descriptions, since geometric specifications are more precise and less ambiguous. Users should be warned to ensure consistency between text and motion inputs.

Mathematical Properties of Plücker Conditioning

We conclude the discussion of camera control with a proposition relating Plücker conditioning to the underlying 3D geometry.

Proposition 33 (Epipolar Constraint from Plücker Coordinates).

Let (𝒅1,𝒎1) and (𝒅2,𝒎2) be the Plücker coordinates of two rays from cameras at positions 𝒕1 and 𝒕2 respectively. The rays intersect (i.e., correspond to the same 3D point) if and only if the reciprocal product vanishes: (Reciprocal Product)𝒅1𝒎2+𝒅2𝒎1=0. This condition is equivalent to the classical epipolar constraint 𝒑2𝖳𝑭𝒑1=0, where 𝑭 is the fundamental matrix and 𝒑1,𝒑2 are the corresponding pixel coordinates.

Proof.

Let 𝒓(s)=𝒕1+s𝒅1 parameterise the first ray and 𝒓(s)=𝒕2+s𝒅2 the second. The rays intersect when 𝒕1+s𝒅1=𝒕2+s𝒅2 for some s,s. This system has a solution if and only if the vectors 𝒅1, 𝒅2, and 𝒕2𝒕1 are coplanar, which is equivalent to (𝒕2𝒕1)(𝒅1×𝒅2)=0. Expanding the moments 𝒎1=𝒕1×𝒅1 and 𝒎2=𝒕2×𝒅2, and using the vector identity 𝒂(𝒃×𝒄)=(𝒂×𝒃)𝒄, one can show that 𝒅1𝒎2+𝒅2𝒎1=(𝒕2𝒕1)(𝒅1×𝒅2), from which (Reciprocal Product) follows. The equivalence to the fundamental matrix constraint is a standard result in multi-view geometry.

This proposition explains why Plücker coordinates are effective for camera conditioning: the network can learn to enforce multi-view consistency by learning functions of the reciprocal product, which directly encodes the geometric relationship between rays across frames.

Exercise 35 (Plücker coordinates for zoom).

Consider a camera that zooms in by changing its focal length from f1 to f2>f1 while keeping the camera position and orientation fixed (𝑹f=𝑰, 𝒕f=0 for all f). Derive the Plücker coordinates for a pixel (u,v) as a function of the focal length. Show that the moment vector 𝒎=0 for all rays (since the camera is at the origin), and the direction vectors change as 𝒅(u/f,v/f,1). Explain how this representation allows the diffusion model to distinguish between zoom and dolly-in (where the camera physically moves forward).

Exercise 36 (Multi-control ControlNet).

Design a ControlNet architecture that simultaneously handles camera control (Plücker rays), depth maps, and edge maps for video diffusion. Discuss two approaches: (a) concatenating all control signals into a single tensor and using one ControlNet, versus (b) using separate ControlNets for each signal and summing their zero-convolution outputs. Analyse the parameter counts and training complexity of each approach.

Text-to-Video with Prompt Enhancement

The preceding sections have examined individual components of video generation systems: autoencoders, diffusion architectures, conditioning mechanisms, and control signals. In this section, we assemble these components into a complete text-to-video (T2V) pipeline and address a critical but often overlooked step: prompt enhancement, the process of transforming a user's terse text input into a detailed description that maximises the quality and specificity of the generated video.

The Full T2V Pipeline

A modern text-to-video system comprises five stages, illustrated in fig:vdiff:t2v-pipeline:

  1. Prompt enhancement: An LLM rewrites the user's terse prompt into a detailed description specifying visual elements, motion dynamics, camera behaviour, and scene composition.

  2. Text encoding: The enhanced prompt is encoded by one or more text encoders (T5 for semantic features, CLIP for vision-aligned features) to produce conditioning embeddings.

  3. Latent diffusion: A video DiT generates latent video frames by iteratively denoising in the latent space of the video autoencoder, conditioned on the text embeddings.

  4. Latent decoding: The video VAE decoder maps the denoised latent tensor to pixel-space video frames.

  5. Post-processing: Optional upsampling, frame interpolation, and quality enhancement produce the final output.

Prompt Enhancement with LLMs

Users rarely provide the level of detail that a video diffusion model needs to produce high-quality output. A typical user prompt might be “a cat playing with yarn,” while the model performs best with detailed descriptions such as “A fluffy orange tabby cat sits on a sunlit hardwood floor, batting at a ball of red yarn with its right paw. The yarn unravels slowly as the cat pulls it. Warm afternoon light streams through a window on the left side of the frame. The camera is stationary, framing the scene at eye level with a shallow depth of field.”

Definition 66 (Prompt Enhancement).

Let cuser be the user's original text prompt and let be a prompt rewriting function (typically implemented by an LLM). The enhanced prompt is (Prompt Enhance)cenhanced=(cuser), where is trained or prompted to produce descriptions that are:

  1. Visually specific: describing colours, textures, lighting, and spatial arrangement.

  2. Temporally structured: specifying the sequence of actions and events in the video.

  3. Cinematographically aware: indicating camera angle, movement, and framing.

  4. Consistent: maintaining a single coherent scene without contradictions.

Example 43 (Prompt enhancement in Sora).

OpenAI's Sora system [6] uses GPT-4 as its prompt rewriting engine. Before passing the text to the video diffusion model, GPT-4 expands the user prompt by adding:

  • Detailed visual descriptions (lighting, colour palette, textures).

  • Camera specifications (angle, movement type, speed).

  • Temporal structure (beginning, middle, and end of the action).

  • Negative constraints (what should not appear in the video).

This rewriting step dramatically improves video quality and text-video alignment, at the modest cost of one LLM inference call per generation request.

Remark 63 (Prompt Enhancement as Information Gain).

From an information-theoretic perspective, prompt enhancement reduces the conditional entropy of the generated video given the text description: (Prompt Entropy)𝖧(𝖹0|cenhanced)𝖧(𝖹0|cuser), where the inequality holds because cenhanced is a deterministic function of cuser augmented with prior knowledge from the LLM. The information gain is (Prompt INFO GAIN)ΔI=𝖧(𝖹0|cuser)𝖧(𝖹0|cenhanced), which quantifies how much additional information the enhanced prompt provides about the desired output. This gain comes not from the user but from the LLM's world knowledge, which fills in details that the user left unspecified.

Importantly, this reduction in entropy does not always improve subjective quality: if the LLM's “hallucinated” details conflict with the user's intent, the generated video may be technically more constrained but semantically wrong. The quality of prompt enhancement therefore depends critically on the LLM's ability to infer the user's likely intent from a terse description.

Dual Text Encoding

State-of-the-art T2V models use two text encoders simultaneously, each capturing different aspects of the text semantics.

Definition 67 (Dual Text Encoding).

Let T5:StringL1×d1 be a T5 text encoder [39] and CLIP:StringL2×d2 be a CLIP text encoder [40]. The dual text embedding of prompt c is the concatenation (DUAL Encoding)𝒄=[𝒄T5;𝒄CLIP]=[T5(c);CLIP(c)], where the concatenation is along the sequence dimension after projecting both embeddings to a common feature dimension d via learned linear projections.

The rationale for dual encoding is that the two encoders provide complementary information:

  • T5 [39] is a large language model trained on text-only data. It excels at capturing fine-grained semantic meaning, compositional structure, and long-range dependencies in the text. T5 embeddings are rich in linguistic information: word order, syntactic relationships, and semantic nuances.

  • CLIP [40] is a vision-language model trained on image-text pairs. Its text encoder produces embeddings that are aligned with visual features, making them particularly useful for specifying visual appearance. CLIP embeddings are rich in visual information: colour, texture, spatial layout, and stylistic attributes.

Example 44 (Dual encoding in CogVideoX).

CogVideoX [17] uses a T5-XXL encoder (4.3B parameters) as its primary text encoder, producing sequence embeddings that are injected into the DiT via cross-attention. A CLIP-L encoder provides a global text embedding that is added to the timestep embedding. This combination allows the model to use T5's rich sequential features for detailed spatial composition while using CLIP's global feature for overall style and semantic alignment.

Example 45 (Triple encoding in Movie Gen).

Meta's Movie Gen [33] extends the dual encoding paradigm to three encoders: T5 for language semantics, CLIP for vision-language alignment, and a custom “UL2” encoder fine-tuned on video-caption pairs. The third encoder captures temporal semantics (descriptions of motion, events, and narrative structure) that neither T5 nor CLIP is specifically trained for.

Remark 64 (Encoding the enhanced prompt).

Prompt enhancement interacts non-trivially with dual text encoding. The enhanced prompt is typically longer than the original (50–200 tokens vs. 5–20 tokens), which means:

  1. T5 benefits from longer prompts because its autoregressive architecture naturally handles long sequences, and more tokens provide more detailed conditioning.

  2. CLIP, which was trained on short captions (77 tokens for CLIP-L), may truncate or poorly encode long enhanced prompts. Some systems apply a separate summarisation step to produce a short CLIP-compatible version of the prompt.

This asymmetry is another reason for using dual encoding: T5 receives the full enhanced prompt, while CLIP receives either the original short prompt or a summary.

T2V Pipeline Diagram

Complete text-to-video pipeline. Stage 1: an LLM rewrites the user's terse prompt into a detailed description. Stage 2: dual text encoders (T5 and CLIP) produce complementary embeddings. Stage 3: a Video DiT iteratively denoises the latent tensor, conditioned on the text embeddings via cross-attention. Stage 4: the VAE decoder maps denoised latents to pixel-space video.

System-Level Considerations

We briefly discuss design choices made by three influential T2V systems.

Sora.

OpenAI's Sora [6] frames video generation as “world simulation,” emphasising that the model should learn physical laws, object permanence, and 3D consistency from data alone, without explicit physics engines. Sora uses a spacetime patches approach, processing the video as a sequence of 3D patches that are fed to a DiT. The prompt enhancement step (using GPT-4) is a critical component, transforming user queries into detailed scene descriptions that guide the model's internal world simulation.

CogVideoX.

CogVideoX [17] introduces an “expert transformer” architecture that processes text tokens and video tokens in separate streams before merging them through cross-expert attention layers. This design reduces the computational cost of joint text-video attention (which would be quadratic in the combined sequence length) while still allowing rich interaction between the two modalities. CogVideoX also employs progressive training: starting with short, low-resolution videos and gradually increasing both duration and resolution.

Movie Gen.

Movie Gen [33] is designed as a “cast of foundation models,” where different components (video generation, audio generation, editing) are implemented as separate models that share a common architecture and training paradigm. The video generation component uses a 30B-parameter transformer trained on a mixture of image and video data, with the data mixing ratio carefully tuned to balance per-frame quality against temporal coherence.

Key Idea.

The complete T2V system is more than the diffusion model. While the diffusion model is the core generative engine, the overall quality of a T2V system depends critically on auxiliary components: the prompt rewriter (which determines the quality of the conditioning signal), the text encoders (which determine how faithfully the conditioning is represented), the VAE (which determines the ceiling of visual quality), and the post-processing pipeline (which handles upsampling and artefact correction). Improving any of these components can yield quality gains comparable to improving the diffusion model itself.

Exercise 37 (Prompt enhancement evaluation).

Design an experiment to measure the effectiveness of prompt enhancement. Given a set of N user prompts, generate videos using both the original prompts and LLM-enhanced prompts. Propose at least three evaluation metrics (both automated and human) and discuss potential confounds (e.g., the enhanced prompt may be “better” not because of additional detail but because it aligns more closely with the training data distribution).

Exercise 38 (T5 vs. CLIP encoding).

Consider a video diffusion model trained with dual T5+CLIP encoding. Describe an ablation experiment to measure the contribution of each encoder. What do you expect to happen when you: (a) replace the T5 embedding with zeros (CLIP-only)? (b) replace the CLIP embedding with zeros (T5-only)? (c) use two copies of the same encoder? Relate your predictions to the different training data and objectives of T5 and CLIP.

Personalisation and Adaptation

A pre-trained video diffusion model captures the distribution of generic videos seen during training. For many applications, however, we want to generate videos featuring specific subjects (a particular person, pet, product, or scene), specific visual styles (anime, watercolour, cinematic noir), or specific motion patterns (a characteristic dance move, a recurring camera technique). Personalisation adapts a pre-trained model to these specific requirements using a small amount of reference data, typically a few images or short video clips.

The central challenge is efficiency: a state-of-the-art video diffusion model may have 5–30 billion parameters. Full fine-tuning on a few reference examples is (i) computationally expensive, (ii) prone to catastrophic forgetting of the model's general capabilities, and (iii) prone to overfitting to the small reference set. Low-rank adaptation (LoRA) addresses all three issues by restricting the parameter update to a low-dimensional subspace.

Low-Rank Adaptation (LoRA)

Definition 68 (Low-Rank Adaptation).

Let 𝑾dout×din be a pre-trained weight matrix in the diffusion model (e.g., a linear projection in an attention layer). Low-Rank Adaptation (LoRA) [41] replaces 𝑾 with (LORA)𝑾=𝑾+Δ𝑾=𝑾+𝑨𝑩, where 𝑨dout×r and 𝑩r×din are trainable low-rank matrices with rank rmin(dout,din). The pre-trained weight 𝑾 is frozen; only 𝑨 and 𝑩 are updated during fine-tuning.

The key insight is that the weight update Δ𝑾=𝑨𝑩 is constrained to the set of rank-r matrices. If the task-specific adaptation requires changes that are approximately low-rank (which empirical evidence strongly suggests), LoRA can capture these changes with far fewer parameters than full fine-tuning.

Proposition 34 (LoRA Parameter Count).

For a video DiT with Lattn attention layers, each containing Nproj linear projections of dimension d, the total number of LoRA parameters is (LORA Param Count)|Δθ|=2rdNprojLattn, where the factor 2 accounts for both 𝑨 and 𝑩. For a typical configuration (d=4096, r=16, Nproj=4 projections per layer for 𝑸, 𝑲, 𝑽, and output, Lattn=32 layers), this gives (LORA Param Example)|Δθ|=2×16×4096×4×32=16,777,21616.8M parameters, which is roughly 0.1%0.5% of the total parameters in a 5B–15B parameter model.

Remark 65 (LoRA initialisation).

Following [41], 𝑨 is initialised with a random Gaussian distribution and 𝑩 is initialised to zero, so that Δ𝑾=𝑨𝑩=0 at the start of training. This ensures that the adapted model begins at the exact pre-trained model, analogous to the zero-convolution initialisation in ControlNet (Video ControlNet). Training then gradually learns the low-rank update that adapts the model to the target domain.

An alternative initialisation uses 𝑨=0 and random 𝑩; both yield Δ𝑾=0 initially, but the asymmetric choice 𝑨Normal(0,σ2𝑰), 𝑩=0 is more common because it breaks the symmetry between rows and columns of Δ𝑾 from the first gradient step.

Approximation Quality of LoRA

How well can a rank-r update approximate the optimal full-rank adaptation? The following proposition provides a bound.

Proposition 35 (Rank-Constrained Adaptation Bound).

Let 𝑾 be the optimal weight matrix obtained by full fine-tuning, and let 𝑾=𝑾+𝑨𝑩 be the LoRA-adapted weight with rank r. The optimal rank-r approximation to the full update Δ𝑾=𝑾𝑾 satisfies (LORA Eckart Young)min𝑨,𝑩𝑾𝑾F=minrank(𝑴)r𝑴Δ𝑾F=i=r+1min(dout,din)σi(Δ𝑾)2, where σ1(Δ𝑾)σ2(Δ𝑾) are the singular values of Δ𝑾 in decreasing order. In particular, if σr+1(Δ𝑾)=0 (i.e., the optimal update is exactly rank r), then LoRA achieves zero approximation error.

Proof.

This is a direct application of the Eckart–Young–Mirsky theorem. The optimal rank-r approximation to any matrix 𝑴 in the Frobenius norm is obtained by truncating its singular value decomposition to the top r singular values. Setting 𝑴=Δ𝑾=𝑾𝑾 and noting that 𝑨𝑩 is rank at most r, the result follows.

Insight.

LoRA works because adaptations are approximately low-rank. Empirical studies consistently show that the weight updates learned during fine-tuning of diffusion models have rapidly decaying singular value spectra. For a 4096-dimensional attention projection, the top r=16 singular values typically capture over 90% of the Frobenius norm of Δ𝑾. This means that the residual error in (LORA Eckart Young) is small, and rank-16 LoRA provides a near-lossless approximation to full fine-tuning.

This low-rank structure arises because personalisation typically requires changes to a small number of “directions” in weight space: the model needs to learn a new face, a new style, or a new motion pattern, each of which corresponds to a low-dimensional subspace of the full parameter space.

LoRA for Video DiT

Applying LoRA to a video diffusion transformer requires choosing which layers to adapt and with what rank. The design space includes:

  1. Spatial attention: Adapting the spatial self-attention projections (𝑸, 𝑲, 𝑽, output) changes the model's visual features: how it represents textures, shapes, and object appearances. This is the most important target for subject personalisation (learning a specific face or object).

  2. Temporal attention: Adapting the temporal self-attention projections changes the model's motion dynamics: how objects move, how scenes evolve, and what temporal patterns are generated. This is the primary target for motion personalisation (learning a specific dance move or camera technique).

  3. Cross-attention: Adapting the cross-attention projections (where text embeddings interact with visual features) changes the model's text-visual alignment: how it maps words to visual concepts. This is useful for learning new vocabulary (associating a trigger word with a specific subject or style).

  4. Feed-forward layers: Adapting the MLP layers changes the model's non-linear feature transformations. This is less commonly targeted by LoRA in video diffusion but can be useful for style adaptation.

Example 46 (AnimateDiff: Motion LoRA).

Guo et al. [38] demonstrate a compelling application of LoRA for video personalisation. Starting from a pre-trained text-to-image model, they insert temporal attention layers (a “motion module”) and train them on video data while keeping the spatial layers frozen. The motion module can be viewed as a LoRA-like adapter that adds temporal capabilities to an image-only model.

Once trained, different motion modules can be swapped in and out to change the motion style without affecting the visual style. Furthermore, the motion module can be combined with any personalised text-to-image model (e.g., a DreamBooth model of a specific person), enabling the generation of personalised videos with custom motion patterns. This factorisation of visual appearance and motion dynamics is a powerful design principle.

DreamBooth for Video

DreamBooth [71] fine-tunes a diffusion model on a small set of images (3–5) of a specific subject, associating it with a unique identifier token (e.g., “a photo of [V] dog”). The key insight is the prior preservation loss, which ensures that the model retains its general capabilities while learning the new subject.

Definition 69 (DreamBooth Loss for Video).

Let {𝖷i}i=1N be a small set of reference videos (or images) of the target subject, and let c=“a video of [V]  be the corresponding prompts with the unique identifier token [V]. The DreamBooth loss for video is (Dreambooth LOSS)DB=𝔼t,ϵ,𝖹0(𝖷i)ϵϵθ(𝖹t,t,c)2subject reconstruction+λ𝔼t,ϵ,𝖹0ppriorϵϵθ(𝖹t,t,cclass)2prior preservation, where cclass=“a video of a dog  is a class-level prompt (without the identifier token), pprior is the distribution of class-level videos generated by the pre-trained model, and λ>0 controls the strength of prior preservation.

The prior preservation term prevents the model from “forgetting” the general concept of “dog” while it learns the specific appearance of the subject. Without it, the model would collapse: all dogs would look like the specific subject, and the trigger token “[V]” would become synonymous with the class label.

Remark 66 (DreamBooth + LoRA).

In practice, DreamBooth for video is almost always combined with LoRA rather than full fine-tuning. This combination offers the best of both worlds: DreamBooth's ability to learn new subjects from a few examples, and LoRA's parameter efficiency and resistance to overfitting. The resulting “DreamBooth-LoRA” adapters are small files (typically 10–100 MB) that can be shared, swapped, and composed.

Composing Adapters

A powerful feature of LoRA-based personalisation is the ability to compose multiple adapters. If adapter 1 contributes Δ𝑾1=𝑨1𝑩1 and adapter 2 contributes Δ𝑾2=𝑨2𝑩2, the composed model uses (LORA Compose)𝑾=𝑾+α1𝑨1𝑩1+α2𝑨2𝑩2, where α1,α2[0,1] are blending weights. This allows, for example, combining a subject adapter (to generate a specific person) with a style adapter (to render in a specific artistic style) and a motion adapter (to specify a particular motion pattern).

Caution.

Adapter composition is not guaranteed to work. The additivity assumption in (LORA Compose) is a linear approximation. When the two adapters modify overlapping subspaces of the weight matrix, their effects can interfere destructively. Empirically, composition works well when the adapters target different aspects of the model (e.g., spatial attention for appearance and temporal attention for motion) but can produce artefacts when both adapters modify the same layers. Reducing the blending weights α1,α2 mitigates interference at the cost of weaker adaptation effects.

Proposition 36 (Rank of Composed Adapters).

The composed weight update Δ𝑾=α1𝑨1𝑩1+α2𝑨2𝑩2 has rank at most r1+r2, where r1 and r2 are the ranks of the individual adapters. If the column spaces of 𝑨1 and 𝑨2 are orthogonal, the rank equals exactly r1+r2. If the column spaces overlap, the rank may be lower.

Proof.

Write Δ𝑾=[α1𝑨1α2𝑨2][𝑩1𝑩2]. The left factor has r1+r2 columns and the right factor has r1+r2 rows, so rank(Δ𝑾)r1+r2. When colspan(𝑨1)colspan(𝑨2)={0}, the left factor has full column rank r1+r2, so the rank equals min(r1+r2,rank(𝑩)), which is r1+r2 generically.

Quantised LoRA (QLoRA)

For very large video diffusion models, even loading the pre-trained weights into GPU memory can be challenging. QLoRA [72] addresses this by quantising the frozen base weights to 4-bit precision while keeping the LoRA adapter weights in full precision (16-bit or 32-bit).

Definition 70 (Quantised LoRA).

Let 𝑾dout×din be the pre-trained weight matrix. QLoRA replaces the forward pass with (Qlora)𝒚=Dequant(𝑾(4))𝒙+𝑨𝑩𝒙, where 𝑾(4) is the 4-bit quantised version of 𝑾, Dequant() restores it to the computation dtype (BFloat16), and 𝑨,𝑩 are the full-precision LoRA matrices. The quantisation error 𝑾Dequant(𝑾(4)) is partially compensated by the LoRA update 𝑨𝑩 during fine-tuning.

Example 47 (Memory savings with QLoRA).

Consider a 15B-parameter video DiT:

MethodBase Model MemoryTotal Memory
Full fine-tuning (FP16)30 GB90+ GB
LoRA (FP16 base)30 GB31 GB
QLoRA (4-bit base)7.5 GB8.5 GB
QLoRA reduces the memory required to fine-tune a 15B model from 90+ GB (which requires multiple A100 GPUs) to 8.5 GB (which fits on a single consumer GPU with 10 GB VRAM). This democratisation of fine-tuning is particularly impactful for video diffusion, where the models are among the largest in generative AI.

Practical Considerations

We conclude with practical guidelines for personalising video diffusion models.

  1. Rank selection: The rank r controls the trade-off between expressiveness and efficiency. For subject personalisation, r=832 is typical; for style transfer, r=416 often suffices; for complex motion patterns, r=1664 may be needed. A useful diagnostic is to plot the singular value spectrum of the learned Δ𝑾 after training: if the smallest singular values are near zero, the rank is too high (wasting parameters); if they are large, the rank may be too low.

  2. Learning rate: LoRA fine-tuning typically uses learning rates 10× to 100× higher than full fine-tuning because the gradient signal must be “concentrated” into a much smaller parameter subspace. Common values are 1×104 to 5×104 for LoRA versus 1×106 to 5×106 for full fine-tuning.

  3. Training duration: Overfitting is the primary risk when personalising on a small dataset. For subject personalisation with 3–5 reference images, 500–2000 training steps are typical. For motion personalisation from short video clips, 1000–5000 steps are common. Early stopping based on a held-out validation metric (e.g., CLIP similarity to the reference) is recommended.

  4. Regularisation: Beyond the DreamBooth prior preservation loss, additional regularisation strategies include: itemize

  5. Weight decay on the LoRA parameters.

  6. Gradient clipping to prevent sudden large updates.

  7. Augmenting the reference data with random crops, colour jitter, and temporal shifts. itemize

  8. Which layers to adapt: Not all layers contribute equally to personalisation. Attention projections in the middle layers of the transformer are most important for both subject and style adaptation; early and late layers contribute less. Adapting only the middle 50% of layers can reduce the adapter size by half with minimal quality loss.

Algorithm 6 (LoRA Fine-Tuning for Video Personalisation).

  1. Input: Pre-trained video DiT ϵθ, reference data {(𝖷i,ci)}i=1N, rank r, learning rate η, training steps S.

  2. Initialise: For each target layer , create 𝑨()Normal(0,σ2𝑰) and 𝑩()=0.

  3. For s=1,,S: enumerate[(a)]

  4. Sample a reference example (𝖷,c) and noise ϵNormal(0,𝑰), tUniform(1,T).

  5. Encode: 𝖹0=(𝖷).

  6. Noise: 𝖹t=αt𝖹0+1αtϵ.

  7. Predict: ϵ^=ϵθ(𝖹t,t,c) using 𝑾()+𝑨()𝑩() for adapted layers.

  8. Loss: =ϵϵ^2.

  9. Update: 𝑨(),𝑩()𝑨(),𝑩()η (only LoRA parameters). enumerate

  10. Output: Adapter weights {(𝑨(),𝑩())}.

Summary and Forward Pointers

This section has covered the core techniques for adapting pre-trained video diffusion models to specific subjects, styles, and motion patterns. LoRA provides a parameter-efficient mechanism for adaptation, with theoretical guarantees on approximation quality (Proposition 35) and practical recipes for rank selection, learning rate tuning, and regularisation. DreamBooth extends the paradigm to subject-driven generation with prior preservation. Adapter composition enables combining multiple adaptations without retraining.

In File F, we turn to the training methodologies and scaling laws that govern how these video diffusion models are trained from scratch: data curation, progressive training schedules, mixed image-video training, and the computational infrastructure required for training at scale. The personalisation techniques developed in this section complement the pre-training strategies of File F: pre-training establishes the broad distribution, while personalisation fine-tunes it to specific requirements.

Exercise 39 (LoRA rank analysis).

Train a LoRA adapter for a video diffusion model at ranks r{1,4,8,16,32,64,128}. For each rank, compute: (a) the training loss, (b) the FVD (Fréchet Video Distance) of generated samples, (c) the CLIP similarity to the reference subject. Plot all three metrics as a function of r. At what rank does performance plateau? How does this relate to the singular value spectrum of the learned Δ𝑾?

Exercise 40 (Temporal vs. spatial LoRA).

Design an experiment to compare adapting only spatial attention layers versus only temporal attention layers versus both. Use a character animation task (given reference images of a person, generate video of them performing a specific action). Predict which configuration will produce: (a) the best identity preservation, (b) the best motion quality, (c) the best overall video quality. Justify your predictions using the analysis of spatial versus temporal attention from earlier sections.

Exercise 41 (Adapter interference).

Given two independently trained LoRA adapters Δ𝑾1=𝑨1𝑩1 and Δ𝑾2=𝑨2𝑩2, define a measure of “interference” between them. One candidate is cos(vec(Δ𝑾1),vec(Δ𝑾2)), the cosine similarity between the vectorised weight updates. Another is the overlap between the column spaces of 𝑨1 and 𝑨2. Discuss the pros and cons of each measure. How would you use such a measure to predict whether two adapters will compose well?

Long Video Generation

The video diffusion models we have studied so far generate clips of fixed, modest duration: typically 2 to 10 seconds, corresponding to 16 to 240 frames depending on the frame rate. This window is dictated by the model's temporal attention span and by the memory required to process the full latent tensor during training. Yet the videos people actually want to create, a product demonstration, a short film, a gameplay walkthrough, span minutes or hours. Bridging the gap between a model's native generation window and the durations demanded by real applications is one of the central open problems in video generation.

The difficulty is not merely computational. Even if we had unlimited memory, training a single model on very long sequences would require prohibitively large datasets of consistently annotated long videos, and the quadratic cost of attention over hundreds or thousands of frames would dominate the compute budget. Instead, the field has developed a family of strategies that compose short-window models to produce long outputs while maintaining temporal coherence across chunk boundaries. We examine the two principal paradigms: autoregressive chunk generation and hierarchical keyframe generation.

The fundamental tension

Let us formalise the problem. Suppose our diffusion model can generate video chunks of F frames each. We wish to produce a video of NF frames. The model's learned distribution pθ(𝖷1:F) captures statistics of F-frame sequences, but says nothing directly about the joint distribution p(𝖷1:N) over the full video. Any long-generation strategy must therefore make assumptions about how to factorise or approximate p(𝖷1:N) using the model's native capacity.

Key Idea.

Short models, long videos. The core challenge of long video generation is to use a model trained on F-frame windows to produce N-frame videos with NF, while maintaining global coherence that the model was never explicitly trained to enforce. Every strategy for achieving this involves a trade-off between computational cost, temporal consistency, and generation diversity.

Two broad failure modes characterise long video generation. The first is drift: the video's content gradually shifts away from its initial state, so that characters change appearance, scenes morph imperceptibly, and the visual style wanders. The second is repetition: the model falls into a low-energy attractor and produces the same motion pattern in a loop, typically a subtle rocking or breathing motion with no narrative progression. Good long-generation methods must combat both simultaneously.

Autoregressive chunk generation

The most natural approach to long video generation is to produce the video one chunk at a time, conditioning each new chunk on the tail of the previous one. This mirrors the autoregressive structure of language models, where each token is generated conditioned on all preceding tokens.

Definition 71 (Autoregressive Chunk Generation).

Let 𝖷kF×H×W×C denote the k-th chunk of a long video, where each chunk has F frames. Let δ{1,,F1} be the overlap parameter specifying how many frames from the end of chunk k1 are used to condition chunk k. The autoregressive chunk generation factorisation is (AR Chunk)p(𝖷1:K)=p(𝖷1)k=2Kp(𝖷k|𝖷Fδ:Fk1), where 𝖷Fδ:Fk1 denotes the last δ frames of chunk k1, and K=(Nδ)/(Fδ) is the total number of chunks needed to cover N frames.

In practice, the conditioning is implemented by one of several mechanisms.

  1. Latent initialisation. Encode the conditioning frames 𝖷Fδ:Fk1 into the latent space and concatenate or replace the corresponding positions in the noisy latent tensor before denoising begins. The denoising process then “paints in” only the new frames while respecting the boundary.

  2. Cross-attention conditioning. Feed the conditioning frames (or their features) as additional keys and values to the temporal cross-attention layers. This gives the model soft access to the context without hard-copying any frames.

  3. Noise blending. During the reverse diffusion process, maintain a “clean” copy of the overlap region and blend it with the denoised prediction at each step, using a schedule that transitions smoothly from noisy to clean. This avoids hard boundaries.

Remark 67 (Choosing the overlap δ).

The overlap δ trades off redundancy against coherence. A small δ (e.g., 1 or 2 frames) minimises redundant computation but provides the model with very little context about the previous chunk, making drift likely. A large δ (e.g., F/2) gives the model extensive context but doubles the effective cost per output frame. In practice, values of δ[4,16] frames offer a good balance, corresponding to roughly 0.1 to 0.5 seconds of context at 30 fps.

The critical question is: how do errors behave as we chain more chunks? The following result formalises the intuition that errors accumulate over the sequence.

Theorem 12 (Error Accumulation in Autoregressive Chunking).

Let 𝖷1:K be a video generated by autoregressive chunking with K chunks, and let 𝖷,1:K be the corresponding ground-truth video. Suppose each chunk generation introduces a bounded error 𝖷k𝖷,kϵ (in an appropriate metric) conditioned on perfect context. Then:

  1. Worst case (adversarial error correlation). The total error satisfies (Error Worst)𝖷1:K𝖷,1:KKϵ.

  2. Independent errors. If the per-chunk errors are independent and zero-mean with variance σ2ϵ2, then (Error Independent)𝔼[𝖷1:K𝖷,1:K2]Kϵ2, so that the root-mean-square error grows as O(Kϵ).

Proof.

For part (a), apply the triangle inequality over the K chunks: 𝖷1:K𝖷,1:Kk=1K𝖷k𝖷,kKϵ. For part (b), expand the squared norm and use independence. Let 𝒆k=𝖷k𝖷,k with 𝔼[𝒆k]=𝟎 and 𝔼[𝒆k2]ϵ2. Then 𝔼[k=1K𝒆k2]=k=1K𝔼[𝒆k2]+2j<k𝔼[𝒆j,𝒆k]=k=1K𝔼[𝒆k2]Kϵ2, where the cross terms vanish by independence and zero mean.

Insight.

The linear-versus-square-root distinction in Theorem 12 has profound practical implications. For a 2-minute video at 24 fps with 16-frame chunks, we need K180 chunks. Under worst-case accumulation, the final error is 180ϵ; under independent errors, it is only 180ϵ13.4ϵ. The difference is more than an order of magnitude, underscoring the importance of designing chunk transitions that decorrelate errors.

Example 48 (StreamingT2V).

StreamingT2V [42] implements autoregressive chunk generation with a learned “anchor frame” mechanism. At the start of each new chunk, the model conditions on both (i) the last δ frames of the previous chunk and (ii) a global anchor frame that is periodically refreshed from a high-quality keyframe. The anchor frame acts as a long-range tether, combating drift by periodically reminding the model of the video's overall appearance. The conditioning is implemented via cross-attention: the anchor frame's features are injected as additional keys and values in every temporal attention layer.

Example 49 (FreeNoise).

FreeNoise [43] takes a different approach to long video generation by operating on the noise schedule rather than the conditioning mechanism. Instead of generating chunks independently and stitching them, FreeNoise constructs a temporally correlated noise sequence for the entire long video. The key insight is that if adjacent chunks share their initial noise in the overlap region, the denoised outputs will naturally align without explicit conditioning. Concretely, for chunks k and k+1, the initial noise tensors satisfy 𝝐1:δk+1=𝝐Fδ+1:Fk, where the subscripts index the temporal positions within each chunk. This simple modification, requiring no architectural changes or additional training, significantly reduces boundary artifacts.

Hierarchical keyframe generation

Autoregressive methods process the video strictly left-to-right, which means that early decisions irreversibly constrain later content. An alternative paradigm first generates a sparse set of keyframes that establish the global structure, then fills in the gaps through interpolation. This “coarse-to-fine” strategy mirrors how human animators work: first sketch the key poses, then draw the in-between frames.

Definition 72 (Hierarchical Keyframe Generation).

A hierarchical keyframe generation procedure operates in L levels. At level =0 (the coarsest), a diffusion model generates K0 keyframes spaced Δf0 frames apart: (Keyframe Level0)𝖷key(0)={𝒙f:f{1,1+Δf0,1+2Δf0,}}. At each subsequent level =1,,L1, an interpolation model generates intermediate frames conditioned on the keyframes from level 1: (Keyframe Interp)𝖷key()=Interpolate(𝖷key(1),Δf),Δf=Δf1/r, where r2 is the temporal upsampling factor at level . The final video is 𝖷=𝖷key(L1) with ΔfL1=1 (every frame present).

Hierarchical keyframe generation. Level 0 generates sparse keyframes (amber). Level 1 interpolates between keyframes (green). Level 2 fills in all remaining frames (blue). Each level conditions on the frames from the level above, enabling coarse-to-fine temporal refinement.

The hierarchical approach offers several advantages over purely autoregressive generation.

  1. Global coherence. Because the keyframes are generated jointly (or with global conditioning), they establish a consistent narrative arc that the interpolation stages must respect. This reduces drift.

  2. Parallelism. The interpolation between two keyframes is independent of the interpolation between two other keyframes. This enables embarrassingly parallel generation at each level, dramatically reducing wall-clock time.

  3. Error isolation. An error in one interpolation segment does not propagate to distant segments, because the keyframes anchor both endpoints. This limits error accumulation to within-segment drift.

Proposition 37 (Optimal Keyframe Spacing).

Consider a scene with characteristic motion signal-to-noise ratio SNRmotion, defined as the ratio of mean optical flow magnitude to the standard deviation of flow prediction error. The optimal keyframe spacing Δf that minimises total reconstruction error (balancing keyframe generation error and interpolation error) satisfies (Optimal Spacing)ΔfSNRmotion.

Proof sketch.

Let ϵkey(Δf) denote the error per keyframe when generating keyframes spaced Δf apart. A wider spacing means fewer keyframes to generate, reducing the number of difficult generation steps, so ϵkey decreases with Δf (fewer, simpler decisions). Let ϵinterp(Δf) denote the interpolation error for a gap of Δf frames. For small motions (high SNRmotion), interpolation is easy; for large motions (low SNRmotion), interpolation degrades. Under standard assumptions about optical flow prediction accuracy, ϵinterp(Δf)Δf/SNRmotion.

The total number of keyframes is N/Δf, and the total number of interpolation segments is also N/Δf. The total error is approximately (Δf)NΔfϵkey(Δf)+NΔfΔfϵinterp(Δf). Treating ϵkey as roughly constant (its dependence on Δf is weak) and substituting the linear model for ϵinterp, we get (Δf)N/Δf+NΔf/SNRmotion. Minimising over Δf gives ΔfSNRmotion.

Remark 68 (Interpreting optimal spacing).

Proposition 37 formalises an intuition that animators have long understood: for slow, predictable motion (high SNRmotion, such as a talking head), wide keyframe spacing is fine because interpolation is easy. For fast, complex motion (low SNRmotion, such as a fight scene), keyframes must be closely spaced to prevent interpolation artifacts. Adaptive keyframe placement, where the spacing varies across the video based on local motion complexity, is a natural extension.

Example 50 (NUWA-XL).

NUWA-XL [44] implements a particularly elegant form of hierarchical generation. The architecture uses a “diffusion over diffusion” design where a global diffusion model generates coarse keyframes and a local diffusion model generates the in-between frames. The key innovation is that both levels use the same underlying architecture, differing only in the temporal spacing of their conditioning signals. This enables training the entire system end-to-end, with the global and local models sharing parameters. NUWA-XL demonstrated generation of videos exceeding 10 minutes in duration, far beyond the capability of single-chunk models, though maintaining fine-grained consistency over such durations remains challenging.

The hierarchical approach can be analysed as a tree-structured computation, where the root generates global structure and the leaves produce individual frames. This tree structure enables a clean complexity analysis.

Proposition 38 (Complexity of Hierarchical Generation).

Consider an L-level hierarchical generation scheme where level upsamples the frame rate by factor r. If each diffusion generation call takes O(C) time (independent of temporal length, up to the model's native window), then:

  1. The total number of diffusion calls is O(=0L1N/j=0rj)=O(N).

  2. With parallelism at each level, the wall-clock time is O(LC), independent of N.

  3. The total error is bounded by =0L1ϵ where ϵ is the per-level error, compared to Kϵ for autoregressive generation with K=O(N) chunks.

Proof sketch.

At level , the number of segments to interpolate is N/j=0rj. Summing across levels gives the total call count. Since all segments at a given level are independent, they can be processed in parallel, reducing the depth to L. The error bound follows from the triangle inequality applied across levels rather than across chunks.

Remark 69 (Hierarchical vs. autoregressive: a quantitative comparison).

For a 1-minute video at 24 fps (N=1440 frames), consider:

  • Autoregressive with F=16, δ=4: requires K=120 sequential chunk generations, with error bound 120ϵ.

  • Hierarchical with L=3 levels and r=(8,4,2): requires L=3 sequential stages with full parallelism within each stage, and error bound ϵ0+ϵ1+ϵ2.

The hierarchical approach is 40× faster in wall-clock time (assuming unlimited parallelism) and has dramatically better error bounds, at the cost of requiring more total compute (all parallel segments must be processed) and more complex orchestration.

Temporal noise schedules for long generation

A subtle but important consideration in autoregressive chunk generation is the design of the noise schedule at chunk boundaries. When the model begins denoising a new chunk, the overlap region contains “clean” frames from the previous chunk, while the remaining positions are pure noise. This mismatch between clean and noisy regions can cause artifacts.

Definition 73 (Temporal Noise Ramp).

A temporal noise ramp is a position-dependent noise schedule for chunk k, where the noise level at frame position f within the chunk depends on its distance from the overlap boundary: (Noise RAMP)σt(f)=σt{0if fδ (overlap, clean),min(1,fδw)if f>δ (transition), where w is the width of the transition zone and σt is the base noise level at diffusion step t.

The noise ramp ensures a smooth transition from the clean context to the fully noisy region, avoiding the hard boundary that would otherwise cause visible seams.

Overlapping chunk generation. Top: chunks k1 and k share δ frames of context (amber region). Bottom: the noise schedule ramps smoothly from zero in the overlap region to full noise level in the new content, avoiding hard boundaries.

Combining strategies: the hybrid approach

The autoregressive and hierarchical approaches are not mutually exclusive. In fact, the most effective long video generation systems combine both.

Algorithm 7 (Hybrid Long Video Generation).

  1. Plan: Use a language model or planning module to decompose the target video into S semantic segments, each with a text description cs.

  2. Keyframe generation: Generate one keyframe per segment using an image diffusion model, conditioned on cs and (optionally) the previous keyframe: 𝒙fspθ(𝒙|cs,𝒙fs1).

  3. Segment interpolation: For each pair of adjacent keyframes (𝒙fs,𝒙fs+1), generate the in-between frames using a video interpolation diffusion model: 𝖷fs:fs+1pϕ(𝖷|𝒙fs,𝒙fs+1,cs).

  4. Temporal super-resolution: Optionally increase the frame rate through temporal upsampling.

This hybrid approach inherits the global coherence of hierarchical generation (through planned keyframes) and the local quality of autoregressive generation (through segment-level diffusion).

Caution.

Long video generation remains an active research frontier. Even the best current systems exhibit drift over durations exceeding 30 seconds, struggle with complex multi-character narratives, and produce noticeable boundary artifacts at chunk transitions. The error accumulation bounds in Theorem 12 are not merely theoretical concerns; they manifest as real quality degradation in practice.

The long-range consistency challenges of video generation connect deeply to the memory architectures studied in ch:memory. The fundamental question of how to maintain coherent state over extended sequences arises in both language modelling and video generation, and solutions from one domain often inspire progress in the other. Similarly, the problem of generating consistent content over long durations relates to the continual learning challenges discussed in ch:continual, where models must maintain stable representations while adapting to new inputs.

Exercise 42 (Analysing chunk boundaries).

Consider autoregressive chunk generation with F=16 frames per chunk, overlap δ=4, and a target video of N=240 frames.

  1. How many chunks K are needed?

  2. What fraction of the total computation is “wasted” on re-generating overlap frames?

  3. If each chunk has per-chunk PSNR error of 35 dB, estimate the PSNR of the full video under (i) worst-case error accumulation and (ii) independent errors.

  4. Propose a modification to the noise ramp (Definition 73) that uses a cosine transition instead of a linear one. What advantage might this offer?

Exercise 43 (Hierarchical generation tree).

Consider a 3-level hierarchical generation scheme targeting N=256 frames. Level 0 generates 4 keyframes, level 1 interpolates to 16 frames, and level 2 interpolates to all 256 frames.

  1. What are the temporal upsampling factors r0,r1,r2 at each level?

  2. Draw the generation tree, showing which frames are generated at each level.

  3. If each interpolation call generates 4 frames conditioned on 2 boundary frames, how many total calls are needed at each level? What is the maximum parallelism?

  4. Compare the wall-clock time to autoregressive generation with 16-frame chunks and 4-frame overlap, assuming each model call takes 10 seconds.

Temporal Consistency and Coherence

A beautiful video that flickers, wobbles, or allows characters to subtly morph between frames is not a good video. Temporal consistency, the property that corresponding regions across frames depict the same content in a physically plausible manner, is arguably the single most important quality criterion for generated video. Human viewers are extraordinarily sensitive to temporal inconsistencies: a shadow that shifts by a few pixels, a texture that shimmers, or an expression that momentarily changes can render an otherwise photorealistic video immediately unconvincing.

In this section, we formalise what temporal consistency means, present quantitative metrics for measuring it, and study how architectural choices in diffusion models affect the degree of consistency achievable.

Measuring temporal consistency

Intuitively, temporal consistency means that if we warp frame f+1 back to the coordinate system of frame f using the true optical flow, the result should match frame f closely. This leads to the following formal definition.

Definition 74 (Temporal Consistency Score).

Let 𝖷=(𝒙1,,𝒙F) be a video, let ϕ:H×W×Cd be a perceptual feature extractor (e.g., a pre-trained network), and let flow(f,f+1) denote the optical flow field from frame f to frame f+1. The temporal consistency score is (TC Score)TC(𝖷)=1F1f=1F1sim(ϕ(𝒙f),ϕ(warp(𝒙f+1,flow(f,f+1)))), where warp(𝒙,𝐮) denotes backward warping of image 𝒙 according to flow field 𝐮, and sim(,) is a similarity function (e.g., cosine similarity in feature space).

Remark 70 (Why perceptual features?).

Computing TC in pixel space (i.e., setting ϕ to the identity) is problematic because optical flow estimation introduces sub-pixel errors, and bilinear warping causes slight blurring. These artifacts reduce pixel-level similarity even for perfectly consistent videos. Perceptual features from networks like VGG or DINO are more robust to these small spatial perturbations, giving a cleaner signal about actual temporal inconsistency versus measurement noise.

While TC measures frame-to-frame smoothness, many applications require a stronger form of consistency: that specific entities maintain their identity throughout the video.

Definition 75 (Identity Consistency).

Let 𝖷=(𝒙1,,𝒙F) be a video containing one or more identifiable entities (e.g., faces, specific objects). Let face(𝒙f) denote the embedding of the detected face (or entity) in frame f, extracted by a recognition network. The identity consistency score is (Identity Consistency)IC(𝖷)=minf,fsim(face(𝒙f),face(𝒙f)), where the minimum is taken over all pairs of frames in which the entity is visible.

Remark 71 (Minimum versus average).

Definition 75 uses the minimum similarity rather than the average. This is deliberate: a video where a character's face is consistent in 99 out of 100 frames but grotesquely distorted in one frame is not a good video. The worst-case formulation captures this; an average would hide it. In practice, one often reports both the minimum and the mean, but the minimum is the binding constraint.

Computing the temporal consistency score. Frame f+1 is warped back to frame f's coordinate system using optical flow, and the perceptual similarity between the original frame f and the warped frame is computed. High similarity indicates temporal consistency.

Attention window and consistency guarantees

A video diffusion model's temporal attention mechanism is the primary tool by which it enforces consistency across frames. If the model uses full temporal attention (every frame attends to every other frame), then the model can, in principle, detect and correct inconsistencies between any pair of frames. In practice, memory constraints often force the use of windowed or sparse attention, where each frame attends only to a local neighbourhood. The following result quantifies the relationship between attention window size and the consistency that can be guaranteed.

Theorem 13 (Attention Window and Consistency).

Let a video diffusion model use temporal self-attention with window size w (each frame attends to the w nearest frames in both directions, for a total receptive field of 2w+1 frames). Suppose that within the attention window, the model achieves temporal consistency TCw (the consistency score restricted to frame pairs separated by at most w frames). Then for frame pairs separated by f>w frames, the effective consistency degrades as (Consistency Degradation)TCfTCw1f/w,f>w. Conversely, for fw, full consistency is maintained: TCf=TCw.

Proof.

For fw, frames f and f with |ff|w lie within each other's attention windows, so the model directly enforces consistency between them: TCf=TCw.

For f>w, frame f is not directly visible from frame f. Consistency must be mediated through a chain of intermediate frames, each within the attention window of its neighbours. The chain has length f/w. At each link in the chain, the consistency is at least TCw.

Model the per-link consistency error as a random perturbation with variance proportional to 1TCw. Over m=f/w links, the accumulated perturbation has variance proportional to m(1TCw) (under independence), so the effective consistency scales as TCf1m(1TCw)=1f/w(1TCw). Re-expressing in terms of the consistency score gives the 1/m scaling for the similarity metric. More precisely, if we define the inconsistency as Δ=1TC, then ΔfmΔw, giving TCf1mΔw. In the regime where Δw is small, the square-root approximation TCfTCw/m provides a tighter bound by accounting for the decay of the similarity metric under random perturbations.

Insight.

Theorem 13 explains a widely observed phenomenon: generated videos look excellent in any short segment but gradually “drift” over longer durations. The 1/m decay means that doubling the video length (while keeping the window fixed) reduces long-range consistency by a factor of 1/20.71. This is why models with larger attention windows (or global attention mechanisms) produce more consistent long videos, and why hierarchical generation (Hierarchical keyframe generation) is valuable: it provides long-range “shortcuts” that bypass the chain-of-attention degradation.

Methods for improving temporal consistency

Given the fundamental limitations imposed by finite attention windows, researchers have developed several techniques to improve temporal consistency beyond what the base model provides.

Example 51 (FreeInit).

FreeInit [45] observes that the initial noise used to start the denoising process has a significant impact on temporal consistency. Specifically, if the low-frequency components of the initial noise are temporally coherent, the generated video tends to be more consistent. FreeInit proposes an iterative refinement procedure: (1) generate a video with random noise, (2) extract the low-frequency spatial components from the generated video, (3) use these as the low-frequency components of a new initial noise, and (4) regenerate. After 2 to 3 iterations, the temporal consistency improves significantly, at the cost of 2× to 3× the generation time.

Example 52 (LAMP).

LAMP (Learn A Motion Pattern) [46] addresses temporal consistency from the training perspective. Rather than generating videos from scratch, LAMP fine-tunes a pre-trained text-to-image diffusion model on a single reference video to learn its specific motion pattern. The key insight is that by learning the temporal dynamics of a specific video, the model acquires a strong prior for consistent motion that transfers to new content. The fine-tuning updates only the temporal attention layers, preserving the spatial generation quality of the base model while injecting learned motion priors that enforce consistency.

This approach connects to the broader concept of “motion transfer”: extracting the temporal dynamics from one video and applying them to new content specified by a text prompt. The result is a video that moves like the reference but looks like the prompt describes.

Remark 72 (The consistency-diversity trade-off).

Improving temporal consistency often comes at the cost of reduced diversity. A model that generates extremely consistent videos may do so by producing conservative, low-motion outputs that avoid the risk of inconsistency. The ideal model should produce diverse, dynamic videos that are also consistent, but achieving both simultaneously remains a significant challenge. This trade-off is analogous to the precision-recall trade-off in classifier evaluation, and to the quality-diversity trade-off studied extensively in the GAN literature.

Structural consistency via shared noise

An elegant family of consistency-improving techniques operates not on the model architecture but on the noise used to initialise the denoising process. The key insight is that if neighbouring frames start from correlated noise, the denoised outputs will naturally exhibit temporal correlation, even if the model processes each frame independently.

Definition 76 (Temporally Correlated Noise).

A temporally correlated noise initialisation constructs the initial noise tensor 𝝐=(𝝐1,,𝝐F) such that adjacent frames share a fraction ρ[0,1] of their noise: (Correlated Noise)𝝐f=ρ𝝐shared+1ρ2𝝐indf, where 𝝐sharedNormal(𝟎,𝐈) is shared across all frames and 𝝐indfNormal(𝟎,𝐈) is independent per frame. The marginal distribution of each 𝝐f is still standard Gaussian, but the correlation between frames is Corr(𝝐f,𝝐f)=ρ2.

The parameter ρ controls a trade-off between temporal consistency and per-frame diversity. At ρ=0, frames are fully independent (maximum diversity, minimum consistency). At ρ=1, all frames start from identical noise (maximum consistency, but identical content). In practice, ρ[0.3,0.7] provides a good balance.

Remark 73 (Connection to progressive noise schedules).

The temporally correlated noise construction is closely related to the progressive noise schedules used in video upsampling. In both cases, the goal is to ensure that the “random seed” driving the generation process is coherent across the temporal dimension. The difference is that correlated noise operates at initialisation time (before any denoising), while progressive schedules modify the noise at intermediate denoising steps. The two approaches can be combined for stronger consistency guarantees.

Exercise 44 (Temporal consistency metrics).

Consider a generated video 𝖷 of F=60 frames showing a person walking.

  1. Compute the number of frame pairs used in the TC score (Definition 74). How does this scale with F?

  2. The person's face is visible in frames 10 through 50. How many pairs are evaluated for the IC score (Definition 75)?

  3. Suppose the model uses attention window w=8. Using Theorem 13, estimate the consistency between frames 1 and 60.

  4. Propose a modification to the TC score that weights nearby frame pairs more heavily than distant ones. Under what circumstances would this be preferable?

Exercise 45 (Correlated noise analysis).

For the correlated noise construction in Definition 76:

  1. Verify that 𝝐f has a standard Gaussian marginal distribution for any ρ[0,1].

  2. Compute 𝔼[𝝐f𝝐f2] as a function of ρ and the dimensionality d.

  3. Extend the construction to allow distance-dependent correlation: frames that are k steps apart have correlation ρk (exponential decay). Write the formula for 𝝐f in this case.

  4. Discuss how the choice of ρ should depend on the motion speed in the target video.

Video Editing

Generating video from scratch is impressive, but many practical applications require a different capability: editing an existing video while preserving its overall structure. Change the season from summer to winter, replace a character's outfit, alter the lighting from day to night, or modify the text on a sign, all while keeping the camera motion, character poses, and scene layout intact. This is the domain of video editing, which has emerged as one of the most practically valuable applications of video diffusion models.

The challenge is formidable. A good video edit must simultaneously: (i) faithfully execute the desired modification, (ii) preserve all unedited aspects of the source video, and (iii) maintain temporal consistency across the edit. Getting any one of these wrong produces artifacts: an edit that ignores the prompt, structural distortions in unedited regions, or flickering that reveals the frame-by-frame nature of the processing.

In this section, we study two foundational approaches to diffusion-based video editing: SDEdit (adding noise and denoising with a new prompt) and attention injection (sharing structural information between source and edited branches).

Video SDEdit

SDEdit [73] is one of the simplest and most elegant approaches to image editing with diffusion models, and its extension to video is natural. The core idea is to add noise to the source content up to some intermediate diffusion timestep t, then denoise from that point using the target prompt. The noise level controls the trade-off between faithfulness to the source and freedom to incorporate the edit.

Definition 77 (Video SDEdit).

Let 𝖷srcF×H×W×C be the source video and cedit be the target editing prompt. Video SDEdit proceeds as follows:

  1. Encode: 𝖹src=(𝖷src) (map to latent space).

  2. Add noise: For a chosen edit strength t[0,T], compute the noisy latent (Sdedit Noise)𝖹t=αt𝖹src+1αt𝝐,𝝐Normal(𝟎,𝐈).

  3. Denoise: Run the reverse diffusion process from timestep t down to 0, conditioned on cedit: (Sdedit Denoise)𝖹0=Denoise(𝖹t,t,cedit).

  4. Decode: 𝖷edit=𝒟(𝖹0).

The parameter t controls the edit intensity: larger t adds more noise, giving the model more freedom to modify the content; smaller t preserves more of the source structure.

The Video SDEdit pipeline. The source video is encoded, noise is added to an intermediate level t, and the noisy latent is denoised using the edit prompt. The noise level t controls the edit strength: more noise enables larger edits but reduces fidelity to the source.

Proposition 39 (Edit Fidelity-Creativity Trade-off).

In Video SDEdit, the edit strength and source fidelity are controlled by the noise level t:

  1. Edit strength t: as tT, the noisy latent 𝖹t approaches pure noise, and the denoising process generates content almost entirely from the edit prompt, giving maximum creative freedom.

  2. Source fidelity (1t/T): as t0, the noisy latent retains most of the source structure, and the edit is minimal.

Formally, the mutual information between the source and the edited video satisfies (EDIT MI)I(𝖷src;𝖷edit)=d2log11αt+C, where d is the latent dimensionality and C is a constant depending on the model. Since αt decreases monotonically with t (from α01 to αT0), the mutual information decreases with t, confirming the trade-off.

Proof.

Consider the noising process as a Gaussian channel. The source latent 𝖹src is observed through noise: 𝖹t=αt𝖹src+1αt𝝐. For Gaussian 𝖹src with covariance σz2𝐈 and independent Gaussian noise, the mutual information between 𝖹src and 𝖹t is I(𝖹src;𝖹t)=d2log(1+αtσz21αt). This is monotonically decreasing in t (since αt decreases), confirming that more noise reduces the information retained about the source. The data processing inequality guarantees I(𝖷src;𝖷edit)I(𝖹src;𝖹t), since 𝖷edit is a function of 𝖹t (through denoising and decoding).

Remark 74 (Practical guidelines for t selection).

In practice, the optimal noise level t depends on the type of edit:

  • Style transfer (e.g., “make it look like a watercolour painting”): t/T[0.3,0.5]. Low noise preserves the spatial structure while allowing texture changes.

  • Object modification (e.g., “change the red car to a blue car”): t/T[0.5,0.7]. Moderate noise allows colour and shape changes while preserving the overall scene layout.

  • Scene transformation (e.g., “change from day to night”): t/T[0.6,0.8]. Higher noise permits global illumination changes.

  • Major content change (e.g., “replace the city with a forest”): t/T[0.8,0.95]. Near-total noise is needed, but the camera motion from the source may still be loosely preserved.

Values below 0.3 typically produce imperceptible edits, while values above 0.95 are effectively unconditional generation with no memory of the source.

Caution.

Video SDEdit applies the same noise level to every frame simultaneously, which means every frame undergoes the same degree of modification. This makes spatially or temporally localised edits difficult. Changing only one object in the scene, or editing only a portion of the video's duration, requires additional mechanisms such as masking or attention manipulation.

The main limitation of Video SDEdit is that it processes the entire video uniformly: every frame receives the same noise level and the same editing prompt. This makes it difficult to perform localised edits (e.g., changing only one object) or edits that should affect different frames differently.

Attention injection for structure-preserving edits

A more sophisticated approach to video editing exploits the internal representations of the diffusion model, specifically the self-attention maps, to transfer structural information from the source video to the edited version. The key observation is that the self-attention keys and values in a diffusion U-Net or transformer encode the spatial layout and temporal structure of the content, while the queries drive the generation of new content.

Definition 78 (Attention Injection for Video Editing).

Let ϵθ be a video diffusion model. Given source video 𝖷src and edit prompt cedit, attention injection operates two parallel denoising branches:

  1. Source branch: Perform DDIM inversion of 𝖷src to obtain noise maps {𝖹tsrc}t=1T. During reconstruction (denoising from 𝖹Tsrc), record the self-attention keys 𝐊tsrc and values 𝐕tsrc at each layer and timestep.

  2. Edit branch: Denoise from the same inverted noise 𝖹Tsrc, but conditioned on cedit. At selected layers, replace the self-attention keys and values with those from the source branch: (Attention Injection)Attnedit=softmax(𝐐edit(𝐊src)𝖳dk)𝐕src.

The edit branch uses its own queries (driven by cedit) but the source branch's keys and values (encoding the source structure), resulting in edited content that follows the source layout.

Attention injection for video editing. The source branch (top) performs DDIM inversion and records self-attention keys and values. The edit branch (bottom) denoises from the same inverted noise with the edit prompt, but uses the source branch's keys and values in selected self-attention layers. This preserves the spatial layout while allowing content modification.

Advanced video editing methods

The basic SDEdit and attention injection techniques have been refined and extended in numerous ways. We highlight several influential approaches.

Example 53 (TokenFlow).

TokenFlow [47] addresses a fundamental limitation of per-frame editing approaches: even when each frame is edited consistently according to the prompt, the edits across frames may not be temporally coherent because the diffusion model processes each frame (or small batch of frames) independently. TokenFlow solves this by propagating the internal tokens (feature maps) of the diffusion model across frames according to the inter-frame correspondences established by the source video's optical flow.

Concretely, TokenFlow operates as follows. First, it performs DDIM inversion of the source video and records the intermediate features at each denoising step. Then, for each frame f, it edits a sparse set of keyframes using any image editing method. Finally, it propagates the edited tokens to all other frames using the nearest-neighbour field computed from the source video's features. The propagation ensures that corresponding regions across frames receive consistent edits, even though the editing itself is performed independently per keyframe.

Example 54 (Pix2Video).

Pix2Video [48] takes an image editing approach and extends it to video through careful temporal propagation. The method first edits a single anchor frame using an image diffusion model (e.g., InstructPix2Pix). It then propagates the edit to neighbouring frames by injecting the self-attention features from the edited anchor into the denoising process of each subsequent frame. The propagation proceeds sequentially from the anchor frame outward, with each newly edited frame serving as the reference for the next.

Example 55 (FateZero).

FateZero [49] introduces the concept of “attention map blending” for zero-shot video editing. During DDIM inversion of the source video, FateZero stores not only the self-attention keys and values but also the cross-attention maps (the attention weights between spatial tokens and text tokens). During the editing pass, it blends the stored source attention maps with the new attention maps computed from the edit prompt, using a spatial mask to determine which regions should change and which should be preserved. The blending is expressed as (Fatezero Blend)𝐀edit=𝐌𝐀new+(1𝐌)𝐀src, where 𝐌 is a spatial mask derived from the cross-attention difference between source and edit prompts, and 𝐀 denotes the attention maps.

Remark 75 (Comparing editing approaches).

tab:vdiff:editing-comparison summarises the key trade-offs among the video editing methods discussed in this section. The choice of method depends on the type of edit, the available compute budget, and whether training-free operation is required.

tableComparison of diffusion-based video editing methods. “TF” indicates training-free (no fine-tuning required). “Temporal” indicates explicit temporal consistency mechanism.

MethodTFTemporalLocal EditQuality
Video SDEditYesNoNoMedium
Attention InjectionYesYesNoHigh
TokenFlowYesYesNoHigh
Pix2VideoYesYesNoMedium
FateZeroYesYesYesHigh
Rerender-A-VideoYesYesNoHigh

Example 56 (Rerender-A-Video).

Rerender-A-Video [50] takes a hybrid approach that combines diffusion-based editing with optical-flow-based warping. It first edits a set of keyframes using an image diffusion model, then generates intermediate frames by (i) warping the nearest edited keyframe using optical flow from the source video, (ii) using the warped frame as the SDEdit initialisation for the diffusion model, and (iii) denoising with a small number of steps to clean up warping artifacts. The optical flow provides strong structural guidance, while the diffusion model handles disocclusions and artifacts that warping alone cannot resolve.

The method uses a cross-frame attention mechanism during the diffusion refinement step: each frame's self-attention keys and values are augmented with features from the nearest keyframe, encouraging consistency.

Remark 76 (The inversion bottleneck).

Many video editing methods rely on DDIM inversion to obtain a noise-space representation of the source video. However, DDIM inversion is not exact: the deterministic inversion of DDIM is only approximately correct, and errors accumulate over the T inversion steps. For images, these errors are small enough to be negligible, but for video, the accumulated error can cause noticeable artifacts, especially in fine details and at temporal boundaries. Several recent works address this through more accurate inversion schemes, such as null-text inversion or edit-friendly DDPM inversion, adapted to the video setting.

Exercise 46 (Designing a video editing pipeline).

You are tasked with building a system that takes a video of a person walking through a park and changes the season from summer to winter (adding snow, bare trees, overcast sky) while keeping the person's appearance and motion unchanged.

  1. Would you use Video SDEdit or attention injection? Justify your choice.

  2. What edit strength t (as a fraction of T) would you recommend? What happens if t is too low or too high?

  3. How would you handle the person's appearance? They should remain unchanged, but SDEdit modifies the entire frame.

  4. Propose a method that combines SDEdit with a segmentation mask to edit only the background.

Physics-Aware Video Generation and World Models

The videos we have discussed generating so far are evaluated primarily on visual quality and temporal consistency. A video of a ball bouncing might look beautiful, but does the ball actually follow a parabolic trajectory? Does it accelerate downward at 9.8m/s2? Does it conserve momentum when it bounces? The frontier of video generation research asks a deeper question: can diffusion models learn not just the appearance of the physical world, but its dynamics?

This question connects video generation to the broader concept of world models: internal representations of how the world works that can be used for prediction, planning, and reasoning. If a video diffusion model can accurately predict what happens next in a physical scene, it is, in a meaningful sense, simulating physics. This section explores the theoretical foundations of this connection and surveys recent efforts to build physics-aware video generators.

World models: formalisation

The concept of a world model has a long history in cognitive science, control theory, and reinforcement learning. For our purposes, a world model is a conditional generative model that predicts future observations given past observations and (optionally) actions.

Definition 79 (World Model).

A world model is a function (World Model)𝒲:(𝖷1:t,at)p(𝖷t+1:t+H), where 𝖷1:t is the observed history (a sequence of video frames or state representations), at is an optional action or intervention at time t, H is the prediction horizon, and p(𝖷t+1:t+H) is a distribution over future observations. When no action is provided (at=), the world model reduces to a pure prediction model.

The world model framework is general enough to encompass several important special cases.

  1. Video prediction models (at=, H=1): predict the next frame given the past. These are the classical next-frame prediction models from the video prediction literature.

  2. Interactive world models (at): predict the visual consequence of taking action at in the current state. These are directly relevant to robotics and game simulation.

  3. Long-horizon world models (H1): predict extended future trajectories. These are the most ambitious and the most relevant to planning.

The world model loop. An agent selects an action based on its current state. The world model predicts the resulting observation. The agent perceives the observation and updates its state, closing the loop. In a “learned world model” setting, the world model 𝒲 is a neural network (potentially a video diffusion model) trained on observational data.

Physics-guided diffusion

One approach to incorporating physical knowledge into video generation is to use physics-guided diffusion: modifying the denoising process to steer generated videos toward physical plausibility. This is analogous to classifier guidance (Classifier-Free Guidance for Video), but instead of guiding with a classifier, we guide with a physics constraint.

Definition 80 (Physics-Guided Diffusion).

Let ϵθ(𝖹t,t) be the noise prediction of a video diffusion model, and let 𝒫:F×H×W×C be a differentiable physics loss that measures how well a decoded video satisfies a given physical constraint (e.g., conservation of energy, Newtonian dynamics, fluid equations). Physics-guided diffusion modifies the noise prediction at each denoising step: (Physics Guided)ϵ^=ϵθ(𝖹t,t)+λ𝖹t𝒫(𝒟(𝖹t)), where 𝒟 is the (frozen) decoder mapping latents to pixels, and λ>0 controls the strength of the physics guidance.

Physics-guided diffusion. At each denoising step, the noise prediction from the model is combined with a gradient from a physics loss 𝒫. The decoder 𝒟 maps the current noisy latent to pixel space where the physics constraint is evaluated, and the gradient is backpropagated through the decoder to the latent space.

The physics loss 𝒫 can encode various physical constraints:

  1. Conservation laws. Require that total energy, momentum, or mass is approximately conserved across frames: 𝒫conserve=fE(f+1)E(f)2, where E(f) is an energy estimator applied to frame f.

  2. Trajectory constraints. Require that tracked object positions follow smooth, physically plausible trajectories: 𝒫traj=f𝒙¨objf𝐠2, where 𝒙¨objf is the estimated acceleration and 𝐠 is gravitational acceleration.

  3. Fluid dynamics. Require that observed flows satisfy the Navier-Stokes equations: 𝒫fluid=t𝐯+(𝐯)𝐯ν2𝐯+p2, where 𝐯 is the estimated velocity field and ν,p are viscosity and pressure.

  4. Rigid body constraints. Require that rigid objects maintain their shape: 𝒫rigid=fd(𝒙if,𝒙jf)d(𝒙i1,𝒙j1)2, where d denotes pairwise distances between tracked points on the object.

Remark 77 (Computational cost of physics guidance).

Physics-guided diffusion requires backpropagating through the decoder 𝒟 at every denoising step to compute 𝖹t𝒫. For large decoders and high resolutions, this gradient computation can be as expensive as the forward pass of the denoising model itself, roughly doubling the generation time. Approximations such as single-step decoder estimates, gradient checkpointing, or applying guidance only at selected timesteps can mitigate this cost.

Video diffusion as an implicit world model

A provocative hypothesis, articulated most prominently in the context of OpenAI's Sora [6], is that video diffusion models trained on sufficiently large and diverse video datasets may implicitly learn a world model. That is, without ever being explicitly trained on physics equations, they may learn to simulate the consequences of physical interactions from the statistical regularities present in the training data.

Theorem 14 (Video as Implicit World Model).

Let pdata(𝖷1:F) be the distribution of natural videos, and let pθ(𝖷1:F) be a generative model with sufficient capacity. If pθ achieves DKL(pdatapθ)δ for small δ>0, then for any physical constraint 𝒞 that is satisfied by natural videos with probability at least 1γ, (Implicit World Model)Pr𝖷pθ[𝒞(𝖷) is satisfied]1γδ/2. In words: a model that closely approximates the data distribution must also approximately satisfy any physical constraint that the data satisfies.

Proof.

By Pinsker's inequality, the total variation distance satisfies TV(pdata,pθ)δ/2. Let A={𝖷:𝒞(𝖷) is satisfied}. Then pdata(A)1γ by assumption. By the definition of total variation distance, |pθ(A)pdata(A)|TV(pdata,pθ)δ/2. Therefore pθ(A)pdata(A)δ/21γδ/2.

Key Idea.

Learning physics from pixels. Theorem 14 provides a theoretical basis for the empirical observation that large video models exhibit physical understanding. The argument is simple but powerful: if the real world obeys physics, and the model faithfully captures the distribution of real-world videos, then the model's outputs will also (approximately) obey physics. No explicit physics knowledge is required; it emerges as a consequence of distributional matching.

However, several important caveats temper this optimistic view.

Remark 78 (Limitations of Implicit World Models).

While Theorem 14 is mathematically correct, it relies on strong assumptions that are not satisfied in practice:

  1. Conservation laws. Physical conservation laws (energy, momentum, charge) are exact in the real world but only approximately represented in the training data (due to camera angles, occlusions, and limited video duration). A model matching the data distribution inherits these approximate representations, not the exact laws, and may violate conservation in scenarios that are physically possible but rare in the training set.

  2. Counting and combinatorics. Current video models notoriously struggle with counting: a video of five balls bouncing may show four or six balls in some frames. This is because counting is a discrete, global constraint that is poorly captured by the local pattern-matching that diffusion models excel at.

  3. Novel scenarios. The guarantee in Theorem 14 holds only for scenarios represented in the training distribution. For out-of-distribution scenarios (e.g., zero-gravity environments, novel materials), the model has no basis for correct physical reasoning and will default to the most similar training examples, which may exhibit entirely wrong physics.

  4. Long-horizon accuracy. Even if the model accurately predicts one or two frames ahead, errors compound over longer horizons (recall Theorem 12). Physical simulations require exponentially growing precision over time to maintain accuracy; neural models cannot provide this.

Frontier systems: Sora and beyond

The connection between video generation and world modelling was thrust into the spotlight by OpenAI's Sora [6], which was described as a “world simulator.” Let us examine what this claim means and what evidence supports or qualifies it.

Example 57 (Sora as a World Simulator).

Sora generates videos by operating on sequences of spacetime patches processed by a Diffusion Transformer (DiT). Its training on a massive corpus of internet video, combined with the DiT architecture's ability to model long-range dependencies, enables several behaviours suggestive of world understanding:

  • 3D consistency: camera movements produce parallax effects consistent with a 3D scene, suggesting that the model has learned implicit 3D representations.

  • Object permanence: objects that leave the frame return with consistent appearance, and objects partially occluded by other objects are completed plausibly when revealed.

  • Approximate dynamics: balls roll, water flows, and cloth drapes in approximately correct ways, suggesting learned physical priors.

  • Interaction effects: actions like stepping in sand leave footprints, and interactions between objects produce plausible consequences.

However, Sora also exhibits clear failures of physical reasoning: objects sometimes pass through each other, liquids defy gravity, and complex multi-body dynamics are often incorrect, confirming the limitations outlined in Remark 78.

Example 58 (UniSim).

UniSim [51] explicitly trains a video diffusion model as an interactive world model. Given a current observation and an action (specified as text, e.g., “turn left” or “pick up the red block”), UniSim predicts the next observation. The model is trained on a combination of real-world video with action labels (from robotics datasets) and synthetic data from game engines. UniSim demonstrates that video diffusion models can serve as effective visual simulators for training robotic policies, achieving comparable performance to policies trained in ground-truth simulators on several manipulation tasks.

Example 59 (GameGen-X and Genie).

GameGen-X [52] and Genie [53] represent the frontier of interactive world models for game environments. GameGen-X is specifically designed for open-world game video generation, producing interactive gameplay videos conditioned on user inputs (keyboard and mouse actions). Genie, developed by Google DeepMind, learns a “world model from internet videos” by jointly learning a video tokeniser, a dynamics model, and an action model. Genie's key insight is that actions need not be provided during training; they can be inferred as the latent variables that explain transitions between frames. This makes it possible to train interactive world models from unlabelled video, a significant step toward scalable world model learning.

The connection between world models and agentic AI is deep and actively explored. We refer the reader to ch:agents for a thorough treatment of how world models can be used for planning and decision-making in agentic systems, and to ch:reasoning for the relationship between world modelling and recursive reasoning.

Algorithm 8 (Physics-Guided Video Generation).

Given a text prompt c, a physics constraint 𝒫, and guidance strength λ:

  1. Sample initial noise 𝖹TNormal(𝟎,𝐈).

  2. For t=T,T1,,1: enumerate

  3. Compute model prediction: ϵ^=ϵθ(𝖹t,t,c).

  4. Estimate clean video: 𝖷^0=𝒟((𝖹t1αtϵ^)/αt).

  5. Compute physics gradient: 𝐠=𝖹t𝒫(𝖷^0).

  6. Apply guidance: ϵ^ϵ^+λt𝐠, where λt is a timestep-dependent weight (typically larger at intermediate timesteps).

  7. Update: 𝖹t1=DDPM_step(𝖹t,ϵ^,t). enumerate

  8. Return 𝖷=𝒟(𝖹0).

Remark 79 (Choosing the guidance schedule λt).

The guidance strength λt should vary across timesteps. At early steps (large t), the clean-video estimate 𝖷^0 is noisy and unreliable, so physics gradients computed from it are inaccurate; guidance should be weak. At late steps (small t), the estimate is much cleaner and gradients are meaningful; guidance should be stronger. A common choice is the “warm-up” schedule λt=λmin(1,(Tt)/Twarmup), which ramps the guidance from zero at t=T to full strength after Twarmup steps.

The gap between simulation and understanding

There is an important philosophical and practical distinction between a model that simulates physics and one that understands physics. A video diffusion model that produces realistic-looking bouncing balls is performing high-fidelity pattern matching against its training distribution. Whether this constitutes “understanding” of Newtonian mechanics is a matter of definition and debate.

We can formalise this distinction using the concept of generalisation depth: how far beyond the training distribution a model's physical predictions remain accurate.

Definition 81 (Generalisation Depth).

The generalisation depth of a world model 𝒲 with respect to a physical law is the maximum perturbation magnitude δ such that (Generalisation Depth)𝔼𝖷pδ[𝒲(𝖷1:t)(𝖷1:t)]η, where pδ is the data distribution perturbed by δ in some relevant parameter (e.g., gravity, friction, initial conditions), (𝖷1:t) is the ground-truth physical prediction, and η is the acceptable error threshold.

A model with high generalisation depth has learned something closer to the underlying physical law rather than merely memorising surface statistics. Current video diffusion models have low generalisation depth: they produce plausible-looking physics for scenarios similar to their training data, but fail rapidly when physical parameters are perturbed beyond the training range.

Insight.

The question “does a video diffusion model understand physics?” is ill-posed without defining “understand.” If understanding means “can generate outputs consistent with physical laws in scenarios seen during training,” then yes, large video models understand physics. If understanding means “can reason about novel physical scenarios, derive consequences of perturbed initial conditions, or discover new physical laws,” then no, current video models do not understand physics. The truth lies in the gap between interpolation (recombining patterns from training data) and extrapolation (generalising to genuinely novel situations). Video models are spectacular interpolators but limited extrapolators.

llcc@ CategoryExampleCurrentDifficulty
Accuracy
GravityBall fallingHighEasy
InertiaSliding objectHighEasy
CollisionBilliard ballsMediumMedium
Fluid dynamicsWater pouringMediumMedium
DeformationCloth foldingMediumMedium
Multi-bodyNewton's cradleLowHard
ConservationEnergy in bounceLowHard
CountingFixed # of objectsLowHard
Novel physicsZero gravityVery lowVery hard
Taxonomy of physics understanding in video models, categorised by the type of physical reasoning required and the difficulty level for current models.

Exercise 47 (Evaluating physical understanding).

Design an evaluation benchmark for testing whether a video generation model understands basic physics. Your benchmark should include:

  1. Five test scenarios spanning different physical phenomena (e.g., projectile motion, fluid dynamics, rigid body collisions, elastic deformation, buoyancy).

  2. For each scenario, a quantitative metric comparing the generated trajectory to the ground-truth physics simulation.

  3. A distinction between “interpolation” tests (scenarios similar to training data) and “extrapolation” tests (scenarios requiring generalisation, e.g., unusual gravity or novel materials).

  4. A discussion of how your benchmark handles the stochasticity inherent in diffusion models (different random seeds produce different videos).

Exercise 48 (Physics-guided diffusion implementation).

Consider a video generation task where a ball is thrown upward and must follow a parabolic trajectory.

  1. Write the physics loss 𝒫(𝖷) for this scenario, assuming you have a differentiable ball detector pos:H×W×C2 that returns the (x,y) position of the ball in each frame.

  2. The ball detector outputs a soft heatmap. How does this affect the gradient 𝖹t𝒫?

  3. Estimate the computational overhead of physics guidance relative to standard generation, assuming the ball detector is a small network (1% of the diffusion model's parameters).

  4. What happens if the physics loss conflicts with the text prompt (e.g., prompt says “floating ball” but physics loss enforces gravity)? How would you handle this?

Autoregressive-Diffusion Hybrids

Throughout this chapter, we have treated diffusion as the primary generative mechanism for video. But diffusion is not the only game in town. Autoregressive models, which generate data one token at a time conditioned on all previous tokens, have been spectacularly successful in language modelling and have shown promise for visual generation through vector-quantised tokenisation. A natural question arises: can we combine the strengths of both paradigms?

The answer is yes, and the resulting autoregressive-diffusion hybrids represent one of the most promising directions in video generation. The basic intuition is straightforward: autoregressive models excel at capturing long-range dependencies and sequential structure (they “know what to generate”), while diffusion models excel at producing high-quality continuous outputs (they “know how to generate it”). Combining them should yield models that can plan over long temporal horizons while producing visually stunning results.

Frame-level AR with per-frame diffusion

The simplest hybrid architecture generates the video one frame at a time, using an autoregressive backbone to model the temporal sequence and a diffusion model to generate each frame's content.

Definition 82 (AR-Diffusion Hybrid (Frame-Level)).

An autoregressive-diffusion hybrid at the frame level factorises the video distribution as (AR Diffusion Frame)p(𝖷)=p(𝒙1)f=2Fpdiff(𝒙f|𝒙<f), where p(𝒙1) is the distribution of the first frame (itself potentially generated by a diffusion model) and pdiff(𝒙f|𝒙<f) is a conditional diffusion model that generates frame f given all previous frames 𝒙<f=(𝒙1,,𝒙f1).

The conditioning on 𝒙<f can be implemented in several ways:

  1. Direct concatenation. Concatenate the previous frames (or their latent encodings) to the noisy input of the diffusion model along the channel or temporal dimension. This is simple but scales poorly with context length.

  2. Cross-attention conditioning. Encode the previous frames into a sequence of feature vectors and inject them via cross-attention in the denoising network. This scales better but requires careful attention to the memory cost.

  3. Recurrent state conditioning. Process the previous frames through a recurrent network (LSTM, GRU, or state-space model) to produce a fixed-size hidden state, and condition the diffusion model on this state. This has constant memory cost regardless of context length but compresses the history lossy.

The frame-level hybrid inherits both the strengths and weaknesses of autoregressive generation. On the positive side, it can generate videos of arbitrary length (each frame is generated independently conditioned on the past), and the diffusion model ensures high per-frame quality. On the negative side, it suffers from the same error accumulation as autoregressive chunk generation (Theorem 12), and generation is inherently sequential (each frame must wait for all previous frames), eliminating the parallel sampling advantage of full-video diffusion.

Remark 80 (Latency analysis).

The latency of a frame-level AR-diffusion hybrid is dominated by the sequential nature of the autoregressive loop. For a video of F frames where each diffusion generation requires T denoising steps, the total latency is O(FT) model evaluations. Compare this to pure diffusion over the full video, which requires only O(T) evaluations (though each evaluation processes the full F-frame tensor). The frame-level hybrid is therefore slower by a factor of F in latency, but each evaluation is cheaper by a factor related to F (processing one frame versus F frames). The total compute is roughly comparable, but the wall-clock time is worse for the hybrid when parallelism across frames is available.

Temporal AR, spatial diffusion

A more sophisticated hybrid decouples the temporal and spatial aspects of generation: an autoregressive model handles the temporal sequence of compact representations, and a diffusion model handles the spatial rendering of each representation into a full frame.

Definition 83 (Temporal AR, Spatial Diffusion).

The temporal AR, spatial diffusion hybrid factorises video generation as (Temporal AR Spatial DIFF)p(𝖷)=pAR(c1,c2,,cF)temporal planningpdiff(𝖷|c1,c2,,cF)spatial rendering, where cf is a compact latent code for frame f (e.g., a quantised token or a low-dimensional embedding) generated autoregressively, and pdiff(𝖷|c1,,cF) is a conditional diffusion model that renders the full video given the sequence of codes.

This factorisation has a clean interpretation: the autoregressive model serves as a “director,” planning what happens at each point in the video, while the diffusion model serves as a “renderer,” producing the high-quality visual output. The codes cf capture semantic content (object positions, actions, scene changes) while abstracting away pixel-level details (textures, lighting, exact colours) that the diffusion model handles.

The temporal AR, spatial diffusion hybrid. An autoregressive model generates a sequence of compact codes (c1,,cF) capturing temporal dynamics. A diffusion model renders the full video conditioned on these codes, producing high-quality frames. The AR model handles “what happens,” while the diffusion model handles “how it looks.”

Prominent hybrid systems

Several influential systems have demonstrated the power of the hybrid approach.

Example 60 (VideoPoet).

VideoPoet [54], developed by Google Research, is a large language model (LLM) that generates video through a two-stage process. First, videos are tokenised into discrete codes using a video tokeniser (an extension of MAGVIT-v2). Then, an autoregressive transformer generates sequences of video tokens conditioned on text tokens, image tokens, audio tokens, or any combination thereof. The key advantage of this approach is task unification: text-to-video, image-to-video, video-to-audio, and video editing can all be expressed as sequence-to-sequence tasks within the same framework.

The “diffusion” component in VideoPoet is embedded in the tokeniser/detokeniser: the video tokeniser uses a learned quantisation scheme that is trained jointly with a decoder that reconstructs continuous video from discrete tokens. While the generation itself is autoregressive (token-by-token), the reconstruction can optionally be enhanced with diffusion-based super-resolution.

The unification is compelling from an engineering perspective: a single model handles text-to-video, image-to-video, video-to-video, video editing, and even video-to-audio by simply formatting the task as a sequence-to-sequence problem with appropriate input/output token types. This is the video analogue of the “foundation model” paradigm in NLP, where a single large language model handles diverse tasks through prompt engineering.

Example 61 (MAGVIT-v2 + Language Model).

MAGVIT-v2 [55] introduces a “lookup-free quantisation” scheme that enables video tokenisation with a vocabulary size exceeding 218 without the codebook collapse problems that plague standard vector quantisation. When combined with a large language model as the autoregressive backbone, this produces a system that generates video tokens at the quality level of continuous diffusion models while benefiting from the scalability and versatility of language model architectures.

The core innovation is in the tokeniser. Standard VQ-VAE approaches struggle with video because the combinatorial space of video tokens is enormous, and most codebook entries go unused. MAGVIT-v2's lookup-free quantisation replaces the codebook lookup with a simple binary decomposition: each latent vector is quantised by taking the sign of each dimension, producing a binary code that is converted to a token index. This ensures full codebook utilisation and enables the massive vocabulary sizes needed for high-fidelity video representation.

Example 62 (Emu Video).

Emu Video [56] takes a particularly clean approach to the hybrid paradigm. It factorises text-to-video generation into two explicit stages: (1) text-to-image generation using a high-quality image diffusion model, producing a single keyframe, and (2) image-to-video generation using a video diffusion model conditioned on both the text prompt and the generated keyframe. While this is not an AR-diffusion hybrid in the strictest sense (the autoregressive component generates only a single “token,” the keyframe), it embodies the same principle of using different model types for different aspects of the generation process.

The advantage is simplicity: each stage can be trained independently, the image generation model benefits from the much larger corpus of image-text pairs, and the video generation model has a strong visual anchor (the keyframe) that promotes temporal consistency.

Theoretical comparison of paradigms

To understand why hybrids are attractive, consider the complementary strengths and weaknesses of the pure paradigms.

lccc@ PropertyPure ARPure DiffusionHybrid
Long-range planningStrongWeakStrong
Per-frame qualityMediumStrongStrong
Generation speedSlowMediumMedium
Variable lengthNativeRequires tricksNative
Multi-modal integrationNativeRequires adaptersNative
Training data needsTokenised videoContinuous videoBoth
Error accumulationLinearBoundedIntermediate
Comparison of pure autoregressive, pure diffusion, and hybrid approaches for video generation. Hybrids aim to combine the planning ability of AR models with the visual quality of diffusion models.

Remark 81 (The convergence of paradigms).

An interesting trend in the field is the gradual convergence of autoregressive and diffusion approaches. Masked diffusion models can be viewed as non-autoregressive versions of masked language models. Autoregressive models with continuous outputs (like those using diffusion loss instead of cross-entropy) are essentially diffusion models with autoregressive structure. Flow matching can be applied both to continuous data (as in standard diffusion) and to discrete tokens (as in discrete flow matching). This convergence suggests that the “AR versus diffusion” distinction may be less fundamental than it appears, and that the most effective future systems will seamlessly blend both paradigms.

Architectural patterns for hybrids

Several architectural patterns have emerged for building hybrid systems.

Pattern 1: Token-then-render. Generate discrete tokens autoregressively, then render continuous outputs from tokens using a diffusion decoder. This is the approach of VideoPoet and MAGVIT-v2 + LM. The advantage is clean separation of concerns; the disadvantage is that quantisation introduces an information bottleneck.

Pattern 2: Plan-then-diffuse. Generate a coarse plan (keyframes, layout, motion trajectory) autoregressively, then generate the full video conditioned on the plan using diffusion. This is related to the hierarchical keyframe generation of Hierarchical keyframe generation and to Emu Video's two-stage approach. The advantage is that the AR component operates in a much lower-dimensional space; the disadvantage is that the plan must capture enough information to guide the diffusion model.

Pattern 3: Interleaved AR-diffusion. Alternate between autoregressive steps (generating a new token or code) and diffusion steps (refining the current output). This is the most tightly coupled pattern and the hardest to train, but it allows the AR and diffusion components to inform each other throughout the generation process.

Exercise 49 (Designing a hybrid architecture).

You are designing a text-to-video model for generating 30-second clips at 720p resolution.

  1. Compare the three architectural patterns (token-then-render, plan-then-diffuse, interleaved) in terms of training complexity, generation speed, and expected quality.

  2. For the plan-then-diffuse pattern, what should the “plan” consist of? Consider at least three options (e.g., keyframes, text descriptions, layout maps) and discuss their trade-offs.

  3. How would you handle the text prompt in each pattern? In some patterns, the text directly conditions the AR model; in others, it conditions the diffusion model; in some, both.

  4. Estimate the generation time for a 30-second, 720p video using each pattern, assuming a single A100 GPU. State your assumptions about model size, token count, and diffusion steps.

Proposition 40 (Information Bottleneck in Token-Based Hybrids).

In a token-then-render hybrid, the video tokeniser maps each frame to K discrete tokens from a codebook of size V. The maximum information per frame is Klog2V bits. For a codebook of size V=218 and K=256 tokens per frame, this gives 256×18=4,608 bits per frame. A raw 720p RGB frame contains approximately 1280×720×3×8=22,118,400 bits. The compression ratio is therefore approximately 4,800:1.

The quality of the hybrid system is fundamentally limited by how much perceptually relevant information is preserved through this bottleneck. If the tokeniser discards information that the diffusion renderer cannot reconstruct, no amount of training will recover it.

Proof.

The information bound follows directly from the capacity of the discrete channel. Each of K tokens can take one of V values, giving VK possible configurations. The information content is log2(VK)=Klog2V bits. The compression ratio is the ratio of raw bits to token bits: r=(H×W×C×8)/(Klog2V). Substituting the given values yields r4,800.

Remark 82 (Beyond discrete tokenisation).

The information bottleneck of discrete tokenisation has motivated research into continuous token hybrids, where the AR model generates continuous-valued representations rather than discrete indices. In this setting, the AR model predicts each “token” as a continuous vector, potentially using a diffusion loss (rather than cross-entropy) for the per-token prediction. This eliminates the quantisation bottleneck at the cost of requiring different training objectives and sampling procedures. Models such as MAR (Masked Autoregressive generation) explore this direction, blurring the line between AR and diffusion even further.

Key Idea.

The best of both worlds. Autoregressive-diffusion hybrids represent a synthesis of two powerful generative paradigms. By delegating temporal planning to an autoregressive backbone and spatial rendering to a diffusion model, these architectures can generate long, coherent videos with high visual quality. The field is converging toward architectures that seamlessly blend discrete sequential reasoning with continuous visual generation, and the distinction between “AR models” and “diffusion models” is becoming increasingly blurred.

Exercise 50 (Tokenisation quality analysis).

Consider a video tokeniser that maps each 16×16 spatial patch of a 256×256 video frame to a single discrete token from a codebook of size V.

  1. How many tokens represent one frame? What is the information content per frame as a function of V?

  2. For what minimum V does the information content match the entropy of a natural image patch (estimated at approximately 3 bits per pixel for compressed video)?

  3. MAGVIT-v2 uses V=218. Is this sufficient by your analysis in part (b)? If not, what compensates?

  4. Propose a metric for evaluating tokenisation quality that goes beyond reconstruction PSNR. Consider temporal aspects specific to video.

Historical Note.

From rivalry to synthesis. The autoregressive and diffusion paradigms developed largely in parallel. Autoregressive visual generation emerged from the VQ-VAE line of work (van den Oord et al., 2017), which demonstrated that images could be represented as sequences of discrete tokens and generated by powerful sequence models. VideoGPT [2] extended this to video, using VQ-VAE tokenisation followed by GPT-style generation. Meanwhile, diffusion models for video emerged from the image diffusion revolution (Ho et al., 2020), with Video Diffusion Models [3] demonstrating the viability of joint space-time denoising.

The realisation that these paradigms are complementary rather than competing emerged around 2023–2024, when systems like VideoPoet, Emu Video, and MAGVIT-v2 showed that combining AR planning with diffusion rendering produced results superior to either paradigm alone. This synthesis reflects a broader trend in generative modelling: the most powerful systems combine multiple generative mechanisms, each contributing its distinctive strengths.

In the next part of this chapter (File G), we turn to the practical considerations of training and deploying video diffusion models at scale: efficient training recipes, inference optimisations, evaluation metrics, and the open challenges that define the frontier of video generation research.

Evaluation Metrics for Video Generation

Generating videos is only half the challenge; the other half is measuring whether the generated videos are any good. Unlike image generation, where the Fréchet Inception Distance (FID) [74] has become a near-universal yardstick, the evaluation of video generation models must contend with an additional temporal dimension that fundamentally complicates quality assessment. A video can have excellent per-frame quality yet exhibit temporal flickering; it can be temporally smooth yet lack diversity; it can match the data distribution in aggregate statistics yet fail to produce physically plausible motion.

In this section, we formalise the principal evaluation metrics used in the field, analyse their mathematical properties, and discuss their strengths and limitations. We begin with the Fréchet Video Distance (FVD), the most widely used automatic metric for video generation, and then turn to the more recent decomposed evaluation frameworks that aim to capture the multifaceted nature of video quality.

Fréchet Video Distance

The Fréchet Video Distance extends the FID from images to video by replacing the Inception-v3 feature extractor with a video-aware network, typically an Inflated 3D ConvNet (I3D) [75]. The I3D network processes short video clips and produces a feature vector that captures both spatial appearance and temporal dynamics.

Definition 84 (Fréchet Video Distance).

Let 𝒱r={𝖷1,,𝖷N} be a set of real video clips and 𝒱g={𝖷1,,𝖷M} a set of generated video clips. Let ϕ:F×H×W×3d be a feature extractor (typically I3D with d=400). Define the empirical mean and covariance of the real and generated feature sets: (FVD Stats REAL)𝝁r=1Ni=1Nϕ(𝖷i),𝚺r=1N1i=1N(ϕ(𝖷i)𝝁r)(ϕ(𝖷i)𝝁r)𝖳,𝝁g=1Mj=1Mϕ(𝖷j),𝚺g=1M1j=1M(ϕ(𝖷j)𝝁g)(ϕ(𝖷j)𝝁g)𝖳. The Fréchet Video Distance is (FVD)FVD=𝝁r𝝁g2+trace(𝚺r+𝚺g2(𝚺r𝚺g)1/2).

The FVD inherits the mathematical structure of the FID and admits a clean interpretation in terms of optimal transport.

Theorem 15 (FVD as Wasserstein Distance).

Let 𝒩(𝝁r,𝚺r) and 𝒩(𝝁g,𝚺g) be the Gaussian distributions fitted to the real and generated feature sets, respectively. Then (FVD W2)FVD=W22(𝒩(𝝁r,𝚺r),𝒩(𝝁g,𝚺g)), where W2 denotes the 2-Wasserstein distance (see ch:sinkhorn for a comprehensive treatment of optimal transport distances).

Proof.

The squared 2-Wasserstein distance between two Gaussians p=𝒩(𝝁p,𝚺p) and q=𝒩(𝝁q,𝚺q) on d is given by the Dowson–Landau–Olkin–Pukelsheim formula: (W2 Gaussian)W22(p,q)=𝝁p𝝁q2+trace(𝚺p+𝚺q2(𝚺p𝚺q)1/2). To see this, recall from ch:sinkhorn that the optimal transport map between two Gaussians is affine. Specifically, the optimal coupling γ between p and q is itself Gaussian with marginals p and q, and the transport cost under the squared Euclidean distance c(𝒙,𝒚)=𝒙𝒚2 is (W2 Expansion)W22(p,q)=infγΠ(p,q)𝔼(𝒙,𝒚)γ[𝒙𝒚2]=𝝁p𝝁q2+trace(𝚺p)+trace(𝚺q)2trace((𝚺p1/2𝚺q𝚺p1/2)1/2). Using the identity trace((𝑨𝑩𝑨)1/2)=trace((𝑨2𝑩)1/2) for positive semi-definite 𝑨 and 𝑩 (with 𝑨=𝚺p1/2), we simplify the last term to trace((𝚺p𝚺q)1/2), yielding exactly the FVD formula (FVD).

Remark 83 (Connection to FID).

The FVD is structurally identical to the FID introduced in ch:divergences; the only difference is the choice of feature extractor. FID uses Inception-v3 features computed from individual images, while FVD uses I3D features computed from video clips. Because I3D processes multiple frames jointly, its features encode temporal patterns (motion direction, speed, periodicity) that are invisible to a per-frame image feature extractor.

FVD Computation Pipeline

fig:vdiff:fvd-pipeline illustrates the end-to-end computation of FVD. The pipeline has four stages: (i) sample N real and M generated clips, (ii) extract I3D features from each clip, (iii) compute the sample mean and covariance of each feature set, and (iv) evaluate the closed-form FVD expression.

FVD computation pipeline. Real and generated video clips are independently passed through a pretrained I3D feature extractor. The sample mean and covariance of each feature set are computed, and the closed-form FVD expression ((FVD)) is evaluated. Lower FVD indicates closer match to the real data distribution.

Example 63 (FVD in practice).

When computing FVD, several practical details matter:

  1. Sample size. FVD is a biased estimator: with too few samples, the covariance matrices are poorly estimated, leading to unreliable scores. The community convention is to use at least N=M=2,048 clips, following the recommendation of Unterthiner et al. [57].

  2. Clip length. The I3D network expects clips of a fixed length (typically 16 frames at 224×224 resolution). Longer generated videos must be split into non-overlapping 16-frame segments, and FVD is computed over the pooled set of segments.

  3. Resolution alignment. Both real and generated clips must be resized to the same resolution before feature extraction. Resolution mismatches introduce systematic biases in the feature statistics.

  4. Random seed sensitivity. FVD can vary significantly across different random samples from the generation model. Reporting the mean and standard deviation over multiple evaluation runs is essential for reliable comparison.

Limitations of FVD

Despite its widespread use, FVD has several well-known limitations.

Caution.

FVD is a single number for a multidimensional problem. The FVD collapses the entire distribution of video quality into a scalar. Two models with the same FVD can differ dramatically in their failure modes: one might produce temporally smooth but visually bland videos, while the other produces high-fidelity frames with occasional temporal glitches. FVD cannot distinguish between these failure modes because it aggregates over all aspects of quality simultaneously. Furthermore, the I3D features were trained for action recognition, not video quality assessment, so FVD may be insensitive to artifacts that are perceptually important but irrelevant to action classification.

Additional limitations include the following:

  1. Gaussian assumption. FVD assumes that the feature distributions are well-approximated by Gaussians. If the true feature distribution is multimodal (as it typically is for diverse video datasets), the Gaussian fit discards important structural information.

  2. Feature extractor bias. The I3D network was trained on the Kinetics dataset, which is dominated by human actions. FVD may therefore be more sensitive to motion quality in human-centric videos than in scenes involving natural phenomena, animals, or abstract content.

  3. No per-sample quality. FVD is a distributional metric: it compares two sets of videos, not individual samples. It cannot tell you whether a specific generated video is good or bad.

  4. Temporal resolution. The 16-frame input window of I3D limits FVD's ability to detect long-range temporal inconsistencies that manifest over seconds rather than fractions of a second.

Decomposed Evaluation: VBench

Recognising the limitations of single-number metrics, Huang et al. [76] introduced VBench, a comprehensive evaluation framework that decomposes video quality into 16 interpretable dimensions. The key insight is that “video quality” is not a monolithic concept but a composite of many independent axes, each of which can be measured separately and improved independently.

Definition 85 (VBench Decomposition).

The VBench framework evaluates a video generation model along 16 dimensions, grouped into two categories:

  1. Video quality dimensions (measuring the intrinsic quality of generated videos): enumerate[label=()]

  2. Subject consistency

  3. Background consistency

  4. Temporal flickering

  5. Motion smoothness

  6. Dynamic degree

  7. Aesthetic quality

  8. Imaging quality

  9. Object class

  10. Multiple objects

  11. Colour

  12. Spatial relationship

  13. Scene enumerate

  14. Video-text alignment dimensions (measuring faithfulness to the text prompt): enumerate[label=(), resume]

  15. Overall consistency

  16. Human action

  17. Temporal style

  18. Appearance style enumerate

Each dimension dk for k=1,,16 is measured by a specialised evaluator ψk that returns a scalar score sk=ψk(𝖷,prompt)[0,1].

The decomposed nature of VBench allows researchers to diagnose specific weaknesses in their models. A model that scores poorly on “temporal flickering” but well on “imaging quality” clearly has a temporal consistency problem, not a per-frame quality problem. This diagnostic power is impossible with FVD alone.

VBench radar chart comparing two hypothetical video generation models across 16 evaluation dimensions. Model A (blue) excels at per-frame quality but struggles with dynamic degree and multiple objects. Model B (orange) produces more dynamic and temporally consistent videos but has lower per-frame fidelity. FVD alone would assign each model a single number, concealing these complementary strengths and weaknesses.

Temporal Consistency Metrics

Beyond FVD and VBench, a family of lightweight metrics specifically targets temporal consistency, the quality that distinguishes a coherent video from a slideshow of pretty pictures.

Definition 86 (CLIP-Based Temporal Consistency).

Given a generated video 𝖷=[𝒙1,,𝒙F] and a CLIP image encoder CLIP:H×W×3d, the CLIP temporal consistency score is (TC CLIP)TC=11F1f=1F1CLIP(𝒙f)CLIP(𝒙f+1)CLIP(𝒙f). The score lies in [0,1], with TC=1 indicating perfect temporal consistency (all frames map to identical CLIP embeddings) and lower values indicating greater inter-frame variation.

Remark 84 (Interpreting temporal consistency).

The TC score measures semantic consistency rather than pixel-level consistency. Two frames that depict the same scene from slightly different viewpoints will have similar CLIP embeddings and thus high TC, even though their pixel values differ substantially. This is a feature rather than a bug: the metric captures the perceptually relevant notion that the video depicts a coherent scene, without penalising natural motion.

Proposition 41 (Bounds on CLIP Temporal Consistency).

If the CLIP encoder maps all natural images to vectors of approximately unit norm (i.e., CLIP(𝒙f)1 for all f), then the temporal consistency score simplifies to (TC Simplified)TC11F1f=1F1CLIP(𝒙f)CLIP(𝒙f+1)=1d, where d is the average consecutive-frame distance in CLIP space. Furthermore, by the triangle inequality applied across all frame pairs, (TC Triangle)d1F1CLIP(𝒙1)CLIP(𝒙F), so a video whose first and last frames are semantically distant must have low TC, regardless of how smooth the intermediate transitions are.

In addition to CLIP-based metrics, several other temporal quality measures are commonly used:

  1. Warping error: Given optical flow 𝒗f between frames f and f+1, the warping error measures how well frame f+1 can be reconstructed by warping frame f: (WARP Error)Ewarp=1F1f=1F11HWi,j𝒙i,jf+1𝒲(𝒙f,𝒗f)i,j2, where 𝒲(𝒙f,𝒗f) warps frame 𝒙f using flow 𝒗f via bilinear interpolation.

  2. Subject identity preservation : A face recognition model (e.g., ArcFace) extracts embeddings from detected faces across frames, and the cosine similarity between consecutive embeddings is averaged. This is particularly relevant for talking-head and character animation applications.

  3. Motion magnitude score : The average optical flow magnitude m=1F1f1HWi,j𝒗i,jf measures the overall dynamic degree of the video. A video with m0 is essentially a static image, which may indicate a degenerate generation mode even if FVD is low.

Human Evaluation Protocols

Automatic metrics, no matter how sophisticated, remain imperfect proxies for human perception. For this reason, human evaluation remains the gold standard for assessing video generation quality.

The most common protocol is the two-alternative forced choice (2AFC): evaluators are shown pairs of videos (one real, one generated, or two generated by different models) and asked to choose which is more realistic or better matches a text prompt. The fraction of times a model's output is preferred yields a win rate that is directly interpretable.

A more nuanced protocol decomposes the evaluation into separate dimensions, mirroring the VBench structure. Evaluators are asked to rate each video on temporal consistency, visual quality, motion naturalness, and text alignment on a Likert scale (e.g., 1 to 5). This decomposed human evaluation is expensive (typically requiring hundreds of evaluators and thousands of judgements) but provides the most reliable signal for model comparison.

Insight.

Automatic metrics correlate imperfectly with human judgement. Studies comparing FVD rankings with human preference rankings have found moderate but not strong correlation (Spearman ρ0.50.7 depending on the dataset and evaluation protocol). VBench dimensions tend to correlate better individually with their corresponding human judgement axes, but no automatic metric fully captures the holistic “does this look like a real video?” assessment that humans perform effortlessly. For this reason, papers that claim state-of-the-art video generation quality should always include human evaluation alongside automatic metrics.

Evaluation Summary

tab:vdiff:eval-summary compares the key evaluation approaches discussed in this section.

p2.5cmp2.0cmp2.5cmp2.5cmp2.5cm@ MetricTypeStrengthsWeaknessesBest for
FVDDistributionalSingle number; widely used; cheap to computeInsensitive to temporal artifacts; Gaussian assumptionQuick comparisons across models
VBenchDecomposedDiagnostic; 16 dimensions; interpretableComplex to set up; evaluator-dependentIdentifying specific failure modes
CLIP TCPer-videoLightweight; semantic levelOnly measures semantic driftTemporal consistency screening
Warping errorPer-videoPixel-level; motion-awareRequires flow estimation; sensitive to occlusionMotion quality assessment
Human evalPerceptualGold standard; holisticExpensive; slow; subjectiveFinal model comparison
Comparison of video generation evaluation approaches.

Specialised Applications

The general-purpose text-to-video pipeline developed in the preceding sections can be specialised to a remarkable variety of application domains. In each case, the core diffusion backbone remains largely unchanged; what differs is the conditioning signal, the data domain, and the task-specific loss functions or architectural adaptations. In this section, we survey four particularly active application areas: human motion generation, audio-visual synthesis, talking head generation, and virtual try-on.

Human Motion Generation

Human motion generation aims to synthesise realistic sequences of body poses, typically represented as trajectories of joint positions or rotations over time. Unlike pixel-space video generation, the output is a structured skeletal sequence, making the problem both lower-dimensional and more constrained.

Definition 87 (Skeletal Motion Sequence).

A skeletal motion sequence of F frames with J joints is a tensor 𝖰F×J×D, where the f-th frame 𝒒fJ×D specifies the position (or rotation) of each joint. Common choices are:

  1. Joint positions: 𝒒fj3 is the 3D world coordinate of joint j in frame f, giving D=3.

  2. Joint rotations: 𝒒fj6 encodes the 6D continuous rotation representation of joint j relative to its parent in the kinematic chain, giving D=6.

  3. Joint velocities: 𝒒˙fj3 captures the per-frame displacement, useful for motion that must begin and end at specified poses.

For a standard 22-joint human skeleton with D=3 and F=120 (corresponding to 4 seconds at 30 fps), the total dimensionality is 120×22×3=7,920, many orders of magnitude smaller than the pixel-space representation of the corresponding video.

Insight.

Motion generation is diffusion in a structured, low-dimensional space. Because skeletal representations are compact and obey kinematic constraints (fixed bone lengths, joint angle limits), the diffusion process operates in a space where the manifold of valid motions is much better behaved than the manifold of natural images. This makes the denoising task easier: the model need not learn to synthesise textures, lighting, or backgrounds, only the dynamics of human movement.

The Motion Diffusion Model (MDM) [77] pioneered the application of diffusion to text-conditioned motion generation. MDM trains a denoiser ϵθ(𝖰t,t,𝒄) that takes a noised motion sequence 𝖰t at noise level t and a text embedding 𝒄 (e.g., “a person walks forward and then waves”), and predicts the clean motion 𝖰0. The loss is the standard denoising objective applied to the motion tensor: (MDM LOSS)MDM=𝔼t,𝖰0,𝝐[𝖰0𝖰^θ(𝖰t,t,𝒄)2], where 𝖰^θ is the 𝒙0-prediction variant of the denoiser.

Human motion generation via diffusion. A text prompt is encoded and used to condition a denoiser that operates directly on the skeletal joint trajectory tensor 𝖰F×J×3. The generated motion (four selected frames shown) depicts a walking and waving sequence.

The compact representation allows motion diffusion models to generate 4-second sequences in under one second on a single GPU, a stark contrast to the minutes required for pixel-space video generation. However, rendering the skeletal motion as a photorealistic video requires a separate rendering stage, often using a pretrained video diffusion model conditioned on the skeleton sequence [78][37].

Audio-Visual Generation

Videos in the real world are rarely silent: speech, music, ambient sounds, and sound effects are integral to the viewing experience. Audio-visual generation aims to produce video and audio jointly, or to condition one modality on the other.

The core architectural idea is to introduce cross-modal attention between audio and video representations within the diffusion backbone. Let 𝖹vidF×H×W×Cv be the video latent and 𝖹audTa×Ca be the audio spectrogram latent (where Ta is the number of audio frames and Ca is the frequency dimension). Cross-modal attention computes: (AV QKV)𝑸=𝖹vid𝐖Q,𝑲=𝖹aud𝐖K,𝑽=𝖹aud𝐖V,CrossAttn(𝖹vid,𝖹aud)=softmax(𝑸𝑲𝖳dk)𝑽, where 𝐖Q,𝐖K,𝐖V are learned projection matrices. This allows the video denoiser to attend to audio features at each denoising step, aligning visual events with their corresponding sounds.

Audio-visual generation architecture. Audio features extracted from a mel spectrogram condition the video denoiser via cross-modal attention, enabling synchronised audio-visual output.

Ruan et al. [79] demonstrated that a joint audio-video diffusion model (MM-Diffusion) can generate coherent audio-video pairs by running coupled diffusion processes in both modalities, with cross-attention providing the synchronisation signal. The key challenge is temporal alignment: a drum hit at time t in the audio must correspond to the visual impact at the same time t in the video. This is typically enforced through positional encoding that shares a common time axis across modalities.

Talking Head Synthesis

Talking head synthesis generates a video of a person speaking, driven by an audio clip, a text transcript, or both. The output must satisfy three simultaneous constraints: (i) lip movements must be synchronised with the audio, (ii) facial expressions must be natural and emotionally appropriate, and (iii) the identity of the person must remain consistent across all frames.

Facial Action Unit Conditioning

Many talking-head models condition on facial action units (AUs), a standardised encoding of facial muscle activations derived from the Facial Action Coding System (FACS). Each AU corresponds to a specific muscle group (e.g., AU1 = inner brow raiser, AU12 = lip corner puller). A vector of AU intensities 𝒂[0,1]A (where A is the number of tracked AUs, typically 17–46) provides a compact, disentangled representation of facial expression that can be extracted from audio using a learned mapping.

Lip Synchronisation Loss

A critical component of talking-head quality is lip-audio synchronisation. The standard approach uses a pretrained sync expert network S that takes a short video clip (typically 5 frames centred on the mouth region) and the corresponding audio segment, and outputs a synchronisation score S(𝒙mouthf2:f+2,𝒂f2:f+2)[0,1]. The sync loss encourages high synchronisation scores during training: (SYNC LOSS)sync=1Ff=1FlogS(𝒙mouthf2:f+2,𝒂f2:f+2).

EMO [80] and AniPortrait [81] represent the current state of the art in diffusion-based talking-head synthesis. EMO introduces a speed controller and a face region controller that allow fine-grained control over the dynamics and spatial extent of facial animations. AniPortrait uses a two-stage pipeline: first generating a sequence of facial landmarks from audio, then rendering those landmarks into a photorealistic video using a diffusion-based image animator.

Remark 85 (Identity preservation).

A persistent challenge in talking-head synthesis is maintaining the subject's identity across frames and across different driving signals. The model must learn to separate identity (which should remain constant) from expression and pose (which should change). This is typically achieved through identity embedding networks that extract a fixed identity vector from a reference image and inject it into the denoiser via cross-attention or adaptive normalisation.

Virtual Try-On

Virtual try-on generates images or videos of a person wearing a specified garment, given a reference image of the person and a flat-lay image of the garment. The diffusion-based approach conditions the generation on a warped garment obtained through appearance flow estimation.

Definition 88 (Appearance Flow for Virtual Try-On).

Let 𝒈H×W×3 be the garment image and 𝒑H×W×3 be the person image. An appearance flow network ϕ:(𝒈,𝒑)𝒗 estimates a dense deformation field 𝒗H×W×2 that warps the garment to align with the person's pose: (Garment WARP)𝒈^=𝒲(𝒈,𝒗), where 𝒲 denotes spatial warping via bilinear sampling. The warped garment 𝒈^ is then used as a conditioning input to the diffusion model, which refines the warped result into a photorealistic composite.

For video virtual try-on, the warping must be temporally coherent: the garment must deform smoothly as the person moves. This is achieved by extending the appearance flow to a spatiotemporal field 𝒗F×H×W×2 and adding a temporal smoothness regulariser: (FLOW Smooth)smooth=1F1f=1F1𝒗f+1𝒗f2.

DreamPose [82] demonstrates that a pretrained image diffusion model can be adapted for fashion video generation by conditioning on pose sequences extracted from a driving video. CatVTON [83] simplifies the pipeline by using concatenation-based conditioning, directly concatenating the garment image with the noised person image along the channel dimension, eliminating the need for a separate warping network.

Connections and Synthesis

Video diffusion models do not exist in isolation. They draw upon, extend, and illuminate ideas from nearly every major topic covered in this book. In this section, we make these connections explicit, linking the techniques developed throughout this chapter to the theoretical foundations established in earlier parts. Each connection is presented as an insight box that identifies the specific relationship and points to the relevant chapter for further study.

Variational Inference

Insight.

The video VAE as a variational model (ch:vi). The video autoencoder at the heart of latent video diffusion is a variational autoencoder in the precise sense developed in ch:vi. The encoder parameterises an approximate posterior qϕ(𝖹|𝖷), the decoder 𝒟 parameterises the likelihood pθ(𝖷|𝖹), and training maximises the evidence lower bound: (Video VAE ELBO)logp(𝖷)𝔼qϕ(𝖹|𝖷)[logpθ(𝖷|𝖹)]KL(qϕ(𝖹|𝖷)p(𝖹)). The video-specific challenge is that 𝖷 is a high-dimensional spatiotemporal tensor, so the KL regularisation must balance spatial and temporal compression. The causal VAE architectures discussed in earlier sections ensure that the posterior factorises appropriately for autoregressive generation.

Optimal Transport and Flow Matching

Insight.

Flow matching as optimal transport (ch:sinkhorn). The flow matching framework, increasingly preferred over the classical DDPM formulation for video generation, has deep roots in optimal transport theory. The conditional flow path pt(𝖹|𝖹0,𝖹1)=𝒩((1t)𝖹0+t𝖹1,σt2𝐈) traces a (nearly) straight path from noise to data, corresponding to the Benamou–Brenier formulation of optimal transport as a dynamical problem. The velocity field 𝒗t(𝖹) that the model learns is the gradient of the Kantorovich potential, and the resulting trajectories approximate the Monge map. This connection, explored in depth in ch:sinkhorn, explains why flow matching paths are straighter and require fewer discretisation steps than the curved paths of DDPM.

Insight.

FVD is the Wasserstein distance (ch:sinkhorn, ch:divergences). As we proved in Theorem 15, the Fréchet Video Distance is exactly the squared 2-Wasserstein distance between Gaussians fitted to the real and generated feature distributions. This connects the evaluation of video generation models directly to the theory of optimal transport. The Wasserstein distance has several properties that make it a natural choice for comparing generative distributions: it metrises weak convergence, it is well-defined even when the supports of the two distributions do not overlap (unlike KL divergence), and it has a geometric interpretation as the minimum-cost transport plan.

Generative Adversarial Networks

Insight.

Adversarial losses in video autoencoders (ch:gan). The training of video autoencoders often includes an adversarial component, a discriminator that distinguishes real from reconstructed video patches. This use of adversarial training within a diffusion pipeline creates a direct connection to the GAN framework of ch:gan. The discriminator loss provides a learned perceptual metric that penalises high-frequency artifacts that reconstruction losses (MSE, LPIPS) might miss. Historically, GANs were the dominant paradigm for video generation before diffusion models, with MoCoGAN, DVD-GAN, and StyleGAN-V pushing the boundaries of resolution and temporal coherence. The transition to diffusion brought improved training stability and diversity at the cost of increased sampling time, a tradeoff that distillation techniques (discussed in earlier sections) are steadily resolving.

Memory and Long-Context Processing

Insight.

KV-cache and sparse attention for long video (ch:memory). Generating videos longer than a few seconds requires processing context windows that span hundreds or thousands of latent frames. The memory management techniques developed in ch:memory, including KV-cache compression, sliding window attention, and retrieval-augmented generation, are directly applicable. The temporal caching strategies discussed in earlier sections (where attention outputs from previous denoising steps are reused for distant frames) are a video-specific instantiation of the KV-cache eviction policies developed for long-context language models. Similarly, the hierarchical attention patterns used in video DiTs (local windows for nearby frames, global tokens for distant ones) mirror the sparse attention architectures designed for processing long documents.

Continual Learning

Insight.

Adapting video models without forgetting (ch:continual). Video diffusion models are typically pretrained on massive datasets and then fine-tuned for specific domains (e.g., medical imaging, autonomous driving, artistic styles). This fine-tuning must avoid catastrophic forgetting of the general video generation capabilities learned during pretraining. The continual learning framework of ch:continual provides the theoretical tools: elastic weight consolidation (EWC) identifies which parameters are critical for existing capabilities, LoRA and adapter layers add new capabilities with minimal parameter interference, and experience replay maintains a buffer of pretraining examples to prevent distribution shift. The LoRA-based fine-tuning approach used in AnimateDiff and similar systems is precisely a low-rank adaptation strategy designed to minimise forgetting.

Agentic AI and World Models

Insight.

Video diffusion as a world model for planning (ch:continual, agentic AI). A video diffusion model trained on large-scale video data implicitly learns a world model: given a current state (the first frame or a text description) and an action (a camera movement, a text instruction, or a control signal), it can simulate the future evolution of the scene. This capability connects directly to the world model paradigm in reinforcement learning [58], where an agent plans by “imagining” future trajectories in a learned simulator. Recent work such as Genie [53], UniSim [51], and Cosmos [59] has begun to exploit this connection, using video diffusion models as the dynamics model in model-based RL. The key challenge is that diffusion sampling is stochastic: the model generates plausible futures rather than deterministic predictions, which requires planning algorithms that can reason over distributions of outcomes rather than point estimates.

Normalizing Flows

Insight.

Flow matching bridges diffusion and normalizing flows (ch:flows). The flow matching formulation of video diffusion models can be viewed as a continuous normalizing flow (CNF) with a specific parameterisation of the velocity field. In ch:flows, we studied normalizing flows as invertible transformations that map a simple base distribution to the data distribution, with the log-likelihood computed via the change-of-variables formula. Flow matching simplifies this by abandoning exact invertibility and exact likelihood in favour of a simulation-free training objective. The resulting model defines a probability flow ODE whose trajectories transport noise to data, just as in a CNF, but the training is dramatically simpler because it avoids the expensive Jacobian computation required for exact likelihood. This theoretical connection explains why flow matching has displaced both DDPM and classical normalizing flows in modern video generation systems.

Neural Network Engineering

Insight.

RoPE, MoE, and distillation (ch:nn-tricks). Video diffusion models are among the largest and most computationally demanding neural networks in existence, and they benefit enormously from the engineering techniques catalogued in ch:nn-tricks. Rotary positional embeddings (RoPE), extended to 3D for spatiotemporal position encoding, enable resolution-flexible generation without retraining. Mixture-of-experts (MoE) layers allow the model to scale capacity without proportionally scaling computation, activating only a subset of experts for each token. Distillation techniques (progressive distillation, consistency distillation, adversarial distillation) compress the sampling process from dozens of steps to one or a few, bringing video generation closer to real-time. Each of these techniques is developed from first principles in ch:nn-tricks and finds direct application in the video diffusion architectures discussed throughout this chapter.

Connections Map

fig:vdiff:connection-map visualises the connections between video diffusion and the other topics covered in this book.

Connection map linking video diffusion models to other chapters of this book. Each edge indicates a specific technical relationship discussed in the corresponding insight box.

Open Problems and Future Directions

Despite the remarkable progress documented in this chapter, video diffusion models remain far from the ideal video generation system envisioned in our desiderata (The video generation desiderata). In this section, we identify five fundamental open problems that define the frontier of the field. For each problem, we provide a formal statement, discuss why it is hard, and outline promising directions of attack.

Open Problem 1: Real-Time Generation

Current state-of-the-art video diffusion models require minutes to generate a few seconds of video on high-end GPUs. Interactive applications (video games, virtual reality, live communication) require generation at or near the video frame rate, which for standard video means 24–60 frames per second.

Conjecture 1 (Real-Time Video Diffusion).

There exists an architecture 𝒜 and a sampling procedure 𝒮 such that:

  1. 𝒜 processes a video latent 𝖹F×H×W×C in O(FHW) time (linear in the latent volume);

  2. 𝒮 requires K4 function evaluations to produce output within ϵ of the full-step quality (measured in FVD);

  3. the combined pipeline generates video at 24 fps on a single consumer GPU with 24 GB of memory.

Achieving this conjecture requires roughly a 1,000× speedup over current systems, which must come from a combination of sources:

  1. Architectural efficiency: Replacing quadratic attention with linear-time alternatives (state-space models, linear attention, sparse attention patterns) could reduce the per-step cost by 10100× for long videos.

  2. Fewer sampling steps: Consistency distillation, adversarial distillation, and rectified flow already reduce the step count from 50–100 to 1–4, providing a 1050× speedup.

  3. Temporal caching: Reusing attention maps and intermediate activations across nearby frames can reduce the effective number of full network evaluations by 25×.

  4. Hardware specialisation: Custom accelerators designed for the specific computation patterns of diffusion models (e.g., streaming denoising with pipelined attention) could provide an additional 25× improvement.

The product of these factors (100×25×3×322,500) suggests that the conjecture is not obviously impossible, but each factor is at the optimistic end of current estimates.

Open Problem 2: Minute-Scale Temporal Consistency

Generating videos longer than 10–15 seconds with consistent characters, environments, and narratives remains extremely challenging. Current approaches use autoregressive chunking (where each new chunk is conditioned on the end of the previous one), but this introduces accumulated drift: small inconsistencies compound over time, leading to “identity morphing” where characters gradually change appearance, and “environment shifting” where backgrounds drift between shots.

Problem 1 (Minute-Scale Consistency).

Design a video generation system that produces F-frame videos (with F corresponding to at least 60 seconds at 24 fps, i.e., F1,440) such that:

  1. Subject identity is preserved throughout: ID(𝒙1,𝒙f)>τid for all f, where ID measures identity similarity;

  2. Background consistency is maintained: BG(𝒙f,𝒙f+k)>τbg for all f and kK;

  3. Narrative coherence is preserved: actions initiated in early frames are completed in later frames in a causally consistent manner.

This problem is fundamentally difficult because it requires the model to maintain a persistent “world state” across a context window that is orders of magnitude larger than current training clip lengths. Promising approaches include:

  1. Hierarchical planning: first generating a coarse storyboard at low temporal resolution, then filling in details at full resolution conditioned on the storyboard;

  2. Persistent memory modules: maintaining an explicit memory bank of character appearances, object states, and scene layouts that is queried and updated throughout generation;

  3. Test-time optimisation: periodically optimising the generation to enforce consistency constraints (identity matching, background alignment) between distant frames.

Open Problem 3: Physical Grounding

Current video diffusion models learn an implicit model of physics from training data: they produce videos where objects usually fall downward, water usually flows downhill, and rigid bodies usually maintain their shape. However, they have no explicit physical constraints and routinely produce physically impossible outputs (objects that pass through each other, fluids that flow upward, shadows that are inconsistent with the light source).

Problem 2 (Physics-Constrained Diffusion).

Let 𝒫:F×H×W×Cm be a differentiable operator that encodes physical constraints (e.g., conservation laws, Navier–Stokes equations, rigid-body dynamics). A video 𝖷 satisfies the physics if 𝒫(𝖷)=𝟎. Design a video diffusion model pθ such that (Physics Constraint)supp(pθ){𝖷F×H×W×C:𝒫(𝖷)=𝟎}, i.e., the model generates only physically valid videos.

This problem sits at the intersection of generative modelling and physics-informed machine learning. The difficulty is twofold: (i) the physical constraints are defined in pixel space (or a physical state space) but the diffusion process operates in latent space, so the constraints must be “lifted” through the decoder; and (ii) hard constraints on the support of a learned distribution are fundamentally harder to enforce than soft penalties in the loss function.

Possible approaches include:

  1. Guided sampling: Using a differentiable physics simulator as a guidance function during the denoising process, steering the trajectory toward physically valid outputs at each step;

  2. Constrained latent spaces: Training the video autoencoder such that its latent space inherently respects physical constraints (e.g., by training with a physics-based reconstruction loss);

  3. Hybrid architectures: Combining a neural diffusion model (for appearance) with a symbolic physics engine (for dynamics), generating the physical state trajectory first and then rendering it into video.

Open Problem 4: Compositional Generation

Generating videos with multiple interacting objects, each with distinct attributes and behaviours, remains a significant weakness of current models. A prompt such as “a red ball bounces off a blue cube while a green sphere rolls in from the left” requires the model to:

  1. correctly instantiate three distinct objects;

  2. assign the correct colour to each;

  3. animate each object with physically plausible motion;

  4. model the interaction (the bounce) between the ball and cube;

  5. maintain the identity and attributes of each object throughout the video.

Current models frequently fail at one or more of these sub-tasks, exhibiting attribute leakage (the red ball becomes blue), object merging (two objects fuse into one), or interaction failure (the ball passes through the cube).

Problem 3 (Compositional Video Generation).

Given a structured scene description 𝒮={(ok,𝒂k,𝒎k)}k=1K specifying K objects with attributes 𝒂k (colour, shape, texture) and motions 𝒎k (trajectory, dynamics), generate a video 𝖷 such that:

  1. Each object ok appears in the video with attributes 𝒂k;

  2. Each object follows motion 𝒎k unless modified by interactions;

  3. Pairwise interactions between objects are physically plausible;

  4. Object identities and attributes are maintained throughout.

Compositional generation requires the model to maintain a form of object-centric representation within the diffusion process, a capability that monolithic architectures do not naturally support. Promising directions include slot-based diffusion models (where each object has its own latent “slot” that interacts with other slots through learned dynamics), layout-conditioned generation (where bounding boxes or segmentation masks constrain where each object appears), and compositional score functions (where the score for a multi-object scene is decomposed into per-object scores that are combined at inference time).

Open Problem 5: Unified Multimodal Generation

The ultimate vision for generative AI is a single model that can produce any combination of modalities: video with synchronised audio and subtitles, 3D scenes that can be explored from any viewpoint, and interactive environments that respond to user actions. Current systems treat each modality (video, audio, text, 3D) with separate models or separate heads, limiting the coherence of cross-modal outputs.

Problem 4 (Unified Multimodal Generation).

Design a single generative model pθ over a joint space 𝒳=𝒳vid×𝒳aud×𝒳text×𝒳3D such that:

  1. Marginal generation in any single modality matches or exceeds specialist models;

  2. Conditional generation across modalities (e.g., textvideo, videoaudio, video3D) is coherent;

  3. Joint generation of all modalities simultaneously produces consistent outputs (e.g., a 3D scene that, when rendered from any viewpoint, produces video with correct audio).

This is perhaps the most ambitious open problem in generative AI. Progress will likely require:

  1. A unified tokenisation scheme that maps all modalities into a shared latent space;

  2. A shared backbone architecture (likely a transformer) that can process tokens from all modalities with appropriate inductive biases for each;

  3. Training procedures that balance the learning signals from different modalities, preventing any single modality from dominating;

  4. Evaluation frameworks that measure cross-modal consistency, not just per-modal quality.

Key Idea.

The next frontier. The five open problems above trace an arc from engineering (real-time generation) through science (physical grounding, compositionality) to a grand unified vision (multimodal generation). Progress on each problem feeds into the others: faster models enable longer videos, physical grounding improves compositionality, compositionality enables richer multimodal scenes, and the ability to generate coherent multimodal outputs opens up new applications that demand all of the above. Solving these problems will require not just better neural networks, but deeper integration of generative modelling with physics, perception, and reasoning.

Exercises

Exercise 51 (Video Forward Process).

Consider a video latent 𝖹0F×H×W×C and the standard DDPM forward process with noise schedule {αt}t=0T.

  1. Derive the marginal distribution q(𝖹t|𝖹0) by showing that (EX Forward)𝖹t=αt𝖹0+1αt𝝐,𝝐𝒩(𝟎,𝐈), where the noise 𝝐 has the same shape as 𝖹0. Hint: The forward process factorises independently across all spatial and temporal dimensions.

  2. Show that the noise added to frame f is independent of the noise added to frame f for ff. Formally, show that the conditional distribution q(𝒛tf,𝒛tf|𝖹0)=q(𝒛tf|𝒛0f)q(𝒛tf|𝒛0f), where 𝒛tf denotes the f-th frame of 𝖹t.

  3. Explain why this frame-wise noise independence is important for the design of the denoiser: if the noise is independent across frames, all inter-frame correlations in 𝖹t come from the signal component αt𝖹0, and the denoiser must learn to exploit these correlations.

  4. At what noise level t does the inter-frame correlation become negligible? Express your answer in terms of αt and the inter-frame correlation coefficient ρ=Corr(𝒛0f,𝒛0f+1).

Exercise 52 (Factored Attention Complexity).

Consider a video latent of shape F×H×W×C, where Ns=H×W is the number of spatial tokens per frame and Nt=F is the number of temporal tokens per spatial position.

  1. Compute the FLOPs of full spatiotemporal attention over all N=F×H×W tokens. Express your answer in terms of N and the head dimension d.

  2. Compute the FLOPs of factored attention, where spatial attention is applied independently to each frame (cost F×O(Ns2d)) and temporal attention is applied independently to each spatial position (cost Ns×O(Nt2d)).

  3. Find the ratio of factored to full attention FLOPs. Under what condition on F, H, W is factored attention most advantageous?

  4. For a typical configuration of F=16, H=W=32, C=16, and head dimension d=64, compute the actual FLOP ratio and estimate the wall-clock speedup assuming perfect parallelism.

  5. Suppose you have a fixed total token budget N. Find the “optimal aspect ratio” F:H:W that minimises the total factored attention FLOPs, subject to FHW=N. Hint: Use the AM-GM inequality.

Exercise 53 (Causal Convolution Receptive Field).

Consider a stack of L causal 1D convolutional layers along the temporal axis, each with kernel size k and dilation factor d for layer =1,,L.

  1. Show that the temporal receptive field of the stack is (EX Receptive)R=1+(k1)=1Ld.

  2. For the common choice of exponentially increasing dilation d=21, simplify the expression and show that R=1+(k1)(2L1).

  3. How many layers L are needed to achieve a receptive field of R=129 frames with k=3 and exponential dilation?

  4. Compare this to the receptive field of a single temporal self-attention layer. What is the fundamental advantage of attention over convolution for temporal modelling?

  5. What is the advantage of causal convolution over attention for autoregressive generation? Discuss both computational cost and the ability to process variable-length inputs.

Exercise 54 (Flow Matching Path Design).

Consider a conditional flow matching framework where the interpolation between noise 𝖹1𝒩(𝟎,𝐈) and data 𝖹0pdata follows the path: (EX FM PATH)𝖹t=(1t)𝖹0+t𝖹1,t[0,1].

  1. Derive the conditional distribution pt(𝖹t|𝖹0,𝖹1). Show that it is a Dirac delta at (1t)𝖹0+t𝖹1.

  2. Compute the conditional velocity field 𝒗t(𝖹t|𝖹0,𝖹1)=ddt𝖹t and show that it equals 𝖹1𝖹0.

  3. Derive the marginal distribution pt(𝖹t) by integrating over 𝖹0 and 𝖹1. Show that pt=𝒩((1t)𝔼[𝖹0],(1t)2Cov[𝖹0]+t2𝐈) when 𝖹0 and 𝖹1 are independent.

  4. The marginal velocity field is defined as 𝒗t(𝖹t)=𝔼[𝖹1𝖹0|𝖹t]. Explain why this expectation is generally intractable and how the flow matching training objective avoids computing it.

  5. Now consider a more general path 𝖹t=αt𝖹0+σt𝖹1 with α0=1,σ0=0,α1=0,σ1=1. Derive the conditional velocity field for this general path and show that the linear path is the special case αt=1t, σt=t.

Exercise 55 (SNR Shift for Video).

Consider a video latent 𝖹0F×H×W×C under the forward process 𝖹t=αt𝖹0+1αt𝝐.

  1. The signal-to-noise ratio at time t is defined as SNR(t)=αt/(1αt). Show that the “effective” SNR perceived by the denoiser depends on the number of tokens N=FHW: when the denoiser averages information across N tokens, it effectively observes SNReff(t)NSNR(t) for the global signal.

  2. Explain why this means that the noise schedule designed for images (N4,096) is “too easy” for video (N65,536 or more): the video denoiser sees a much higher effective SNR at the same t.

  3. The SNR-shift trick addresses this by shifting the schedule: αtvid=αt+Δimg for a positive shift Δ. Show that this is equivalent to scaling the SNR by a constant factor: SNRvid(t)=SNRimg(t+Δ).

  4. Derive the appropriate shift Δ such that the effective SNR for video matches the effective SNR for images at every t. Express Δ in terms of Nvid and Nimg.

Exercise 56 (FVD Computation).

  1. Prove that the FVD formula ((FVD)) equals the squared 2-Wasserstein distance between the two fitted Gaussians. Follow these steps: enumerate[label=()]

  2. Write the W22 as the infimum over couplings.

  3. Restrict to Gaussian couplings and show that the optimal coupling has correlation matrix 𝑪=𝚺r1/2(𝚺r1/2𝚺g𝚺r1/2)1/2𝚺r1/2.

  4. Substitute and simplify to obtain the FVD formula. enumerate Hint: The theory of Gaussian optimal transport is developed in ch:sinkhorn.

  5. Show that FVD =0 if and only if 𝝁r=𝝁g and 𝚺r=𝚺g.

  6. The FVD is estimated from finite samples. Show that the bias of the sample covariance estimator introduces an O(d/N) additive bias in FVD, where d is the feature dimension and N is the sample size. This explains why large sample sizes are needed for reliable FVD estimates.

  7. Compute the FVD between two univariate Gaussians 𝒩(μ1,σ12) and 𝒩(μ2,σ22) and verify that it simplifies to (μ1μ2)2+(σ1σ2)2.

Exercise 57 (Temporal Caching Error Bound).

Consider a denoiser ϵθ(𝖹t,t) that is L-Lipschitz in 𝖹t (i.e., ϵθ(𝖹t,t)ϵθ(𝖹t,t)L𝖹t𝖹t for all 𝖹t,𝖹t and all t).

In the temporal caching scheme, at denoising step t, the denoiser is evaluated on a subset of frames eval{1,,F}, and the output for the remaining frames cache={1,,F}eval is copied from the previous step t+1.

  1. For a cached frame fcache, the approximate denoiser output is ϵ^tf=ϵt+1f (the output from the previous step). Bound the approximation error ϵ^tfϵtf in terms of L and the change in the latent 𝒛tf𝒛t+1f.

  2. Show that the latent change between consecutive steps satisfies 𝒛tf𝒛t+1f=O(Δt), where Δt=ti+1ti is the step size of the ODE solver.

  3. Combining parts (a) and (b), show that the total accumulated error after T denoising steps with caching fraction η=|cache|/F is bounded by O(ηLTΔt).

  4. Discuss the implications: as the step size Δt decreases (more steps), the caching error per step decreases, but the total number of cached steps increases. What is the optimal balance?

  5. In practice, temporal caching uses a “stale-by-one” scheme where every other frame is cached. Argue informally that for natural videos (where the denoiser output varies smoothly across nearby frames), the actual error is much smaller than the worst-case Lipschitz bound.

Exercise 58 (Camera Conditioning with Plücker Coordinates).

A ray in 3D space can be parameterised by its origin 𝒐3 and direction 𝒅3 (with 𝒅=1). The Plücker coordinates of this ray are the pair (𝒅,𝒎) where 𝒎=𝒐×𝒅3 is the moment.

  1. Show that the moment 𝒎 is independent of the choice of origin point on the ray: if 𝒐=𝒐+λ𝒅 is another point on the ray, then 𝒐×𝒅=𝒐×𝒅.

  2. Two rays (𝒅1,𝒎1) and (𝒅2,𝒎2) intersect if and only if the reciprocal product vanishes: 𝒅1𝒎2+𝒅2𝒎1=0. Prove this property. Hint: Express both rays in parametric form and set the intersection condition.

  3. For a pinhole camera with intrinsic matrix 𝐊3×3 and extrinsic matrix [𝐑|𝒕]3×4, derive the Plücker coordinates (𝒅i,j,𝒎i,j) for the ray passing through pixel (i,j).

  4. Explain how Plücker ray maps (one 6-channel map per frame, with channels (𝒅,𝒎) at each pixel) provide a resolution-independent camera representation that can condition a video diffusion model.

  5. How many degrees of freedom does a camera trajectory of F frames have? How does the Plücker representation scale compared to simply providing F camera matrices?

Exercise 59 (Autoregressive Chunk Overlap).

Consider generating a long video by autoregressively generating chunks of C frames each, with an overlap of O frames between consecutive chunks. The overlap frames serve as conditioning context for the next chunk.

  1. How many chunks K are needed to generate a video of F total frames? Express K in terms of F, C, and O.

  2. The total number of denoised frames (counting overlaps) is K×C. Compute the “overhead ratio” (K×C)/F and show that it approaches C/(CO) for large F.

  3. Consider the consistency of the overlap region. If the diffusion model's denoiser has variance σ2 per pixel in the generated output, argue that the mismatch between the end of chunk k and the beginning of chunk k+1 (in the overlap region) has expected squared error O(σ2/O) per pixel when the overlap is averaged.

  4. In practice, the overlap is not averaged but rather the previous chunk's overlap frames are used as a conditioning signal (e.g., through inpainting or latent blending). Discuss the qualitative difference between these two approaches in terms of consistency and diversity.

  5. Show that without overlap (O=0), the inter-chunk boundary has no conditioning signal, and the video is essentially K independent clips. What is the minimum O needed for reasonable consistency? Justify your answer with a simple perceptual argument.

Exercise 60 (Consistency Distillation for Video).

Consistency models [60] learn a function fθ(𝖹t,t) that maps any point on the diffusion trajectory to the trajectory's origin 𝖹0. The key property is self-consistency: fθ(𝖹t,t)=fθ(𝖹t,t) for any t,t on the same trajectory.

  1. Write the consistency distillation loss for a pretrained teacher denoiser ϵteacher: (EX CD LOSS)CD=𝔼t,𝖹0,𝝐[d(fθ(𝖹tn+1,tn+1),fθ(𝖹^tn,tn))], where 𝖹^tn is obtained by taking one ODE step from 𝖹tn+1 using the teacher, and θ denotes the EMA (exponential moving average) of the student parameters.

  2. Explain the role of the EMA target θ. Why is it important not to use the same parameters θ for both the student and the target? Hint: Consider what happens when the target is non-stationary.

  3. For video generation, the consistency function fθ must be applied to the full video latent 𝖹tF×H×W×C. Discuss the computational challenge and propose a strategy for applying consistency distillation to video transformers.

  4. After distillation, generation requires only a single forward pass: 𝖹^0=fθ(𝖹T,T) where 𝖹T𝒩(𝟎,𝐈). What is the theoretical quality loss compared to the full multi-step teacher? Express this in terms of the distillation loss CD and the number of discretisation steps N used during distillation.

Exercise 61 (LoRA Rank Selection for Video Models).

Consider a video diffusion transformer with L attention layers, each containing four weight matrices (𝐖Q,𝐖K,𝐖V,𝐖O) of shape d×d where d=1024. LoRA adapts each weight matrix by adding a low-rank update Δ𝐖=𝐁𝐀 where 𝐁d×r and 𝐀r×d.

  1. Compute the number of trainable LoRA parameters for ranks r=4,16,64 when LoRA is applied to all four matrices in all L=28 layers. Express each as a fraction of the total model parameters (which are approximately 4Ld2=4×28×10242117M for the attention layers alone).

  2. The expressiveness of a rank-r LoRA update is bounded by the rank: rank(Δ𝐖)r. Argue that for a fine-tuning task that requires modifying k singular values of 𝐖, we need rk.

  3. In practice, video fine-tuning tasks (e.g., adapting a general model to generate anime-style videos) typically require rank r1664. Explain intuitively why this is much less than d=1024: what does this imply about the dimensionality of the “style subspace”?

  4. Compare the training memory requirements for full fine-tuning versus LoRA with r=16. Account for both the parameter memory and the optimiser state memory (assuming Adam, which stores first and second moments for each trainable parameter).

  5. LoRA modules can be merged back into the base model after fine-tuning: 𝐖merged=𝐖+𝐁𝐀. Discuss whether multiple LoRA adaptations (e.g., one for style, one for motion) can be composed. Under what conditions does composition work well, and when does it fail?

Exercise 62 (World Model Planning).

(Research exercise.) This exercise asks you to think beyond the material covered in the chapter. There is no single correct answer; the goal is to develop and justify a concrete proposal.

A video diffusion model trained on large-scale video data implicitly learns a “world model”: given a current visual state and an action, it can “imagine” the future state by generating continuation frames [6][58].

  1. Propose a framework for using a pretrained video diffusion model as the dynamics model in a model-based reinforcement learning agent. Your framework should specify: enumerate[label=()]

  2. How the current observation is encoded into the diffusion model's latent space;

  3. How actions are injected as conditioning signals;

  4. How future rewards are estimated from the generated video;

  5. How the stochasticity of diffusion sampling is handled in the planning algorithm. enumerate

  6. Identify three fundamental limitations of using a video diffusion model as a world model compared to a dedicated dynamics model (e.g., a learned physics simulator). For each limitation, propose a mitigation strategy.

  7. One approach is to use the diffusion model for “imagination” (generating candidate future trajectories) and a separate value network for evaluation. Write the planning objective: (EX Planning)a=argmaxa𝒜𝔼𝖷pθ(|𝒙0,a)[Vψ(𝖷)], where pθ(|𝒙0,a) is the conditional video distribution given the current frame 𝒙0 and action a, and Vψ is the value function. Discuss how to estimate this expectation efficiently using a small number of generated trajectories.

  8. Recent systems such as Genie [53] and UniSim [51] have demonstrated interactive video generation conditioned on user actions. Read one of these papers and summarise (in 1–2 paragraphs) how it addresses the challenges you identified in part (b).

Key Idea.

The arc of video diffusion. This chapter has traced the complete arc of video diffusion models, from the foundational challenge of generating coherent spatiotemporal content to the cutting-edge systems that produce minute-long, high-definition video from text prompts. The key ideas form a layered stack. At the bottom, video autoencoders compress the raw pixel tensor into a compact latent space, making diffusion tractable. Above that, spatiotemporal architectures (3D U-Nets, Video DiTs) interleave spatial and temporal attention to model both appearance and motion. Conditioning mechanisms (text, image, camera, motion) give users fine-grained control over the generated content. Efficient sampling strategies (distillation, caching, progressive generation) reduce the computational cost from minutes to seconds. Training at scale (curriculum learning, mixed-resolution batching, multi-stage pipelines) enables the massive data and compute investments needed for frontier models. And evaluation metrics (FVD, VBench, human evaluation) provide the yardstick by which progress is measured.

At its core, the entire enterprise rests on a single mathematical idea: learning to reverse a noise process, one step at a time, guided by the statistics of natural video. That this simple idea, when combined with massive scale and careful engineering, can produce videos that are increasingly indistinguishable from reality is one of the most remarkable achievements of modern machine learning. The open problems identified in this chapter suggest that the story is far from over: real-time generation, minute-scale consistency, physical grounding, compositional control, and unified multimodal synthesis remain grand challenges that will drive the field for years to come.

References

  1. Stochastic Video Generation with a Learned Prior

    Emily Denton, Rob Fergus

    International Conference on Machine Learning · 2018

    BibTeX
    @article{denton2018stochastic,
      title={Stochastic Video Generation with a Learned Prior},
      author={Denton, Emily and Fergus, Rob},
      journal={International Conference on Machine Learning},
      year={2018}
    }

    Journal article

  2. VideoGPT: Video Generation using VQ-VAE and Transformers

    Wilson Yan, Yunzhi Zhang, Pieter Abbeel, Aravind Srinivas

    arXiv preprint arXiv:2104.10157 · 2021

    BibTeX
    @article{yan2021videogpt,
      title={{VideoGPT}: Video Generation using {VQ-VAE} and Transformers},
      author={Yan, Wilson and Zhang, Yunzhi and Abbeel, Pieter and Srinivas, Aravind},
      journal={arXiv preprint arXiv:2104.10157},
      year={2021}
    }

    Journal article

  3. Video Diffusion Models

    Jonathan Ho, Tim Salimans, Alexey Gritsenko, William Chan, Mohammad Norouzi, David J. Fleet

    Advances in Neural Information Processing Systems, vol. 35 · 2022

    BibTeX
    @article{ho2022video,
      title={Video Diffusion Models},
      author={Ho, Jonathan and Salimans, Tim and Gritsenko, Alexey and Chan, William and Norouzi, Mohammad and Fleet, David J.},
      journal={Advances in Neural Information Processing Systems},
      volume={35},
      year={2022}
    }

    Journal article

  4. Make-A-Video: Text-to-Video Generation without Text-Video Data

    Uriel Singer, Adam Polyak, Thomas Hayes, Xi Yin, Jie An, Songyang Zhang, Qiyuan Hu, Harry Yang, et al.

    International Conference on Learning Representations · 2023

    BibTeX
    @article{singer2022make,
      title={{Make-A-Video}: Text-to-Video Generation without Text-Video Data},
      author={Singer, Uriel and Polyak, Adam and Hayes, Thomas and Yin, Xi and An, Jie and Zhang, Songyang and Hu, Qiyuan and Yang, Harry and Ashual, Oron and Gafni, Oran and others},
      journal={International Conference on Learning Representations},
      year={2023}
    }

    Journal article

  5. Imagen Video: High Definition Video Generation with Diffusion Models

    Jonathan Ho, William Chan, Chitwan Saharia, Jay Whang, Ruiqi Gao, Alexey Gritsenko, Diederik P. Kingma, Ben Poole, et al.

    arXiv preprint arXiv:2210.02303 · 2022

    BibTeX
    @article{ho2022imagen,
      title={Imagen Video: High Definition Video Generation with Diffusion Models},
      author={Ho, Jonathan and Chan, William and Saharia, Chitwan and Whang, Jay and Gao, Ruiqi and Gritsenko, Alexey and Kingma, Diederik P. and Poole, Ben and Norouzi, Mohammad and Fleet, David J. and Salimans, Tim},
      journal={arXiv preprint arXiv:2210.02303},
      year={2022}
    }

    Journal article

  6. Video Generation Models as World Simulators

    Tim Brooks, Bill Peebles, Connor Holmes, Will DePue, Yufei Guo, Li Jing, David Schnurr, Joe Taylor, et al.

    OpenAI Technical Report · 2024

    BibTeX
    @article{brooks2024sora,
      title={Video Generation Models as World Simulators},
      author={Brooks, Tim and Peebles, Bill and Holmes, Connor and DePue, Will and Guo, Yufei and Jing, Li and Schnurr, David and Taylor, Joe and Luhman, Troy and Luhman, Eric and others},
      journal={OpenAI Technical Report},
      year={2024}
    }

    Journal article

  7. Wan: Open and Advanced Large-Scale Video Generative Models

    Ang Wang, Baole Guo, Bin Liang, Bing Luo, Biao Chen, others

    arXiv preprint arXiv:2503.20314 · 2025

    BibTeX
    @article{wang2025wan,
      title={Wan: Open and Advanced Large-Scale Video Generative Models},
      author={Wang, Ang and Guo, Baole and Liang, Bin and Luo, Bing and Chen, Biao and others},
      journal={arXiv preprint arXiv:2503.20314},
      year={2025}
    }

    Journal article

  8. Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasets

    Andreas Blattmann, Tim Dockhorn, Sumith Kulal, Daniel Mendelevitch, Maciej Kilian, Dominik Lorber, Yam Levi, Zion English, et al.

    arXiv preprint arXiv:2311.15127 · 2023

    BibTeX
    @article{blattmann2023stable,
      title={Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasets},
      author={Blattmann, Andreas and Dockhorn, Tim and Kulal, Sumith and Mendelevitch, Daniel and Kilian, Maciej and Lorber, Dominik and Levi, Yam and English, Zion and Voleti, Vikram and Letts, Adam and others},
      journal={arXiv preprint arXiv:2311.15127},
      year={2023}
    }

    Journal article

  9. Scalable Diffusion Models with Transformers

    William Peebles, Saining Xie

    Proceedings of the IEEE/CVF International Conference on Computer Vision · 2023

    BibTeX
    @inproceedings{peebles2023scalable,
      title={Scalable Diffusion Models with Transformers},
      author={Peebles, William and Xie, Saining},
      booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
      year={2023}
    }

    Conference paper

  10. Denoising Diffusion Implicit Models

    Jiaming Song, Chenlin Meng, Stefano Ermon

    International Conference on Learning Representations · 2021

    BibTeX
    @article{song2020denoising,
      title={Denoising Diffusion Implicit Models},
      author={Song, Jiaming and Meng, Chenlin and Ermon, Stefano},
      journal={International Conference on Learning Representations},
      year={2021}
    }

    Journal article

  11. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness

    Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, Christopher Re

    Advances in Neural Information Processing Systems, vol. 35 · 2022

    BibTeX
    @inproceedings{dao2022flashattention,
      title={Flash{A}ttention: Fast and Memory-Efficient Exact Attention with {IO}-Awareness},
      author={Dao, Tri and Fu, Daniel Y. and Ermon, Stefano and Rudra, Atri and R{\'e}, Christopher},
      booktitle={Advances in Neural Information Processing Systems},
      volume={35},
      year={2022}
    }

    Conference paper

  12. Auto-Encoding Variational Bayes

    Diederik P Kingma, Max Welling

    International Conference on Learning Representations · 2014

    BibTeX
    @inproceedings{kingma2013auto,
      title={Auto-Encoding Variational {B}ayes},
      author={Kingma, Diederik P and Welling, Max},
      booktitle={International Conference on Learning Representations},
      year={2014}
    }

    Conference paper

  13. Neural Discrete Representation Learning

    Aaron van den Oord, Oriol Vinyals, Koray Kavukcuoglu

    Advances in Neural Information Processing Systems · 2017

    BibTeX
    @article{van2017neural,
      title={Neural Discrete Representation Learning},
      author={van den Oord, Aaron and Vinyals, Oriol and Kavukcuoglu, Koray},
      journal={Advances in Neural Information Processing Systems},
      year={2017}
    }

    Journal article

  14. High-resolution image synthesis with latent diffusion models

    Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bjorn Ommer

    Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10684-10695 · 2022

    BibTeX
    @article{rombach2022high,
      title={High-resolution image synthesis with latent diffusion models},
      author={Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj{\"o}rn},
      journal={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
      pages={10684--10695},
      year={2022}
    }

    Journal article

  15. MAGVIT: Masked Generative Video Transformer

    Lijun Yu, Yong Cheng, Kihyuk Sohn, Jose Lezama, Han Zhang, Huiwen Chang, Alexander G. Hauptmann, Ming-Hsuan Yang, et al.

    Conference on Computer Vision and Pattern Recognition · 2023

    BibTeX
    @article{yu2023magvit,
      title={{MAGVIT}: Masked Generative Video Transformer},
      author={Yu, Lijun and Cheng, Yong and Sohn, Kihyuk and Lezama, Jos{\'e} and Zhang, Han and Chang, Huiwen and Hauptmann, Alexander G. and Yang, Ming-Hsuan and Hao, Yuan and Essa, Irfan and others},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2023}
    }

    Journal article

  16. Language Model Beats Diffusion -- Tokenizer is Key to Visual Generation

    Lijun Yu, Jose Lezama, Nitesh B. Gundavarapu, Luca Versari, Kihyuk Sohn, David Minnen, Yong Cheng, Agrim Gupta, et al.

    International Conference on Learning Representations · 2024

    BibTeX
    @article{yu2023language,
      title={Language Model Beats Diffusion -- Tokenizer is Key to Visual Generation},
      author={Yu, Lijun and Lezama, Jos{\'e} and Gundavarapu, Nitesh B. and Versari, Luca and Sohn, Kihyuk and Minnen, David and Cheng, Yong and Gupta, Agrim and Gu, Xiuye and Hauptmann, Alexander G. and others},
      journal={International Conference on Learning Representations},
      year={2024}
    }

    Journal article

  17. CogVideoX: Text-to-Video Diffusion Models with An Expert Transformer

    Zhuoyi Yang, Jiayan Teng, Wendi Zheng, Ming Ding, Shiyu Huang, Jiazheng Xu, Yuanming Yang, Wenyi Hong, et al.

    arXiv preprint arXiv:2408.06072 · 2024

    BibTeX
    @article{yang2024cogvideox,
      title={{CogVideoX}: Text-to-Video Diffusion Models with An Expert Transformer},
      author={Yang, Zhuoyi and Teng, Jiayan and Zheng, Wendi and Ding, Ming and Huang, Shiyu and Xu, Jiazheng and Yang, Yuanming and Hong, Wenyi and Zhang, Xiaohan and Feng, Guanyu and others},
      journal={arXiv preprint arXiv:2408.06072},
      year={2024}
    }

    Journal article

  18. Open-Sora: Democratizing Efficient Video Production for All

    Zangwei Zheng, Xiangyu Peng, Tianji Yang, Chenhui Cheng, Shenggui Wang, Yang You

    arXiv preprint arXiv:2412.00131 · 2024

    BibTeX
    @article{zheng2024open,
      title={Open-{Sora}: Democratizing Efficient Video Production for All},
      author={Zheng, Zangwei and Peng, Xiangyu and Yang, Tianji and Cheng, Chenhui and Wang, Shenggui and You, Yang},
      journal={arXiv preprint arXiv:2412.00131},
      year={2024}
    }

    Journal article

  19. Wan: Open and Advanced Large-Scale Video Generative Models

    Wan Team

    arXiv preprint arXiv:2503.20314 · 2025

    BibTeX
    @article{wan2025wan,
      title={Wan: Open and Advanced Large-Scale Video Generative Models},
      author={{Wan Team}},
      journal={arXiv preprint arXiv:2503.20314},
      year={2025},
      note={WARNING: Duplicate of wang2025wan}
    }

    Journal article

  20. Spectral normalization for generative adversarial networks

    Takeru Miyato, Toshiki Kataoka, Masanori Koyama, Yuichi Yoshida

    Proceedings of the International Conference on Learning Representations · 2018

    BibTeX
    @inproceedings{miyato2018spectral,
      title={Spectral normalization for generative adversarial networks},
      author={Miyato, Takeru and Kataoka, Toshiki and Koyama, Masanori and Yoshida, Yuichi},
      booktitle={Proceedings of the International Conference on Learning Representations},
      year={2018},
      url={https://openreview.net/forum?id=B1QRgziT-}
    }

    Conference paper

  21. FiLM: Visual Reasoning with a General Conditioning Layer

    Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, Aaron Courville

    AAAI Conference on Artificial Intelligence · 2018

    BibTeX
    @article{perez2018film,
      title={{FiLM}: Visual Reasoning with a General Conditioning Layer},
      author={Perez, Ethan and Strub, Florian and de Vries, Harm and Dumoulin, Vincent and Courville, Aaron},
      journal={AAAI Conference on Artificial Intelligence},
      year={2018}
    }

    Journal article

  22. Open-Sora: Democratizing Efficient Video Production for All

    Zangwei Zheng, Xiangyu Peng, Tianji Yang, Chenhui Cheng, Shenggui Wang, Yang You

    arXiv preprint arXiv:2412.00131 · 2024

    BibTeX
    @article{opensora2024,
      title={Open-{Sora}: Democratizing Efficient Video Production for All},
      author={Zheng, Zangwei and Peng, Xiangyu and Yang, Tianji and Cheng, Chenhui and Wang, Shenggui and You, Yang},
      journal={arXiv preprint arXiv:2412.00131},
      year={2024}
    }

    Journal article

  23. Latte: Latent Diffusion Transformer for Video Generation

    Xin Ma, Yaohui Wang, Gengyun Jia, Xinyuan Chen, Ziwei Liu, Yuan-Fang Li, Cunjian Chen, Yu Qiao

    arXiv preprint arXiv:2401.03048 · 2024

    BibTeX
    @article{ma2024latte,
      title={Latte: Latent Diffusion Transformer for Video Generation},
      author={Ma, Xin and Wang, Yaohui and Jia, Gengyun and Chen, Xinyuan and Liu, Ziwei and Li, Yuan-Fang and Chen, Cunjian and Qiao, Yu},
      journal={arXiv preprint arXiv:2401.03048},
      year={2024}
    }

    Journal article

  24. All are Worth Words: A ViT Backbone for Diffusion Models

    Fan Bao, Shen Nie, Kaiwen Xue, Yue Cao, Chongxuan Li, Hang Su, Jun Zhu

    Conference on Computer Vision and Pattern Recognition · 2023

    BibTeX
    @article{bao2023uvit,
      title={All are Worth Words: A {ViT} Backbone for Diffusion Models},
      author={Bao, Fan and Nie, Shen and Xue, Kaiwen and Cao, Yue and Li, Chongxuan and Su, Hang and Zhu, Jun},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2023}
    }

    Journal article

  25. On the Importance of Noise Scheduling for Diffusion Models

    Ting Chen

    arXiv preprint arXiv:2301.10972 · 2023

    BibTeX
    @article{chen2023simple,
      title={On the Importance of Noise Scheduling for Diffusion Models},
      author={Chen, Ting},
      journal={arXiv preprint arXiv:2301.10972},
      year={2023}
    }

    Journal article

  26. Flow Matching for Generative Modeling

    Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, Matt Le

    International Conference on Learning Representations (ICLR) · 2023

    BibTeX
    @inproceedings{lipman2023flow,
      title={Flow Matching for Generative Modeling},
      author={Lipman, Yaron and Chen, Ricky T. Q. and Ben-Hamu, Heli and Nickel, Maximilian and Le, Matt},
      booktitle={International Conference on Learning Representations (ICLR)},
      year={2023}
    }

    Conference paper

  27. Scaling Rectified Flow Transformers for High-Resolution Image Synthesis

    Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Muller, Harry Saini, Yam Levi, Dominik Lorber, et al.

    Proceedings of the 41st International Conference on Machine Learning (ICML) · 2024

    BibTeX
    @inproceedings{esser2024scaling,
      title={Scaling Rectified Flow Transformers for High-Resolution Image Synthesis},
      author={Esser, Patrick and Kulal, Sumith and Blattmann, Andreas and Entezari, Rahim and M\"{u}ller, Jonas and Saini, Harry and Levi, Yam and Lorber, Dominik and Sauer, Axel and Boesel, Frederic and others},
      booktitle={Proceedings of the 41st International Conference on Machine Learning (ICML)},
      year={2024}
    }

    Conference paper

  28. AnimateLCM: Computation-Efficient Personalized Style Video Generation without Personalized Video Data

    Fu-Yun Wang, Zhaoyang Huang, Weikang Bian, Xiaoyu Shi, Keqiang Sun, Guanglu Song, Yu Liu, Hongsheng Li

    arXiv preprint arXiv:2402.00769 · 2024

    BibTeX
    @article{zhao2023animatelcm,
      title={{AnimateLCM}: Computation-Efficient Personalized Style Video Generation without Personalized Video Data},
      author={Wang, Fu-Yun and Huang, Zhaoyang and Bian, Weikang and Shi, Xiaoyu and Sun, Keqiang and Song, Guanglu and Liu, Yu and Li, Hongsheng},
      journal={arXiv preprint arXiv:2402.00769},
      year={2024}
    }

    Journal article

  29. PAB: Pyramid Attention Broadcast for Efficient Video Generation

    Xuanlei Zhao, Zangwei Zheng, Yang You

    arXiv preprint arXiv:2408.12588 · 2024

    BibTeX
    @article{zhao2024pab,
      title={{PAB}: Pyramid Attention Broadcast for Efficient Video Generation},
      author={Zhao, Xuanlei and Zheng, Zangwei and You, Yang},
      journal={arXiv preprint arXiv:2408.12588},
      year={2024}
    }

    Journal article

  30. Cross-Attention Makes Inference Cumbersome in Text-to-Image Diffusion Models

    Wentian Zhang, Haozhe Liu, Jinheng Xie, Francesco Faccio, Mike Zheng Shou, Jurgen Schmidhuber

    arXiv preprint arXiv:2404.02747 · 2024

    BibTeX
    @article{zhang2024tgate,
      title={Cross-Attention Makes Inference Cumbersome in Text-to-Image Diffusion Models},
      author={Zhang, Wentian and Liu, Haozhe and Xie, Jinheng and Faccio, Francesco and Shou, Mike Zheng and Schmidhuber, J{\"u}rgen},
      journal={arXiv preprint arXiv:2404.02747},
      year={2024}
    }

    Journal article

  31. Progressive Distillation for Fast Sampling of Diffusion Models

    Tim Salimans, Jonathan Ho

    International Conference on Learning Representations · 2022

    BibTeX
    @article{salimans2022progressive,
      title={Progressive Distillation for Fast Sampling of Diffusion Models},
      author={Salimans, Tim and Ho, Jonathan},
      journal={International Conference on Learning Representations},
      year={2022}
    }

    Journal article

  32. Open-Sora: Democratizing Efficient Video Production for All

    Zangwei Zheng, Xiangyu Peng, Tianji Yang, Chenhui Cheng, Shenggui Wang, Yang You

    arXiv preprint arXiv:2412.00131 · 2024

    BibTeX
    @article{zheng2024opensora,
      title={Open-{Sora}: Democratizing Efficient Video Production for All},
      author={Zheng, Zangwei and Peng, Xiangyu and Yang, Tianji and Cheng, Chenhui and Wang, Shenggui and You, Yang},
      journal={arXiv preprint arXiv:2412.00131},
      year={2024}
    }

    Journal article

  33. Movie Gen: A Cast of Media Foundation Models

    Adam Polyak, Amit Zohar, Andrew Brown, Andros Tjandra, Animesh Sinha, Ann Lee, others

    arXiv preprint arXiv:2410.13720 · 2024

    BibTeX
    @article{polyak2024moviegen,
      title={Movie {Gen}: A Cast of Media Foundation Models},
      author={Polyak, Adam and Zohar, Amit and Brown, Andrew and Tjandra, Andros and Sinha, Animesh and Lee, Ann and others},
      journal={arXiv preprint arXiv:2410.13720},
      year={2024}
    }

    Journal article

  34. CameraCtrl: Enabling Camera Control for Text-to-Video Generation

    Hao He, Yinghao Xu, Yuwei Guo, Gordon Wetzstein, Bo Dai, Hongsheng Li, Ceyuan Yang

    arXiv preprint arXiv:2404.02101 · 2024

    BibTeX
    @article{xu2024camctrl,
      title={{CameraCtrl}: Enabling Camera Control for Text-to-Video Generation},
      author={He, Hao and Xu, Yinghao and Guo, Yuwei and Wetzstein, Gordon and Dai, Bo and Li, Hongsheng and Yang, Ceyuan},
      journal={arXiv preprint arXiv:2404.02101},
      year={2024}
    }

    Journal article

  35. MotionCtrl: A Unified and Flexible Motion Controller for Video Generation

    Zhouxia Wang, Ziyang Yuan, Xintao Wang, Yaowei Li, Tianshui Chen, Menghan Xia, Ping Luo, Ying Shan

    arXiv preprint arXiv:2312.03641 · 2024

    BibTeX
    @article{wang2024motionctrl,
      title={{MotionCtrl}: A Unified and Flexible Motion Controller for Video Generation},
      author={Wang, Zhouxia and Yuan, Ziyang and Wang, Xintao and Li, Yaowei and Chen, Tianshui and Xia, Menghan and Luo, Ping and Shan, Ying},
      journal={arXiv preprint arXiv:2312.03641},
      year={2024}
    }

    Journal article

  36. DragNUWA: Fine-Grained Control in Video Generation by Integrating Text, Image, and Trajectory

    Shengming Yin, Chenfei Wu, Huan Yang, Jianfeng Wang, Xiaodong Wang, Minheng Lei, Nan Duan

    arXiv preprint arXiv:2308.08089 · 2023

    BibTeX
    @article{deng2023drag,
      title={{DragNUWA}: Fine-Grained Control in Video Generation by Integrating Text, Image, and Trajectory},
      author={Yin, Shengming and Wu, Chenfei and Yang, Huan and Wang, Jianfeng and Wang, Xiaodong and Lei, Minheng and Duan, Nan},
      journal={arXiv preprint arXiv:2308.08089},
      year={2023}
    }

    Journal article

  37. Animate Anyone: Consistent and Controllable Image-to-Video Synthesis for Character Animation

    Li Hu, Xin Gao, Peng Zhang, Ke Sun, Bang Zhang, Liefeng Bo

    Conference on Computer Vision and Pattern Recognition · 2024

    BibTeX
    @article{hu2024animate,
      title={Animate Anyone: Consistent and Controllable Image-to-Video Synthesis for Character Animation},
      author={Hu, Li and Gao, Xin and Zhang, Peng and Sun, Ke and Zhang, Bang and Bo, Liefeng},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2024}
    }

    Journal article

  38. AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning

    Yuwei Guo, Ceyuan Yang, Anyi Rao, Zhengyang Liang, Yaohui Wang, Yu Qiao, Maneesh Agrawala, Dahua Lin, et al.

    International Conference on Learning Representations · 2024

    BibTeX
    @article{guo2024animatediff,
      title={{AnimateDiff}: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning},
      author={Guo, Yuwei and Yang, Ceyuan and Rao, Anyi and Liang, Zhengyang and Wang, Yaohui and Qiao, Yu and Agrawala, Maneesh and Lin, Dahua and Dai, Bo},
      journal={International Conference on Learning Representations},
      year={2024}
    }

    Journal article

  39. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer

    Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, et al.

    Journal of Machine Learning Research, vol. 21, no. 140, pp. 1-67 · 2020

    BibTeX
    @article{raffel2020t5,
      title={Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
      author={Raffel, Colin and Shazeer, Noam and Roberts, Adam and Lee, Katherine and Narang, Sharan and Matena, Michael and Zhou, Yanqi and Li, Wei and Liu, Peter J.},
      journal={Journal of Machine Learning Research},
      volume={21},
      number={140},
      pages={1--67},
      year={2020}
    }

    Journal article

  40. Learning Transferable Visual Models From Natural Language Supervision

    Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, et al.

    International Conference on Machine Learning · 2021

    BibTeX
    @article{radford2021clip,
      title={Learning Transferable Visual Models From Natural Language Supervision},
      author={Radford, Alec and Kim, Jong Wook and Hallacy, Chris and Ramesh, Aditya and Goh, Gabriel and Agarwal, Sandhini and Sastry, Girish and Askell, Amanda and Mishkin, Pamela and Clark, Jack and others},
      journal={International Conference on Machine Learning},
      year={2021}
    }

    Journal article

  41. LoRA: Low-Rank Adaptation of Large Language Models

    Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen

    International Conference on Learning Representations · 2022

    BibTeX
    @article{hu2022lora,
      title={{LoRA}: Low-Rank Adaptation of Large Language Models},
      author={Hu, Edward J and Shen, Yelong and Wallis, Phillip and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Shean and Wang, Lu and Chen, Weizhu},
      journal={International Conference on Learning Representations},
      year={2022}
    }

    Journal article

  42. StreamingT2V: Consistent, Dynamic, and Extendable Long Video Generation from Text

    Roberto Henschel, Levon Khachatryan, Daniil Hayrapetyan, Hayk Poghosyan, Vahram Tadevosyan, Zhangyang Wang, Shant Navasardyan, Humphrey Shi

    arXiv preprint arXiv:2403.14773 · 2024

    BibTeX
    @article{henschel2024streamingt2v,
      title={{StreamingT2V}: Consistent, Dynamic, and Extendable Long Video Generation from Text},
      author={Henschel, Roberto and Khachatryan, Levon and Hayrapetyan, Daniil and Poghosyan, Hayk and Tadevosyan, Vahram and Wang, Zhangyang and Navasardyan, Shant and Shi, Humphrey},
      journal={arXiv preprint arXiv:2403.14773},
      year={2024}
    }

    Journal article

  43. FreeNoise: Tuning-Free Longer Video Diffusion via Noise Rescheduling

    Haonan Qiu, Menghan Weng, Yuxuan Zheng, Yue Ge, Haoji Zhang, Zhaoyang Cai, Ying Shan

    Conference on Computer Vision and Pattern Recognition · 2024

    BibTeX
    @article{qiu2024freenoise,
      title={{FreeNoise}: Tuning-Free Longer Video Diffusion via Noise Rescheduling},
      author={Qiu, Haonan and Weng, Menghan and Zheng, Yuxuan and Ge, Yue and Zhang, Haoji and Cai, Zhaoyang and Shan, Ying},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2024}
    }

    Journal article

  44. NUWA-XL: Diffusion over Diffusion for eXtremely Long Video Generation

    Shengming Yin, Chenfei Wu, Huan Yang, Jianfeng Wang, Xiaodong Wang, Minheng Lei, Nan Duan

    Association for Computational Linguistics · 2023

    BibTeX
    @article{yin2023nuwaxl,
      title={{NUWA-XL}: Diffusion over Diffusion for eXtremely Long Video Generation},
      author={Yin, Shengming and Wu, Chenfei and Yang, Huan and Wang, Jianfeng and Wang, Xiaodong and Lei, Minheng and Duan, Nan},
      journal={Association for Computational Linguistics},
      year={2023}
    }

    Journal article

  45. FreeInit: Bridging Initialization Gap in Video Diffusion Models

    Tianxing Wu, Chenyang Si, Yuming Jiang, Ziqi Huang, Ziwei Liu

    Conference on Computer Vision and Pattern Recognition · 2024

    BibTeX
    @article{wu2024freeinit,
      title={{FreeInit}: Bridging Initialization Gap in Video Diffusion Models},
      author={Wu, Tianxing and Si, Chenyang and Jiang, Yuming and Huang, Ziqi and Liu, Ziwei},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2024}
    }

    Journal article

  46. LAMP: Learn A Motion Pattern for Few-Shot Video Generation

    Ruiqi Wu, Liangyu Chen, Tong Yang, Chunle Guo, Chongyi Li, Xiangyu Zhang

    Conference on Computer Vision and Pattern Recognition · 2024

    BibTeX
    @article{wu2024lamp,
      title={{LAMP}: Learn A Motion Pattern for Few-Shot Video Generation},
      author={Wu, Ruiqi and Chen, Liangyu and Yang, Tong and Guo, Chunle and Li, Chongyi and Zhang, Xiangyu},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2024}
    }

    Journal article

  47. TokenFlow: Consistent Diffusion Features for Consistent Video Editing

    Michal Geyer, Omer Bar-Tal, Shai Bagon, Tali Dekel

    International Conference on Learning Representations · 2024

    BibTeX
    @article{geyer2024tokenflow,
      title={{TokenFlow}: Consistent Diffusion Features for Consistent Video Editing},
      author={Geyer, Michal and Bar-Tal, Omer and Bagon, Shai and Dekel, Tali},
      journal={International Conference on Learning Representations},
      year={2024}
    }

    Journal article

  48. Pix2Video: Video Editing using Image Diffusion

    Duygu Ceylan, Chun-Hao Paul Huang, Niloy J. Mitra

    International Conference on Computer Vision · 2023

    BibTeX
    @article{ceylan2023pix2video,
      title={{Pix2Video}: Video Editing using Image Diffusion},
      author={Ceylan, Duygu and Huang, Chun-Hao Paul and Mitra, Niloy J.},
      journal={International Conference on Computer Vision},
      year={2023}
    }

    Journal article

  49. FateZero: Fusing Attentions for Zero-shot Text-based Video Editing

    Chenyang Qi, Xiaodong Cun, Yong Zhang, Chenyang Lei, Xintao Wang, Ying Shan, Qifeng Chen

    International Conference on Computer Vision · 2023

    BibTeX
    @article{qi2023fatezero,
      title={{FateZero}: Fusing Attentions for Zero-shot Text-based Video Editing},
      author={Qi, Chenyang and Cun, Xiaodong and Zhang, Yong and Lei, Chenyang and Wang, Xintao and Shan, Ying and Chen, Qifeng},
      journal={International Conference on Computer Vision},
      year={2023}
    }

    Journal article

  50. Rerender A Video: Zero-Shot Text-Guided Video-to-Video Translation

    Shuai Yang, Yifan Zhou, Ziwei Liu, Chen Change Loy

    ACM SIGGRAPH Asia · 2023

    BibTeX
    @article{yang2023rerender,
      title={Rerender A Video: Zero-Shot Text-Guided Video-to-Video Translation},
      author={Yang, Shuai and Zhou, Yifan and Liu, Ziwei and Loy, Chen Change},
      journal={ACM SIGGRAPH Asia},
      year={2023}
    }

    Journal article

  51. UniSim: Learning Interactive Real-World Simulators

    Mengjiao Yang, Yilun Du, Kamyar Ghasemipour, Jonathan Tompson, Dale Schuurmans, Pieter Abbeel

    International Conference on Learning Representations · 2024

    BibTeX
    @article{yang2024unisim,
      title={{UniSim}: Learning Interactive Real-World Simulators},
      author={Yang, Mengjiao and Du, Yilun and Ghasemipour, Kamyar and Tompson, Jonathan and Schuurmans, Dale and Abbeel, Pieter},
      journal={International Conference on Learning Representations},
      year={2024}
    }

    Journal article

  52. GameGen-X: Interactive Open-world Game Video Generation

    Haoxuan Che, Xuanhua He, Quande Liu, Cheng Jin, Hao Chen

    arXiv preprint arXiv:2411.00769 · 2024

    BibTeX
    @article{che2024gamegen,
      title={{GameGen-X}: Interactive Open-world Game Video Generation},
      author={Che, Haoxuan and He, Xuanhua and Liu, Quande and Jin, Cheng and Chen, Hao},
      journal={arXiv preprint arXiv:2411.00769},
      year={2024}
    }

    Journal article

  53. Genie: Generative Interactive Environments

    Jake Bruce, Michael Dennis, Ashley Edwards, Jack Parker-Holder, Yuge Shi, Edward Hughes, Matthew Lai, Adrien Muldal, et al.

    International Conference on Machine Learning · 2024

    BibTeX
    @article{bruce2024genie,
      title={Genie: Generative Interactive Environments},
      author={Bruce, Jake and Dennis, Michael and Edwards, Ashley and Parker-Holder, Jack and Shi, Yuge and Hughes, Edward and Lai, Matthew and Muldal, Adrien and Veloso, Theophane and others},
      journal={International Conference on Machine Learning},
      year={2024}
    }

    Journal article

  54. VideoPoet: A Large Language Model for Zero-Shot Video Generation

    Dan Kondratyuk, Lijun Yu, Xiuye Gu, Jose Lezama, Jonathan Huang, Rachel Hornung, Hartwig Adam, Hassan Akbari, et al.

    International Conference on Machine Learning · 2024

    BibTeX
    @article{kondratyuk2024videopoet,
      title={{VideoPoet}: A Large Language Model for Zero-Shot Video Generation},
      author={Kondratyuk, Dan and Yu, Lijun and Gu, Xiuye and Lezama, Jos{\'e} and Huang, Jonathan and Hornung, Rachel and Adam, Hartwig and Akbari, Hassan and Alon, Yair and others},
      journal={International Conference on Machine Learning},
      year={2024}
    }

    Journal article

  55. Language Model Beats Diffusion -- Tokenizer is Key to Visual Generation

    Lijun Yu, Jose Lezama, Nitesh B. Gundavarapu, Luca Versari, Kihyuk Sohn, David Minnen, Yong Cheng, Agrim Gupta, et al.

    International Conference on Learning Representations · 2024

    BibTeX
    @article{yu2024language,
      title={Language Model Beats Diffusion -- Tokenizer is Key to Visual Generation},
      author={Yu, Lijun and Lezama, Jos{\'e} and Gundavarapu, Nitesh B. and Versari, Luca and Sohn, Kihyuk and Minnen, David and Cheng, Yong and Gupta, Agrim and Gu, Xiuye and Hauptmann, Alexander G. and others},
      journal={International Conference on Learning Representations},
      year={2024}
    }

    Journal article

  56. Emu Video: Factorizing Text-to-Video Generation by Explicit Image Conditioning

    Rohit Girdhar, Mannat Singh, Andrew Brown, Quentin Duval, Samaneh Azadi, Sai Saketh Rambhatla, Akbar Shah, Xi Yin, et al.

    arXiv preprint arXiv:2311.10709 · 2023

    BibTeX
    @article{dai2023emu,
      title={Emu Video: Factorizing Text-to-Video Generation by Explicit Image Conditioning},
      author={Girdhar, Rohit and Singh, Mannat and Brown, Andrew and Duval, Quentin and Azadi, Samaneh and Rambhatla, Sai Saketh and Shah, Akbar and Yin, Xi and Parikh, Devi and Misra, Ishan},
      journal={arXiv preprint arXiv:2311.10709},
      year={2023}
    }

    Journal article

  57. Towards Accurate Generative Models of Video: A New Metric and Challenges

    Thomas Unterthiner, Sjoerd van Steenkiste, Karol Kurach, Raphael Marinier, Marcin Michalski, Sylvain Gelly

    arXiv preprint arXiv:1812.01717 · 2019

    BibTeX
    @article{unterthiner2019fvd,
      title={Towards Accurate Generative Models of Video: A New Metric and Challenges},
      author={Unterthiner, Thomas and van Steenkiste, Sjoerd and Kurach, Karol and Marinier, Raphael and Michalski, Marcin and Gelly, Sylvain},
      journal={arXiv preprint arXiv:1812.01717},
      year={2019}
    }

    Journal article

  58. World Models

    David Ha, Jurgen Schmidhuber

    arXiv preprint arXiv:1803.10122 · 2018

    BibTeX
    @article{ha2018worldmodels,
      title={World Models},
      author={Ha, David and Schmidhuber, J{\"u}rgen},
      journal={arXiv preprint arXiv:1803.10122},
      year={2018}
    }

    Journal article

  59. Cosmos World Foundation Model Platform for Physical AI

    NVIDIA

    arXiv preprint arXiv:2501.03575 · 2025

    BibTeX
    @article{du2024cosmos,
      title={Cosmos World Foundation Model Platform for Physical {AI}},
      author={NVIDIA},
      journal={arXiv preprint arXiv:2501.03575},
      year={2025}
    }

    Journal article

  60. Consistency Models

    Yang Song, Prafulla Dhariwal, Mark Chen, Ilya Sutskever

    International Conference on Machine Learning · 2023

    BibTeX
    @article{song2023consistency,
      title={Consistency Models},
      author={Song, Yang and Dhariwal, Prafulla and Chen, Mark and Sutskever, Ilya},
      journal={International Conference on Machine Learning},
      year={2023}
    }

    Journal article

  61. Adding Conditional Control to Text-to-Image Diffusion Models

    Lvmin Zhang, Anyi Rao, Maneesh Agrawala

    International Conference on Computer Vision · 2023

    BibTeX
    @article{zhang2023adding,
      title={Adding Conditional Control to Text-to-Image Diffusion Models},
      author={Zhang, Lvmin and Rao, Anyi and Agrawala, Maneesh},
      journal={International Conference on Computer Vision},
      year={2023}
    }

    Journal article

  62. Classifier-free diffusion guidance

    Jonathan Ho, Tim Salimans

    arXiv preprint arXiv:2207.12598 · 2022

    BibTeX
    @article{ho2022classifier,
      title={Classifier-free diffusion guidance},
      author={Ho, Jonathan and Salimans, Tim},
      journal={arXiv preprint arXiv:2207.12598},
      year={2022}
    }

    Journal article

  63. Rethinking Spatiotemporal Feature Learning: Speed-Accuracy Trade-offs in Video Classification

    Saining Xie, Chen Sun, Jonathan Huang, Zhuowen Tu, Kevin Murphy

    European Conference on Computer Vision · 2018

    BibTeX
    @article{xie2018rethinking,
      title={Rethinking Spatiotemporal Feature Learning: Speed-Accuracy Trade-offs in Video Classification},
      author={Xie, Saining and Sun, Chen and Huang, Jonathan and Tu, Zhuowen and Murphy, Kevin},
      journal={European Conference on Computer Vision},
      year={2018}
    }

    Journal article

  64. A Closer Look at Spatiotemporal Convolutions for Action Recognition

    Du Tran, Heng Wang, Lorenzo Torresani, Jamie Ray, Yann LeCun, Manohar Paluri

    Conference on Computer Vision and Pattern Recognition · 2018

    BibTeX
    @article{tran2018closer,
      title={A Closer Look at Spatiotemporal Convolutions for Action Recognition},
      author={Tran, Du and Wang, Heng and Torresani, Lorenzo and Ray, Jamie and LeCun, Yann and Paluri, Manohar},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2018}
    }

    Journal article

  65. RoFormer: Enhanced Transformer with Rotary Position Embedding

    Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, Yunfeng Liu

    Neurocomputing, vol. 568, pp. 127063 · 2024

    BibTeX
    @article{su2021roformer,
      title={{RoFormer}: Enhanced Transformer with Rotary Position Embedding},
      author={Su, Jianlin and Ahmed, Murtadha and Lu, Yu and Pan, Shengfeng and Bo, Wen and Liu, Yunfeng},
      journal={Neurocomputing},
      volume={568},
      pages={127063},
      year={2024}
    }

    Journal article

  66. Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow

    Xingchao Liu, Chengyue Gong, Qiang Liu

    International Conference on Learning Representations · 2023

    BibTeX
    @article{liu2023rectified,
      title={Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow},
      author={Liu, Xingchao and Gong, Chengyue and Liu, Qiang},
      journal={International Conference on Learning Representations},
      year={2023}
    }

    Journal article

  67. Stochastic Interpolants: A Unifying Framework for Flows and Diffusions

    Michael S. Albergo, Nicholas M. Boffi, Eric Vanden-Eijnden

    Proceedings of the 40th International Conference on Machine Learning (ICML) · 2023

    BibTeX
    @inproceedings{albergo2023stochastic,
      title={Stochastic Interpolants: A Unifying Framework for Flows and Diffusions},
      author={Albergo, Michael S. and Boffi, Nicholas M. and Vanden-Eijnden, Eric},
      booktitle={Proceedings of the 40th International Conference on Machine Learning (ICML)},
      year={2023}
    }

    Conference paper

  68. DynamiCrafter: Animating Open-Domain Images with Video Diffusion Priors

    Jinbo Xing, Menghan Xia, Yong Zhang, Haoxin Chen, Wangbo Wang, Hanyuan Zhang, Xintao Liu, Tien-Tsin Chen, et al.

    European Conference on Computer Vision · 2024

    BibTeX
    @article{xing2025dynamicrafter,
      title={{DynamiCrafter}: Animating Open-Domain Images with Video Diffusion Priors},
      author={Xing, Jinbo and Xia, Menghan and Zhang, Yong and Chen, Haoxin and Wang, Wangbo and Zhang, Hanyuan and Liu, Xintao and Chen, Tien-Tsin and Shan, Ying and others},
      journal={European Conference on Computer Vision},
      year={2024}
    }

    Journal article

  69. I2VGen-XL: High-Quality Image-to-Video Synthesis via Cascaded Diffusion Models

    Shiwei Zhang, Jiayu Wang, Yingya Zhang, Kang Zhao, Hangjie Yuan, Zhiwu Qin, Xiang Wang, Deli Zhao, et al.

    arXiv preprint arXiv:2311.04145 · 2023

    BibTeX
    @article{zhang2023i2vgenxl,
      title={{I2VGen-XL}: High-Quality Image-to-Video Synthesis via Cascaded Diffusion Models},
      author={Zhang, Shiwei and Wang, Jiayu and Zhang, Yingya and Zhao, Kang and Yuan, Hangjie and Qin, Zhiwu and Wang, Xiang and Zhao, Deli and Zhou, Jingren},
      journal={arXiv preprint arXiv:2311.04145},
      year={2023}
    }

    Journal article

  70. Adding Conditional Control to Text-to-Image Diffusion Models

    Lvmin Zhang, Anyi Rao, Maneesh Agrawala

    International Conference on Computer Vision · 2023

    BibTeX
    @article{zhang2023controlnet,
      title={Adding Conditional Control to Text-to-Image Diffusion Models},
      author={Zhang, Lvmin and Rao, Anyi and Agrawala, Maneesh},
      journal={International Conference on Computer Vision},
      year={2023}
    }

    Journal article

  71. DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generation

    Nataniel Ruiz, Yuanzhen Li, Varun Jampani, Yael Barber, Michael Rubinstein, Kfir Aberman

    Conference on Computer Vision and Pattern Recognition · 2023

    BibTeX
    @article{ruiz2023dreambooth,
      title={{DreamBooth}: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generation},
      author={Ruiz, Nataniel and Li, Yuanzhen and Jampani, Varun and Barber, Yael and Rubinstein, Michael and Aberman, Kfir},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2023}
    }

    Journal article

  72. QLoRA: Efficient Finetuning of Quantized Language Models

    Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, Luke Zettlemoyer

    Advances in Neural Information Processing Systems, vol. 36 · 2023

    BibTeX
    @article{dettmers2023qlora,
      title={{QLoRA}: Efficient Finetuning of Quantized Language Models},
      author={Dettmers, Tim and Pagnoni, Artidoro and Holtzman, Ari and Zettlemoyer, Luke},
      journal={Advances in Neural Information Processing Systems},
      volume={36},
      year={2023}
    }

    Journal article

  73. SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equations

    Chenlin Meng, Yutong He, Yang Song, Jiaming Song, Jiajun Wu, Jun-Yan Zhu, Stefano Ermon

    International Conference on Learning Representations · 2022

    BibTeX
    @article{meng2021sdedit,
      title={{SDEdit}: Guided Image Synthesis and Editing with Stochastic Differential Equations},
      author={Meng, Chenlin and He, Yutong and Song, Yang and Song, Jiaming and Wu, Jiajun and Zhu, Jun-Yan and Ermon, Stefano},
      journal={International Conference on Learning Representations},
      year={2022}
    }

    Journal article

  74. GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium

    Martin Heusel, Hubertus Ramsauer, Thomas Unterthiner, Bernhard Nessler, Sepp Hochreiter

    Advances in Neural Information Processing Systems · 2017

    BibTeX
    @article{heusel2017fid,
      title={{GANs} Trained by a Two Time-Scale Update Rule Converge to a Local {Nash} Equilibrium},
      author={Heusel, Martin and Ramsauer, Hubertus and Unterthiner, Thomas and Nessler, Bernhard and Hochreiter, Sepp},
      journal={Advances in Neural Information Processing Systems},
      year={2017}
    }

    Journal article

  75. Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset

    Joao Carreira, Andrew Zisserman

    Conference on Computer Vision and Pattern Recognition · 2017

    BibTeX
    @article{carreira2017i3d,
      title={Quo Vadis, Action Recognition? {A} New Model and the Kinetics Dataset},
      author={Carreira, Jo{\~a}o and Zisserman, Andrew},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2017}
    }

    Journal article

  76. VBench: Comprehensive Benchmark Suite for Video Generative Models

    Ziqi Huang, Yinan He, Jiashuo Yu, Fan Zhang, Chenyang Si, Yuming Jiang, Yuanhan Zhang, Tianxing Wu, et al.

    Conference on Computer Vision and Pattern Recognition · 2024

    BibTeX
    @article{huang2024vbench,
      title={{VBench}: Comprehensive Benchmark Suite for Video Generative Models},
      author={Huang, Ziqi and He, Yinan and Yu, Jiashuo and Zhang, Fan and Si, Chenyang and Jiang, Yuming and Zhang, Yuanhan and Wu, Tianxing and Jin, Qingyang and Chanpaisit, Nattapol and others},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2024}
    }

    Journal article

  77. Human Motion Diffusion Model

    Guy Tevet, Sigal Raab, Brian Gordon, Yonatan Shafir, Daniel Cohen-Or, Amit H. Bermano

    International Conference on Learning Representations · 2023

    BibTeX
    @article{tevet2023mdm,
      title={Human Motion Diffusion Model},
      author={Tevet, Guy and Raab, Sigal and Gordon, Brian and Shafir, Yonatan and Cohen-Or, Daniel and Bermano, Amit H.},
      journal={International Conference on Learning Representations},
      year={2023}
    }

    Journal article

  78. MagicAnimate: Temporally Consistent Human Image Animation using Diffusion Model

    Zhongcong Xu, Jianfeng Zhang, Jun Hao Liew, Hanshu Yan, Jia-Wei Liu, Chenxu Zhang, Jiashi Feng, Mike Zheng Shou

    Conference on Computer Vision and Pattern Recognition · 2024

    BibTeX
    @article{xu2024magicanimate,
      title={{MagicAnimate}: Temporally Consistent Human Image Animation using Diffusion Model},
      author={Xu, Zhongcong and Zhang, Jianfeng and Liew, Jun Hao and Yan, Hanshu and Liu, Jia-Wei and Zhang, Chenxu and Feng, Jiashi and Shou, Mike Zheng},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2024}
    }

    Journal article

  79. MM-Diffusion: Learning Multi-Modal Diffusion Models for Joint Audio and Video Generation

    Ludan Ruan, Yiyang Ma, Huan Yang, Huiguo He, Bei Liu, Jianlong Fu, Nicholas Jing Yuan, Qin Jin, et al.

    Conference on Computer Vision and Pattern Recognition · 2023

    BibTeX
    @article{ruan2023mmdiffusion,
      title={{MM-Diffusion}: Learning Multi-Modal Diffusion Models for Joint Audio and Video Generation},
      author={Ruan, Ludan and Ma, Yiyang and Yang, Huan and He, Huiguo and Liu, Bei and Fu, Jianlong and Yuan, Nicholas Jing and Jin, Qin and Guo, Baining},
      journal={Conference on Computer Vision and Pattern Recognition},
      year={2023}
    }

    Journal article

  80. EMO: Emote Portrait Alive -- Generating Expressive Portrait Videos with Audio2Video Diffusion Model under Weak Conditions

    Linrui Tian, Qi Wang, Bang Zhang, Liefeng Bo

    European Conference on Computer Vision · 2024

    BibTeX
    @article{tian2024emo,
      title={{EMO}: Emote Portrait Alive -- Generating Expressive Portrait Videos with Audio2Video Diffusion Model under Weak Conditions},
      author={Tian, Linrui and Wang, Qi and Zhang, Bang and Bo, Liefeng},
      journal={European Conference on Computer Vision},
      year={2024}
    }

    Journal article

  81. AniPortrait: Audio-Driven Synthesis of Photorealistic Portrait Animation

    Huawei Wei, Zejun Yang, Zhisheng Wang

    arXiv preprint arXiv:2403.17694 · 2024

    BibTeX
    @article{wei2024aniportrait,
      title={{AniPortrait}: Audio-Driven Synthesis of Photorealistic Portrait Animation},
      author={Wei, Huawei and Yang, Zejun and Wang, Zhisheng},
      journal={arXiv preprint arXiv:2403.17694},
      year={2024}
    }

    Journal article

  82. DreamPose: Fashion Video Synthesis with Stable Diffusion

    Johanna Karras, Aleksander Holynski, Ting-Chun Wang, Ira Kemelmacher-Shlizerman

    International Conference on Computer Vision · 2023

    BibTeX
    @article{karras2024dreampose,
      title={{DreamPose}: Fashion Video Synthesis with Stable Diffusion},
      author={Karras, Johanna and Holynski, Aleksander and Wang, Ting-Chun and Kemelmacher-Shlizerman, Ira},
      journal={International Conference on Computer Vision},
      year={2023}
    }

    Journal article

  83. CatVTON: Concatenation Is All You Need for Virtual Try-On with Diffusion Models

    Zheng Chong, Xiao Xu, Wanli Zhu, Haoxiang Peng, Nong He

    arXiv preprint arXiv:2407.15886 · 2024

    BibTeX
    @article{chong2024catvton,
      title={{CatVTON}: Concatenation Is All You Need for Virtual Try-On with Diffusion Models},
      author={Chong, Zheng and Xu, Xiao and Zhu, Wanli and Peng, Haoxiang and He, Nong},
      journal={arXiv preprint arXiv:2407.15886},
      year={2024}
    }

    Journal article