Search

Search papers and lessons

Movie Gen: A Cast of Media Foundation Models

Adam Polyak, Amit Zohar, Andrew Brown et al. · 2024

Movie Gen is a family of flow-matching transformers that generate 1080p video with sound from text, and its 30-billion-parameter video model beats several commercial systems in human side-by-side tests.

On this page

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

TL;DR

Movie Gen is a family of models from Meta that generate video, images and sound from text. Its largest video model has 30 billion parameters and produces up to 16 seconds of 16 frames per second video, upscaled to 1080p, with a separate 13-billion-parameter model that adds synchronized sound. All of them are plain transformers trained with flow matching in a compressed latent space, and in side-by-side human tests the video model beats several commercial systems on overall quality and realism.

Builds on: Flow Matching, Latent Diffusion Model, Transformer · Leads to: Diffusion Transformer (DiT), Rectified Flow, Classifier-Free Guidance

Why it mattered

Before Movie Gen, most high-quality video generators were closed systems, and the public descriptions of them were thin. Movie Gen was one of the first published reports that gave the architecture, the training stages, the evaluation protocol and two benchmarks in detail. The authors released the Movie Gen Video Bench and Movie Gen Audio Bench prompt sets so that others could measure against the same tasks.

The design choices have spread. The video backbone closely follows the language-model transformer design, so techniques built for large language models (sharding, long context, stable optimisers) carry over directly. The use of flow matching instead of the older diffusion formulation, and the training-stability fixes for the autoencoder, are now common reference points for video models.

The problem

Generating video is far harder than generating one image. A 16-second clip at 16 frames per second has 256 frames, and each frame is a high-resolution picture. If the model worked on raw pixels, the number of values to predict would be enormous, and self-attention, whose cost grows quadratically with length, would be impractical.

Three requirements follow:

  1. The video must be compressed into a smaller representation before the transformer sees it. The compression must keep enough detail for sharp images and must not introduce artefacts.
  2. The generator must handle many resolutions, aspect ratios and durations, not just one fixed square format.
  3. The model must follow a text prompt closely, and it must be trainable at very large scale without the instabilities that plague some diffusion blocks.

Movie Gen answers each requirement with a specific component: a temporal autoencoder, a positional scheme that accepts any shape, and a transformer built like a language model.

How it works

Follow one request through the pipeline. The prompt is "a firefighter runs out of a burning forest, 16 seconds, 768 by 768 pixels, 16 frames per second".

flowchart LR
  A["Text prompt"] --> B["Text encoders"]
  C["Noise latent"] --> D["Video transformer"]
  B --> D
  D --> E["Predicted velocity, step by step"]
  E --> F["Temporal autoencoder decoder"]
  F --> G["768 px video"]
  G --> H["Spatial upsampler"]
  H --> I["1080p video"]
  1. Encode the prompt. Several text encoders read the prompt: UL2, ByT5 and a long-prompt version of MetaCLIP. Their outputs are concatenated into one sequence P\mathbf{P} that conditions the transformer. The encoders are complementary: one captures meaning, one captures characters for on-screen text, and one captures image-text alignment. Check: the prompt gives a sequence of embeddings of fixed width, one for each text token from each encoder.

  2. Start from noise in the latent space. The sampler draws X0\mathbf{X}_0 from a standard Gaussian. This is not a picture yet; it is a latent tensor the same shape as the compressed video. The temporal autoencoder (TAE) compresses 8 times along time, height and width, so the latent holds T×C×H×WT \times C \times H \times W values with C=16C = 16 channels. Check: the TAE compresses 256 frames to 32 latent frames, since 256/8=32256 / 8 = 32.

  3. Turn the latent into transformer tokens. A 3D convolution with kernel 1 in time and 2 by 2 in space, and stride equal to the kernel, cuts each latent frame into 2 by 2 blocks. At 768 px, a latent frame is 96×9696 \times 96, which gives 48×48=230448 \times 48 = 2304 tokens per frame. Check: 3232 latent frames times 23042304 tokens per frame is 73,72873{,}728, which the paper rounds to about 73K tokens.

  4. Predict a velocity at each step. At time tt, the transformer receives the noisy latent, the prompt and the time, and outputs a velocity, which says which direction to move the latent to reach a clean video. Adaptive layer norm injects the time, and cross-attention injects the prompt. Check: the same network is used at every step; only tt changes.

  5. Integrate from noise to video. The sampler moves the latent from t=0t = 0 (pure noise) to t=1t = 1 (clean video) by repeatedly adding the predicted velocity times a step size. The paper uses a first-order Euler solver on a fixed schedule of steps. Check: after all steps, the latent is a clean video latent, which is the input to the decoder.

  6. Decode and upscale. The TAE decoder maps the latent back to 768 px frames. A separate spatial upsampler, a 7-billion-parameter video-to-video model, turns the 768 px video into 1080p. Check: the upsampler works on video, not on single frames, so motion stays consistent across frames.

