Search

Search papers and lessons

Wan: Open and Advanced Large-Scale Video Generative Models

Team Wan, Ang Wang, Baole Ai et al. · 2025

Wan is an open family of video generation models, at 1.3 and 14 billion parameters, that pairs a compact causal video autoencoder with a diffusion transformer trained by flow matching.

On this page

  • Colour = topic mix
  • Probability
  • Calculus
  • Discrete math
  • Linear algebra
  • Neural network basics
  • Generative models
  • ReadReady to readNot yet

TL;DR

Wan is a suite of open video generation models, released in 2025 in two sizes: 1.3 billion parameters and 14 billion parameters. Given a text prompt, it writes a short video. The same family also does image-to-video and video editing. The report says the 14B model beats the open models it was compared with and several commercial ones on the VBench benchmark, and that the 1.3B model needs only 8.19 GB of GPU memory. The code and the weights are public.

Builds on: Flow Matching, Diffusion Transformer (DiT), Variational Autoencoder · Leads to: later open video models that reuse this recipe

Why it mattered

Closed systems such as Sora set the quality bar in 2024, and open-source projects had narrowed the gap with them. Wan was released with weights, code and a long technical report, so other researchers could inspect the stages, from the video autoencoder to the parallel training layout.

The report also gave a benchmark reference point. On the VBench leaderboard, a multi-dimension test suite, the 14B model scored 86.22%, above the Sora entry in the paper's table (84.28%). The 1.3B model, at 83.96%, is placed above HunyuanVideo in the table, and the text also says it is ahead of Kling 1.0. Those are the report's own numbers; check them in the Results section below before quoting them.

The problem

A video is a stack of frames, so it is much bigger than an image. Take 81 frames at 1280 by 720 pixels with three colour channels. That is about 224 million numbers, and a diffusion model would have to denoise all of them at every step. Three problems follow from this, and the design answers each one:

  1. Size. Working on raw pixels is too expensive, so the model needs a compact representation of video, a latent space, in which the diffusion model runs. The autoencoder that makes this space has to compress time as well as space, and it has to do so without letting future frames change past ones.
  2. Sequence length. After compression, a video is still a long sequence of tokens for a transformer. Attention cost grows with the square of that length, so long videos slow training sharply.
  3. Training stability and throughput. Long, high-resolution video makes each batch slow and memory-hungry. The report notes that large batches of long video cause training instability, so the training schedule has to start small.

Wan's answer is a three-part design: a causal 3D video autoencoder (Wan-VAE), a diffusion transformer (DiT) trained with flow matching, and a training schedule that moves from small images up to 720-pixel video.

How it works

Wan's inference path, for one prompt, runs in this order. Each step is one stage of the pipeline.

  1. Encode the text. The prompt goes through a multilingual text encoder, umT5, which turns it into a sequence of up to 512 vectors. The report chose it for multilingual reading, including Chinese and English text inside the video, and for faster convergence.
  2. Start from noise in latent space. The model draws a block of random numbers shaped like a compressed video, one latent per 4 frames and per 8 by 8 pixel patch.
  3. Denoise with the DiT. The transformer takes the noisy latent and the timestep. It patchifies the latent (cuts it into small 2 by 2 blocks and flattens them into tokens), runs transformer blocks that attend across space and time, and uses cross-attention to read the text. It outputs a velocity: the direction in which the latent should move to become cleaner. The report uses about 50 sampling steps at inference.
  4. Decode with Wan-VAE. After the last step, the decoder turns the clean latent back into pixels chunk by chunk, with a feature cache carried between chunks, so arbitrarily long videos can be decoded.

A tiny instance of the shape bookkeeping, with round numbers. Take 5 frames of 64 by 64 pixels.

  • Input: 5 frames, height 64, width 64, 3 colours. That is 5 × 64 × 64 × 3 = 61,440 numbers.
  • Encode: the paper's rule for the latent is 1 + T/4 frames, H/8 by W/8 pixels, and 16 channels, where T + 1 is the number of input frames. With 5 frames, T = 4, so the latent is 2 frames of 8 by 8 with 16 channels: 2 × 8 × 8 × 16 = 2,048 numbers. Check: 61,440 / 2,048 = 30, so the latent holds about 30 times fewer numbers.
  • Patchify: each 2 by 2 spatial patch becomes one token. Height 8 becomes 4, width 8 becomes 4. Tokens: 2 × 4 × 4 = 32. Check: 32 tokens, each with 16 channels, carry the 2,048 numbers.

