Table of Contents
Fetching ...

MaskFlow: Discrete Flows For Flexible and Efficient Long Video Generation

Michael Fuest, Vincent Tao Hu, Björn Ommer

TL;DR

MaskFlow tackles the challenge of long-video generation by unifying discrete token representations with flow-matching dynamics and introducing a frame-level masking training regime. This enables flexible sampling that can operate in both chunkwise autoregressive and full-sequence modes, with MGM-style sampling delivering high-quality results at markedly fewer function evaluations than diffusion-based baselines. The approach supports timestep-dependent and timestep-independent backbones without retraining, and demonstrates competitive Fréchet Video Distance on FaceForensics and DMLab while scaling to horizons well beyond the training window. The combination of discrete flow matching with frame-level masking offers a practical, efficient path toward scalable, high-fidelity long video synthesis for diverse applications.

Abstract

Generating long, high-quality videos remains a challenge due to the complex interplay of spatial and temporal dynamics and hardware limitations. In this work, we introduce MaskFlow, a unified video generation framework that combines discrete representations with flow-matching to enable efficient generation of high-quality long videos. By leveraging a frame-level masking strategy during training, MaskFlow conditions on previously generated unmasked frames to generate videos with lengths ten times beyond that of the training sequences. MaskFlow does so very efficiently by enabling the use of fast Masked Generative Model (MGM)-style sampling and can be deployed in both fully autoregressive as well as full-sequence generation modes. We validate the quality of our method on the FaceForensics (FFS) and Deepmind Lab (DMLab) datasets and report Frechet Video Distance (FVD) competitive with state-of-the-art approaches. We also provide a detailed analysis on the sampling efficiency of our method and demonstrate that MaskFlow can be applied to both timestep-dependent and timestep-independent models in a training-free manner.

MaskFlow: Discrete Flows For Flexible and Efficient Long Video Generation

TL;DR

MaskFlow tackles the challenge of long-video generation by unifying discrete token representations with flow-matching dynamics and introducing a frame-level masking training regime. This enables flexible sampling that can operate in both chunkwise autoregressive and full-sequence modes, with MGM-style sampling delivering high-quality results at markedly fewer function evaluations than diffusion-based baselines. The approach supports timestep-dependent and timestep-independent backbones without retraining, and demonstrates competitive Fréchet Video Distance on FaceForensics and DMLab while scaling to horizons well beyond the training window. The combination of discrete flow matching with frame-level masking offers a practical, efficient path toward scalable, high-fidelity long video synthesis for diverse applications.

Abstract

Generating long, high-quality videos remains a challenge due to the complex interplay of spatial and temporal dynamics and hardware limitations. In this work, we introduce MaskFlow, a unified video generation framework that combines discrete representations with flow-matching to enable efficient generation of high-quality long videos. By leveraging a frame-level masking strategy during training, MaskFlow conditions on previously generated unmasked frames to generate videos with lengths ten times beyond that of the training sequences. MaskFlow does so very efficiently by enabling the use of fast Masked Generative Model (MGM)-style sampling and can be deployed in both fully autoregressive as well as full-sequence generation modes. We validate the quality of our method on the FaceForensics (FFS) and Deepmind Lab (DMLab) datasets and report Frechet Video Distance (FVD) competitive with state-of-the-art approaches. We also provide a detailed analysis on the sampling efficiency of our method and demonstrate that MaskFlow can be applied to both timestep-dependent and timestep-independent models in a training-free manner.

Paper Structure

This paper contains 43 sections, 10 equations, 9 figures, 9 tables, 4 algorithms.

Figures (9)

  • Figure 1: Our method (MaskFlow) improves video quality compared to baselines while simultaneously requiring fewer function evaluations (NFE) when generating videos $2\times$, $5\times$, and $10\times$ longer than the training window.
  • Figure 2: MaskFlow Training: For each video, Baseline training applies a single masking ratios to all frames, whereas our method samples masking ratios independently for each frame.
  • Figure 3: MaskFlow Sampling: Given $m=2$context frames used to initialize generation, we unmask the current window and use newly generated frames as new context frames in the next chunk of size $k=5$, using stride $s=3$. (Tokenization omitted here to simplify understanding) .
  • Figure 4: MaskFlow performance scales favorably across NFE for different extrapolation factors. Shows a comparison between MaskFlow full sequence and MaskFlow autoregressive modes and other baselines across extrapolation factors on DMLab.
  • Figure 5: Fully autoregressive sampling stabilizes DMLab videos beyond extrapolation factor $10 \times$. All examples use fully autoregressive MaskFlow (MGM-style) sampling with $s=1$ and 6,500 NFE in total. The final context frame is shown in red.
  • ...and 4 more figures