Paper · 2023-12-11 · cs.CV, cs.AI, cs.LG
Photorealistic Video Generation with Diffusion Models
W.A.L.T trains one transformer diffusion model on images and videos in a shared causal-autoencoder latent space, with alternating spatial and spatiotemporal window attention and AdaLN-LoRA. Reports state-of-the-art FVD on UCF-101 and Kinetics-600 and FID 2.56 on ImageNet 256 without classifier-free guidance. A three-model cascade makes text-to-video. Author-reported.
Diffusion modelsLatent diffusionSelf-attentionVision Transformer (ViT) backbonesvideo-generationdiffusion-transformerwindow-attentionlatent-diffusionjoint-image-video-training
AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Most video generators either work one frame at a time or rely on a heavy convolutional network. This paper builds a video generator from a transformer that works on a compressed version of the pixels, called a latent. The same model also handles still images, which count as one-frame videos, so it can learn from image collections as well as from video. To keep the work manageable, each token attends only to nearby tokens: within one frame, or across a short stretch of frames. Longer videos are made by feeding earlier frames back in as conditioning. For text-to-video, three models are chained: a base generator and two upscalers that raise the resolution. The authors report strong scores on standard benchmarks without a common trick called classifier-free guidance.
TL;DR
W.A.L.T uses one transformer diffusion model for images and videos. A causal autoencoder compresses both into a shared, continuous latent space, and the transformer attends within windows, per frame and across frames, to save compute. The authors report state-of-the-art FVD on UCF-101 and Kinetics-600 and an ImageNet 256 FID of 2.56 without classifier-free guidance, which VDM++ beats at 2B parameters (2.40). A three-model cascade produces text-to-video at 512×896 and 8 frames per second. All numbers are author-reported.
Problem
- Full self-attention cost grows quadratically with sequence length, so video diffusion has mostly used U-Net backbones §1.
- Per-frame latents allow reuse of pretrained image autoencoders and image-text data, but they limit transformer backbones at high resolution. Spatiotemporal latents compress better but cannot use paired image-text data §1.
- Joint image and video training helps because labelled video data is scarce §4.1. This requires one latent space for both §4.1.
Method
Overview: an autoencoder maps images and videos to one latent space; a transformer denoiser, trained with diffusion, operates on latent patches using alternating window attention and conditions on text, timestep and, for frame prediction, past frames §1 fig. 2.
Background. Forward noising is x_t = sqrt(γ(t)) x_0 + sqrt(1 − γ(t)) ε, with γ decreasing from 1 to 0 §3 eq. 1. The denoiser is trained with a squared-error loss against a target y §3 eq. 2. The paper uses v-prediction, v = sqrt(1 − γ) ε − sqrt(γ) x_0 §3.
Step 1: Learning visual tokens §4.1.
- A causal 3D CNN encoder-decoder, following the MAGVIT-v2 tokenizer, maps a video of 1 + T frames to a latent of 1 + t frames; spatial factor f_s and temporal factor f_t §4.1. The architecture and hyperparameters follow MAGVIT-v2 app. A.
- The first frame is always encoded independently, so an image is a one-frame video §4.1.
- The latent is real-valued with no codebook, unlike the original VQ-VAE §3.
- The autoencoder is trained with reconstruction plus adversarial and perceptual losses §3. Loss weights are not stated.
- The latent channel count c is set to 8 by default §5.2 tab. 3.
- Latents are normalised before the transformer §5.2. The normaliser is not described.
Step 2: Patchify and window attention §4.2.
- Each latent frame is cut into non-overlapping p × p patches, giving h_p = h/p and w_p = w/p tokens per side §4.2.
- Each token gets a learned embedding, the sum of a space and a time embedding, added to the linear patch projection. An image gets only the time embedding of the first latent frame §4.2.
- Blocks alternate two window types §1 fig. 2:
- Spatial window (SW): all tokens of one latent frame, 1 × h_p × w_p §4.2.
- Spatiotemporal window (STW): a 3D window spanning the 1 + t latent frames §4.2.
- In STW layers an image's value embeddings pass through unchanged, through an identity attention mask §4.2.
- Relative position embeddings are used in addition to absolute ones §4.2.
Step 3: Conditioning §4.3.
- Text cross-attention: the input tokens (query) are concatenated with the text tokens (key, value) §4.3. Joint image-video training uses SW cross-attention only; video-only training uses the same window as the self-attention §4.3.
- AdaLN-LoRA. A shared MLP produces six modulation vectors (γ1, γ2, β1, β2, α1, α2) of width d for the first block, from the condition plus timestep embedding c + t §4.3. Each later block i adds a rank-r correction eq. 3 eq. 4. The default is r = 2 §5.2. For a ViT-g with 1B parameters, the per-layer MLPs contribute 475M parameters; with r = 2 they contribute 12M §4.3.
- Self-conditioning. With probability p_sc (default 0.9 §5.2), the model first predicts z̃_0 from z_t with an empty self-condition. It then runs again with that prediction, detached from gradients, concatenated to the input along channels. Otherwise it runs once §4.3.
- The denoiser uses query-key normalisation §5.2.
Step 4: Autoregressive frame prediction §4.4.
- During training, the model is conditioned on past frames with probability p_fp. The value of p_fp is not stated.
- A binary mask m_fp marks the conditioning latent frames: one frame for image-to-video, two for video prediction. The input becomes concat(m_fp ∘ z_t, m_fp) along channels §4.4.
- Inference uses classifier-free guidance with this conditioning §4.4.
Step 5: Cascade and super-resolution §4.5 §5.3 app. A.
- The base model generates 128 × 128 video. Two super-resolution stages each upscale 2× with a depth-to-space convolution on the low-resolution latent §4.5.
- Noise conditioning augmentation: a noise level t_sr is drawn uniformly up to a maximum, noise is added according to γ(t), and t_sr is fed to the AdaLN-LoRA layers §4.5. The maximum is not stated.
- Aspect-ratio fine-tuning: the base is trained square and fine-tuned on a subset to 9:16 by interpolating position embeddings and scaling windows §4.5 app. A.
- Long videos: the base produces the first 17 frames, the last 5 pixel frames are encoded into 2 latent frames, and these condition the next generation app. A.
# Joint step on a mixed batch of images and videos [§4.1] [§4.2]
# An image is a one-frame video, so one model sees both kinds of batch.
def training_step(batch, text_tokens):
# Encode into the shared latent space; first frame encoded alone [§4.1]
latents = causal_encoder(batch) # (B, 1 + t, h, w, c)
latents = normalise_latents(latents) # method not stated [§5.2]
# Sample a timestep and noise, then noise the latents [§3] [eq. 1]
timestep = sample_uniform(0, 1)
noise = sample_gaussian(latents.shape)
gamma_t = noise_schedule(timestep)
noisy = sqrt(gamma_t) * latents + sqrt(1 - gamma_t) * noise
# Predict with self-conditioning [§4.3]
prediction = self_conditioned_denoise(noisy, text_tokens, timestep)
# Compare with the v-prediction target [§3] [eq. 2]
target = sqrt(1 - gamma_t) * noise - sqrt(gamma_t) * latents
return mean((target - prediction) ** 2)# Self-conditioning [§4.3]
# The first pass sees an all-zero self-condition, with probability p_sc.
def self_conditioned_denoise(noisy, text_tokens, timestep):
self_condition = zeros_like(noisy)
if random() < p_sc:
# First pass: estimate z~0, detached from gradients [§4.3]
estimate = model(noisy, zeros_like(noisy), text_tokens, timestep)
self_condition = stop_gradient(estimate)
# Final pass joins the estimate to the input along channels [§4.3]
return model(noisy, self_condition, text_tokens, timestep)# AdaLN-LoRA modulation [§4.3] [eq. 3] [eq. 4]
# The first block uses the MLP; each later block adds a rank-r correction.
def modulation_params(cond_plus_time, mlp, lora_pairs):
shared = mlp(cond_plus_time) # (B, 6 * d)
params = [shared]
for w_b, w_a in lora_pairs:
# Row-vector form; the paper writes W_b W_a [eq. 4]
correction = (cond_plus_time @ w_b) @ w_a # w_b: (d, r), w_a: (r, 6d)
params.append(shared + correction)
return params # gamma, beta, alpha per block# Frame-prediction mask [§4.4]
# Mask marks the conditioning latent frames: 1 for images, 2 for video.
def frame_condition(noisy, frame_mask):
# Masked latent and mask are stacked along channels [§4.4]
return concat_channels(frame_mask * noisy, frame_mask)# Noise conditioning augmentation for a super-resolution stage [§4.5]
# The maximum noise level is not stated in the paper.
def augment_low_res(low_res, max_noise):
# Upscale 2x by depth-to-space first [§4.5]
upscaled = depth_to_space(low_res, factor=2)
level = sample_uniform(0, max_noise) # t_sr [§4.5]
noise = sample_gaussian(upscaled.shape)
gamma_t = noise_schedule(level)
return sqrt(gamma_t) * upscaled + sqrt(1 - gamma_t) * noise, levelHyperparameters
Table 8 tab. 8 lists the stage-wise values. Diffusion settings are shared. Values come from the table unless marked.
| Name | Value | Where | Notes |
|---|---|---|---|
| Diffusion steps / schedule | 1000 steps, linear β from 1e-4 to 0.02 | tab. 8 | |
| Sampler / sampling steps | DDIM, 50 steps | tab. 8 | used for all evaluations §5.1 |
| Zero terminal SNR | used | §5.2 tab. 3 | details of the rescaling not stated; cites Lin et al., arXiv:2305.08891 |
| Autoencoder optimiser | Adam | tab. 8 | learning rate not stated |
| Autoencoder steps / epochs | ImageNet 270 epochs; UCF-101 2000 epochs; K600 270k steps; T2V 1M steps | tab. 8 | batch 256, cosine schedule |
| Latent channels c | 8 | §5.2 tab. 3 | 128 in table row "Channels" is not labelled |
| Spatial / temporal compression | f_s = 8; f_t = 4 for video | tab. 8 | ImageNet: no temporal (f_t not applicable) |
| ImageNet transformer | 24 layers, width 1024, 16 heads, patch 1, AdamW, lr 5e-4, batch 1024, 350 epochs, EMA | tab. 8 | no AdaLN-LoRA, no guidance |
| UCF-101 transformer | 28 layers, width 1152, 16 heads, patch 1, AdamW, lr 5e-4, batch 256, 60k steps, EMA, r = 2 | tab. 8 app. A | class-conditional |
| K600 transformer | 24 layers, width 1024, 16 heads, patch 1, AdamW, lr 5e-4, batch 512, 360 epochs, EMA, r = 2 | tab. 8 | frame prediction, 5 conditioning frames §5.1 |
| T2V base | 52 layers, width 9216, 16 heads, patch 1, Adafactor, lr 2e-4, batch 512, 550k steps, no EMA, r = 2, guidance | tab. 8 | see Pitfalls |
| T2V stage 2 (2×) | 40 layers, width 1408, patch 2, Adafactor, lr 5e-4, batch 512, 675k steps, no EMA, r = 2, guidance | tab. 8 | |
| T2V stage 3 (2×2×) | 24 layers, width 1024, patch 4, Adafactor, lr 5e-4, batch 512, 275k steps, no EMA, r = 2, guidance | tab. 8 | text says p = 2 §5.3; see Pitfalls |
| Window sizes, default | SW 1 × 16 × 16; STW 5 × 8 × 8 | §5.2 app. A | T2V window sizes not given |
| Self-conditioning rate p_sc | 0.9 | §5.2 | |
| AdaLN-LoRA rank r | 2 | §5.2 | |
| Aspect-ratio fine-tune | input 5 × 16 × 28; SW 1 × 16 × 28; STW 5 × 8 × 14; 250k steps; batch 512; constant lr 5e-5; Adafactor | tab. 6 | |
| Ablation training | 35k steps on UCF-101 | app. A | |
| Text encoder | T5-XL | §5.3 | |
| Text-to-video data | ~970M text-image pairs and ~89M text-video pairs | §5.3 | public internet and internal sources |
| Classifier-free guidance scale | not stated | ||
| p_fp (frame-prediction rate) | not stated | ||
| Max noise for augmentation | not stated | ||
| Warmup, weight decay, EMA decay | not stated |
Results
Author-reported. Each row names its setup. Baselines are taken from the paper's tables.
| Setting | Metric | Baseline | This paper | Source |
|---|---|---|---|---|
| K600 frame prediction (5 cond. frames) | FVD ↓ | MAGVIT-v2: 4.3 (307M, 24 steps) | W.A.L.T-L: 3.3 (313M, 50 DDIM) | tab. 1 |
| UCF-101 class-conditional | FVD ↓ | MAGVIT-v2: 58 | W.A.L.T-L: 46; W.A.L.T-XL: 36 (460M) | tab. 1 |
| ImageNet 256, no CFG | FID ↓ / IS ↑ | VDM++: 2.40 FID, 2B params | W.A.L.T-L: 2.56 FID, 215.1 IS (460M, 50 DDIM) | tab. 2 §5.1 |
| ImageNet 256, with CFG | FID ↓ / IS ↑ | MDT: 1.79 FID, 283.0 IS | W.A.L.T-L: 2.40 FID, 290.5 IS | tab. 7 app. B |
| UCF-101 text-to-video, zero-shot | IS ↑ / FVD ↓ | PYoCo: 47.8 / 355.2 | W.A.L.T 3B (video+image): 35.1 / 258.1 | tab. 5 |
| UCF-101 text-to-video, 419M | IS ↑ / FVD ↓ | video only: 26.8 / 598.8 | video+image: 31.7 / 344.5 | tab. 5 |
| UCF-101 ablation, default | FVD ↓ / IS ↑ | — | 60.7 / 87.2 (default configuration) | tab. 3 |
| UCF-101 ablation, self-conditioning | FVD ↓ | p_sc = 0.0: 109.9 | p_sc = 0.9: 61.4 | tab. 3 §5.2 |
The text reports a 44% FVD reduction from self-conditioning §5.2. The text says W.A.L.T-L outperforms prior work on ImageNet without CFG, except that VDM++ has a slightly better FID at 2B parameters §5.1. For text-to-video, the paper says it surpasses prior work on FVD and is competitive on IS, behind PYoCo, which uses CLIP and T5-XXL text encoders §5.3.
Paper vs code
No official code.
What was searched:
- Paper links: the LaTeX source contains no code or repository link; the only
link is the project page §5 (
https://walt-video-diffusion.github.io/). - Project page: fetched; it links only the arXiv record, the PDF and a samples page, with no code release.
- GitHub search:
walt video diffusionreturned one unrelated repository by a third party;walt org:google-researchreturned zero results;window attention latent transformer videoreturned zero results.
No discrepancies can be checked against code.
Pitfalls
- Patch size conflict. The text says both super-resolution stages use p = 2 §5.3. Table 8 gives patch size 4 for the 2×2× stage tab. 8.
- Base model size does not match its table row. The text gives 3B parameters for the base §5.3. Table 8 lists 52 layers at width 9216 tab. 8. A standard transformer block costs roughly 12 · d² parameters, which would put this row far above 3B. The table value is probably a typo or a different quantity; the card cannot resolve it.
- Default ablation numbers disagree. The default configuration scores 60.7 in the patch-size, AdaLN-LoRA r = 2 and "full method" rows tab. 3, but the self-conditioning row at p_sc = 0.9 shows 61.4 tab. 3. The 5 × 8 × 8 window row, which the text calls the default window, shows 59.6 tab. 3. Which run is the baseline is not stated.
- Latent-size claim vs table. The text calls c = 8 a sweet spot §5.2. In the same table, c = 16 has lower FVD (67.0 vs 75.4) at slightly lower IS tab. 3. The table caption says higher c is better, but c = 32 is worse on FVD tab. 3.
- QK-norm. Removing query-key normalisation gives FVD 59.0, better than the default 60.7 tab. 3, yet the paper keeps it for training stability §5.2.
- Bolding in Table 2. Table 2 bolds 2.56 for W.A.L.T, though the grey VDM++ row shows 2.40 tab. 2. The text acknowledges VDM++ has better FID §5.1.
- Self-conditioning target. The first pass is written as z̃_0, which reads like a clean-latent estimate, but the model predicts v §3 §4.3. The paper does not say which quantity is fed back, which input is used on the single-pass branch, or which pass carries the loss. The pseudocode above assumes the loss is on the final pass; this is not stated.
- AdaLN-LoRA shapes. As written, W_b ∈ R^{d×r} and W_a ∈ R^{r×6d} multiply to d × 6d, so the input must be applied as a row vector (see the AdaLN-LoRA pseudocode in Method). The paper does not say so. Also, the paper does not say whether the modulation uses γ or 1 + γ.
- Cross-attention concatenation. "Concatenate the input signal (query) with the conditioning signal (key, value)" §4.3 does not say whether tokens are joined along the sequence or elsewhere.
- Window formula typo. The spatiotemporal window is written as (1 + t) × h_p' × h_w' §4.2. The second term is presumably w_p'. Not confirmed.
- Hidden inputs. p_fp, the augmentation noise maximum, the guidance scale, the autoencoder learning rate and loss weights, warmup, weight decay and the EMA decay are not stated. The paper's text and tables do not give them.
- Frame-prediction mask. The mask formula concatenates m_fp ∘ z_t, but the paper does not say how past frames enter z_t §4.4.
- Data and compute. The text-to-video training set is partly internal and cannot be reproduced §5.3. Hardware and total compute are not stated.
- Speed claim. The "up to 2×" speed-up for local window attention is measured in steps per second on UCF-101 tab. 3 §5.2.
- Different baselines. The text-to-video comparison uses different text encoders and protocols across rows, including adapted prompts for UCF-101 app. A. IS and FVD across rows are not like-for-like.
- Sampling budgets. Table 8 lists guidance for text-to-video but none for the class-conditional models tab. 8. Table 1 compares 50 DDIM steps with baseline budgets from 1 to 1024 steps tab. 1, so speed comparisons are not like-for-like.
Lineage
- Builds on: latent diffusion (Rombach et al., 2022) §1; MAGVIT-v2 tokenizer, arXiv:2310.05737 §4.1; ViT patchify §4.2; AdaLN-LoRA, inspired by LoRA §4.3; self-conditioning after Chen et al., 2022 §4.3; cascaded diffusion for super-resolution §4.5; zero terminal SNR, arXiv:2305.08891 §5.2.
- Compared against: MAGVIT, MAGVIT-v2, Video Diffusion, RIN, TATS, Phenaki tab. 1; DiT, ADM, MDT, MaskDiT, RIN, VDM++ tab. 2; CogVideo, MagicVideo, Make-A-Video, Video LDM, PYoCo tab. 5.
- Superseded by: not known from the content of this wiki.
Source and license
Adapted from “Photorealistic Video Generation with Diffusion Models” by Agrim Gupta, Lijun Yu, Kihyuk Sohn, Xiuye Gu, Meera Hahn, Li Fei-Fei, Irfan Essa, Lu Jiang, José Lezama (arXiv:2312.06662), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.