The DiT sees 32 tokens here. A full 81-frame 720p video gives 21 latent frames of 45 by 80 tokens each, about 75,600 tokens by the same arithmetic, which is why the attention cost and the parallel layout matter.

flowchart LR
  P[Prompt] --> T[umT5 text encoder]
  N[Noise latent] --> D[Diffusion transformer<br/>patchify, attend, cross-attend]
  T --> D
  D -->|velocity, repeated over the sampling steps| N
  N -->|clean latent| V[Wan-VAE decoder]
  V --> OUT[Video frames]

The math

The training objective is the one from Flow Matching, applied to the latent of each image or video. Take a clean latent x1x_{1} (the data), a noise sample x0∼N(0,I)x_{0}\sim\mathcal{N}(0,I), and a time t∈[0,1]t\in[0,1]. The report draws tt from a logit-normal distribution, which puts more weight on intermediate times than a uniform draw would.

Step 1 in symbols: the interpolated latent. The training input is a straight line between noise and data:

xt=t x1+(1−t) x0x_{t}=t\,x_{1}+(1-t)\,x_{0}

At t=0t=0 the input is pure noise; at t=1t=1 it is the clean latent. Each stage of the straight line is one "rectified flow" step, as in Rectified Flow.

Step 2 in symbols: the target velocity. Differentiating the line with respect to tt gives the velocity the model should learn:

vt=dxtdt=x1−x0v_{t}=\frac{dx_{t}}{dt}=x_{1}-x_{0}

This target does not depend on tt. That is what makes the objective simple: the model never has to predict the path, only the constant direction from noise to data.

Step 3 in symbols: the loss. The network u(xt,ctxt,t;θ)u(x_{t}, c_{\text{txt}}, t;\theta) predicts the velocity, where ctxtc_{\text{txt}} is the 512-token text embedding and θ\theta the weights. The loss is a mean squared error:

L=Ex0,x1,ctxt,t∥u(xt,ctxt,t;θ)−vt∥2\mathcal{L}=\mathbb{E}_{x_{0},x_{1},c_{\text{txt}},t}\left\|u(x_{t},c_{\text{txt}},t;\theta)-v_{t}\right\|^{2}

Sampling runs the learned velocity forward in time, from noise to data, in multiple steps (the report says typically around 50). The same network serves every step.

Step 4 in symbols: why the VAE matters to the loss. The loss is computed on latents, not pixels. If the autoencoder is poor, the latent space is poor, and no velocity field fixes that. The VAE is trained on its own first, in three stages: a 2D image VAE, then inflated to a 3D causal VAE, then fine-tuned with a GAN loss. Its training losses are an L1L_1 reconstruction loss, a KL loss (see Kullback–Leibler Divergence and Variational Autoencoder) and an LPIPS perceptual loss, weighted 3, 3e-6 and 3 respectively. The GAN loss comes from a 3D discriminator in the final fine-tuning.

Results

The report gives its results against a set of commercial models (Kling, Hailuo, Sora, Runway Gen-3, Vidu) and open models (Mochi, CogVideoX, HunyuanVideo). Three kinds of evidence are reported.

Human evaluation. More than 700 evaluation tasks, each annotated by more than 20 people, scored alignment, image quality, dynamic quality and overall quality. The report says the 14B model "consistently excels" on the visual quality dimensions in this study.

Automatic benchmark. The report uses VBench, which splits video quality into 16 dimensions and gives a quality score, a semantic score and a total. The table reports these values:

ModelQualitySemanticTotal
Sora (OpenAI, 2024)85.51%79.35%84.28%
HunyuanVideo, open-source85.09%75.82%83.24%
Wan 1.3B84.92%80.10%83.96%
Wan 14B (2025-02-24)86.67%84.44%86.22%

The report describes the 14B result as "benchmark-leading". These are the report's own VBench measurements, so read them as its results, not as a settled ranking across the field.