For sound, a separate 13-billion-parameter model takes the video and the prompt and produces a 48 kHz audio track in the same way.

The math

Definition: Flow matching

A generative model that learns a velocity field: a function that tells you, at each time tt and each point, which way to move so that a simple distribution (here Gaussian noise) turns into the data distribution.

Step 1 in symbols

Let X0\mathbf{X}_0 be Gaussian noise and X1\mathbf{X}_1 be a clean video latent. The paper uses the path

Xt=t X1+(1−(1−σmin⁡) t) X0,σmin⁡=10−5.\mathbf{X}_t = t\,\mathbf{X}_1 + \bigl(1 - (1 - \sigma_{\min})\,t\bigr)\,\mathbf{X}_0, \qquad \sigma_{\min} = 10^{-5}.

At t=0t = 0 this is pure noise, and at t=1t = 1 it is the data up to a tiny noise term σmin⁡\sigma_{\min}.

Step 2 in symbols

The velocity of this path is the derivative in time:

Vt=dXtdt=X1−(1−σmin⁡) X0.\mathbf{V}_t = \frac{d\mathbf{X}_t}{dt} = \mathbf{X}_1 - (1 - \sigma_{\min})\,\mathbf{X}_0.

Because the path is linear in tt, the velocity does not depend on tt. The model has to learn it from the noisy point Xt\mathbf{X}_t, the prompt P\mathbf{P} and the time tt.

Step 3 in symbols

The model predicts u(Xt,P,t;θ)u(\mathbf{X}_t, \mathbf{P}, t; \theta), and it is trained by minimising the mean squared error to the true velocity:

Et,X0,X1,P∥u(Xt,P,t;θ)−Vt∥2.\mathbb{E}_{t, \mathbf{X}_0, \mathbf{X}_1, \mathbf{P}} \bigl\| u(\mathbf{X}_t, \mathbf{P}, t; \theta) - \mathbf{V}_t \bigr\|^2.

Here θ\theta are the model weights and the expectation is over random times, noises, clean latents and prompts.

Step 4 in symbols

The sampler solves dXtdt=u(Xt,P,t)\dfrac{d\mathbf{X}_t}{dt} = u(\mathbf{X}_t, \mathbf{P}, t) from t=0t = 0 to t=1t = 1. A first-order Euler step with size Δt\Delta t updates the latent by

Xt+Δt=Xt+Δt u(Xt,P,t).\mathbf{X}_{t + \Delta t} = \mathbf{X}_t + \Delta t \, u(\mathbf{X}_t, \mathbf{P}, t).

Step 5 in symbols

Two layers of the transformer carry the conditioning: adaptive layer norm applies a scale and shift computed from tt, and cross-attention lets each video token attend to the prompt sequence P\mathbf{P}. Self-attention is bidirectional over all video tokens, which is what allows a frame to use information from both earlier and later frames.

