11.5 Video Generation Foundations
Video generation must represent appearance and change across time. A useful mental model is a compressed space–time grid: the autoencoder determines which detail survives compression, while the denoiser learns dependencies among positions. Neither a grid nor a full attention mask supplies a physics engine.
The 2024 Sora report describes compressed spacetime patches and qualitative strengths and failures; it does not disclose a complete training recipe. [1] FullDiT studies joint conditioning through full attention. [2] Wan provides a separately documented video-model family. [3] These are architectural case studies, not a current leaderboard. See the next page for the dated commercial landscape.
1. From video latents to patches
Let a latent tensor have shape : batch, channels, temporal positions, height and width. A non-overlapping patch size produces
tokens when the dimensions divide exactly. Here counts latent positions; raw frame count also depends on the autoencoder’s temporal compression. The patch projection maps each block to a vector of width .
Educational tensor operation. This code only checks and projects synthetic latents. It contains no trained autoencoder, positional encoding, denoiser, conditioning or sampler, and cannot generate a video.
import torch
import torch.nn as nn
class SpacetimePatchEmbed(nn.Module):
"""
Converts a 3D latent video volume into a 1D sequence of spacetime tokens.
"""
def __init__(self, in_channels=4, embed_dim=1152, patch_size=(2, 2, 2)):
super().__init__()
self.patch_size = patch_size
# A 3D Convolution acts as the patch extraction and linear projection simultaneously.
# The stride equals the patch size to ensure non-overlapping 3D patches.
self.proj = nn.Conv3d(
in_channels, embed_dim,
kernel_size=patch_size,
stride=patch_size
)
def forward(self, x):
# x shape: (Batch, Channels, Time, Height, Width)
B, C, T, H, W = x.shape
if any(size % patch for size, patch in zip((T, H, W), self.patch_size)):
raise ValueError("latent dimensions must be divisible by patch dimensions")
# Extract and project patches
x = self.proj(x)
# Output shape: (Batch, embed_dim, T', H', W')
# where T' = T // patch_size, H' = H // patch_size, etc.
# Flatten the spatial and temporal dimensions into a single sequence dimension
x = x.flatten(2) # shape: (Batch, embed_dim, T'*H'*W')
# Transpose to match the standard Transformer expectation: (Batch, Sequence_Length, Embed_Dim)
x = x.transpose(1, 2)
return x
# Example execution simulating a compressed video latent
batch_size = 2
latent_channels = 4
# Synthetic latent: the raw video duration depends on the VAE temporal stride.
video_latent = torch.randn(batch_size, latent_channels, 16, 32, 32)
patcher = SpacetimePatchEmbed(in_channels=latent_channels, embed_dim=1152, patch_size=(2, 2, 2))
tokens = patcher(video_latent)
print(f"Input latent shape: {video_latent.shape}")
print(f"Output token sequence shape: {tokens.shape}")
# Sequence length = (16/2) * (32/2) * (32/2) = 8 * 16 * 16 = 2048 tokens
2. Attention connectivity and cost
For tokens of width , dense attention’s core performs arithmetic; projections add . Materializing the score matrix costs quadratic memory, but a fused exact-attention kernel need not store that entire matrix. Distributed attention partitions work and communication; it does not remove the arithmetic requirement.
- Spatial attention connects positions in one frame; temporal attention connects positions across time. Alternating them expands information flow across layers. A single layer’s mask is not the full network’s receptive field.
- Full attention permits every patch to exchange information with every other patch. Permission to attend does not imply useful learned tracking or physical consistency.
- Sparse attention removes selected connections to reduce work. Evaluate quality under motion, occlusion and long duration; a pattern efficient for one distribution can discard evidence needed by another.
The interaction shows connectivity for an unmasked video denoiser. It shows neither learned attention weights nor an online causal video model.
Spatiotemporal Attention Routing
Select or focus a patch to inspect its allowed attention connections.
All n patches connect; attention-core work is O(n²d). This shows the mask, not learned weights or a guarantee of physical or 3D consistency.
3. Conditioning the denoiser
A DiT processes noisy latent tokens through Transformer blocks. [4] Conditions may enter through adaptive normalization, cross-attention or concatenated tokens. In adaptive normalization, a conditioning network produces scale and shift for normalized activations; the exact conditioning signals depend on the architecture.
FullDiT combines task conditions in a shared sequence. [2] This makes joint interactions available, but neither removes all contradictory conditions nor guarantees synchronized motion. Concatenation increases sequence work; separate adapters can still be appropriate when modularity or limited adaptation budget matters. Compare both under the same conditions and resource limits.
4. A visual success is not a simulator guarantee
A generated object may reappear after an occlusion without the system maintaining an explicit persistent object state. Plausible motion can coexist with incorrect collisions, counts or conservation. The Sora report itself discusses simulation limitations. [1] Treat physical consistency as a testable behavior, not an architectural consequence.
For an engineering evaluation, fix model/checkpoint, autoencoder, scheduler, steps, guidance, resolution, duration, seed and conditioning. Keep test scenes and their variants out of training. Include occlusion/reappearance, camera motion, object counts, contact events, fast motion, text, and conflicting controls. Report per-slice failures and human-review agreement; a favorable selected clip is not a success rate.
Measure peak memory, time to first preview, full generation latency, accepted-output rate and cost per accepted clip. Repeat trials across seeds and retain failed outputs. State which physical properties the rubric actually checks. A learned video generator and an action-conditioned world model may share representations while requiring different validation.
5. Practical takeaway
Choose compression and patch sizes with the detail and duration budget in mind. Then compare attention and conditioning designs using matched quality and runtime tests. Public demonstrations can motivate hypotheses, but undisclosed training details remain undisclosed. The next page separates product availability and provider claims from these foundations.
Quizzes
Quiz 1: Why can latent temporal positions not be read directly as raw video frames?
The autoencoder may compress time. Raw duration depends on its temporal stride and boundary handling as well as the input frame rate. A tensor shape alone does not establish seconds of video.
Quiz 2: Does avoiding an explicit attention matrix remove quadratic computation?
No. A fused exact-attention implementation can reduce intermediate storage while still computing dense pairwise interactions. Sparse patterns change which interactions are evaluated and need their own quality checks.
Quiz 3: Why is a full attention mask insufficient evidence of 3D consistency?
It specifies permitted information flow, not learned geometry or a physical state-transition rule. Occlusion, camera motion and contact behavior must be evaluated on held-out scenes.
Quiz 4: What is the tradeoff of concatenating multiple condition streams?
It permits joint interactions in one representation but adds sequence work and does not automatically resolve conflicting conditions. Compare control adherence and runtime against alternatives under matched budgets.
References
- Brooks, T., et al. (2024). Video generation models as world simulators. OpenAI. OpenAI Research.
- Ju, X., et al. (2025). FullDiT: Multi-Task Video Generative Foundation Model with Full Attention. arXiv:2503.19907.
- Wan Team. (2025). Wan: Open and Advanced Large-Scale Video Generative Models. arXiv:2503.20314.
- Peebles, W., & Xie, S. (2023). Scalable Diffusion Models with Transformers. arXiv:2212.09748.