Efficiency. The 1.3B model needs 8.19 GB of GPU memory, which the abstract presents as fitting consumer GPUs. The 14B model, according to the report's limitations section, takes about 30 minutes on a single GPU without extra optimisation. The Wan-VAE reconstruction speed is reported as 2.5 times that of HunyuanVideo under the same hardware.

Limits. The report names open problems: fine detail is hard to keep when motion is large, and large models remain expensive to run. Its limitations section also says the model does not generate human vocal sounds such as speech or laughter, because speech data was excluded from training.

Reading guide

Read the paper in this order. Each section lists the lessons it leans on.

  • Section 1 (Introduction) and Section 2 (Related Work). Background on video models and the open-versus-closed gap. Needs Diffusion Model and Latent Diffusion Model.
  • Section 3 (Data Processing Pipeline). Curation of image and video data and dense captioning of clips. It is mostly engineering; the lessons it needs are general ideas about data quality, not a single method.
  • Section 4.1 (Spatio-temporal VAE). Wan-VAE's causal design and its feature cache for long videos. Needs Variational Autoencoder and RMS Normalization (the paper swaps GroupNorm for RMSNorm).
  • Section 4.2 (Model training). The DiT block, the text encoder, and the resolution curriculum. Needs Diffusion Transformer (DiT), Adaptive Layer Normalization (the adaLN the DiT uses for timestep conditioning), and Attention Mechanism.
  • Section 4.2.2 (Pre-training). The flow-matching objective and the schedule from 256 pixels to 720 pixels. Needs Flow Matching and Rectified Flow.
  • Section 4.3 (Scaling and efficiency). Parallel layout across GPUs and activation offloading. Needs Data Parallelism, Activation Checkpointing, and Mixed-Precision Training.
  • Section 4.4 (Inference). Parallel strategy, the diffusion cache (attention outputs reused across sampling steps), and quantization.
  • Section 4.7 and Section 5 (Evaluation and applications). The tables above, plus image-to-video and video editing.

Check yourself

QuestionA video has 5 frames of 64 by 64 pixels. Using the paper's rule for the latent (1 + T/4 frames, H/8 by W/8, 16 channels, with T + 1 input frames), how many numbers does the latent hold?Show answer

T = 4, so the latent has 1 + 4/4 = 2 frames. Spatially, 64/8 = 8 by 8. Channels: 16. Total: 2 × 8 × 8 × 16 = 2,048 numbers.

QuestionIn the flow-matching loss, the data latent is x1x_1 and the noise is x0x_0. At t=0.25t = 0.25, what is xtx_t if x1=4x_1 = 4 and x0=0x_0 = 0?Show answer

xt=t x1+(1−t) x0=0.25⋅4+0.75⋅0=1x_t = t\,x_1 + (1-t)\,x_0 = 0.25 \cdot 4 + 0.75 \cdot 0 = 1. The target velocity is x1−x0=4x_1 - x_0 = 4, the same at every tt.

QuestionWhy does the paper train the VAE before the diffusion transformer, rather than training them jointly on pixels?Show answer

The diffusion loss is computed on latents. If the autoencoder compresses poorly or loses detail, the diffusion model has to learn a worse space, and no training of the transformer can recover the lost detail. Pre-training the VAE also makes the transformer's job smaller and cheaper, since it works on a compact representation (about 30 times fewer numbers in the paper's rule, for the tiny example above).

QuestionA team wants to train a model on 720p video with a DiT. Their GPUs have too little memory for activations. Which two levers from the paper apply, and what does each trade off?Show answer

Activation offloading moves activations to CPU memory and overlaps the transfer with computation; the paper prefers it because it costs little end-to-end time. Gradient checkpointing stores fewer activations and recomputes the rest in the backward pass, costing extra arithmetic. The paper combines both, using checkpointing where a layer's memory is high relative to its compute.

QuestionThe 14B model scores 86.22% on VBench and the 1.3B model 83.96%. What does the gap of 2.26 points tell you, and what does it not tell you?Show answer

It shows the larger model scores higher on this benchmark, under the report's setup. It does not say the gap is the same on other prompts, on human judgments, or on the efficiency axis, where the smaller model is far cheaper. It also does not separate model size from the training data and schedule, which changed too.

Sources

Read the full paper

Team Wan, Ang Wang, Baole Ai et al., 2025. arXiv:2503.20314