The temporal autoencoder has its own loss, which adds an outlier penalty to keep latent values near the mean. It is written as a term added to the usual reconstruction and regularisation losses, and it discourages the high-norm latent "dots" that caused visible spots in decoded frames.

Results

Video quality against commercial systems. The paper compares Movie Gen Video with Runway Gen3, LumaLabs, OpenAI Sora and Kling 1.5 with human raters. It reports net win rate, which is the win percentage minus the loss percentage, so it ranges from -100 to 100. On overall quality, Movie Gen Video's net win rate is 35.02 against Runway Gen3 and 60.58 against LumaLabs, both beyond two standard deviations. Against Sora it is 8.23, a moderate win, and against Kling 1.5 it is 3.87, which the authors call on par.

Realism and aesthetics. The net win rates on realness are 48.49 against Runway Gen3, 61.83 against LumaLabs, 37.09 against Kling 1.5, and 11.62 against Sora. The realness win over Sora is significant. On aesthetics, the win over Sora is moderate, at 6.45.

Text faithfulness. Movie Gen Video outperforms Sora, Runway Gen3 and LumaLabs on text alignment and is on par with Kling 1.5, according to the authors.

Limits and caveats. The comparisons use the authors' own prompt set for most systems. For Sora, the authors could only compare against prompts and videos from Sora's public examples, so the comparison is less controlled. The paper also notes that automatic metrics such as FVD and IS do not correlate well with human judgments in this setting, which is why the evaluation relies on people. The outputs are limited to 16 seconds and 16 frames per second in the base setting, with 1080p reached by the separate upsampler. The sound model is a separate model, not one jointly trained with the video model.

Reading guide

Check yourself

QuestionRecall: what is the role of the temporal autoencoder in Movie Gen?Show answer

It compresses video 8 times along time, height and width into a smaller latent, so the transformer works on far fewer tokens. The decoder maps latents back to pixel frames. Without it, the sequence length for a 16-second video would be too large for self-attention to handle.

QuestionComputation: a 16-second clip at 16 frames per second is encoded at 768 by 768 pixels. How many latent frames does the TAE produce, and how many transformer tokens does one latent frame give?Show answer

The clip has 16×16=25616 \times 16 = 256 frames, so the TAE gives 256/8=32256 / 8 = 32 latent frames. Each latent frame is 768/8=96768 / 8 = 96 on each side. With 2 by 2 patches, each frame gives (96/2)2=482=2304(96 / 2)^2 = 48^2 = 2304 tokens. Check: 32×2304=73,72832 \times 2304 = 73{,}728, close to the paper's 73K.

QuestionWhy: the velocity target is Vt=X1−(1−σmin⁡)X0\mathbf{V}_t = \mathbf{X}_1 - (1 - \sigma_{\min})\mathbf{X}_0. Why does the model not need to know the path's shape separately?Show answer

Because the path is linear in tt, its derivative is constant along the path, so the velocity depends only on the endpoints X0\mathbf{X}_0 and X1\mathbf{X}_1. The model learns to predict that constant direction from any point on the path, which is simpler than learning a curved score function.

QuestionApplied: a team uses Movie Gen's approach to build a 2-second 256 by 256 clip at 8 frames per second. Roughly how many transformer tokens would it need, and what would they check first?Show answer

The clip has 16 frames, so the TAE gives 16/8=216 / 8 = 2 latent frames. The latent is 256/8=32256 / 8 = 32 on each side, and with 2 by 2 patches each frame gives 162=25616^2 = 256 tokens. So about 2×256=5122 \times 256 = 512 tokens. They should first check the reconstruction quality of their autoencoder, because the whole pipeline depends on the decoder giving back sharp frames, and the paper found artefacts from a standard autoencoder loss.

Sources

Read the full paper

Adam Polyak, Amit Zohar, Andrew Brown et al., 2024. arXiv:2410.13720