We introduce Self Forcing, a novel training paradigm for autoregressive video diffusion models. It addresses the longstanding issue of exposure bias, where models trained on ground-truth context must generate sequences conditioned on their own imperfect outputs during inference. Unlike prior methods that denoise future frames based on ground-truth context frames, Self Forcing conditions each frame's generation on previously self-generated outputs by performing autoregressive rollout with key-value (KV) caching during training. This strategy enables supervision through a holistic loss at the video level that directly evaluates the quality of the entire generated sequence, rather than relying solely on traditional frame-wise objectives. To ensure training efficiency, we employ a few-step diffusion model along with a stochastic gradient truncation strategy, effectively balancing computational cost and performance. We further introduce a rolling KV cache mechanism that enables efficient autoregressive video extrapolation. Extensive experiments demonstrate that our approach achieves real-time streaming video generation with sub-second latency on a single GPU, while matching or even surpassing the generation quality of significantly slower and non-causal diffusion models. Project website: http://self-forcing.github.io/
翻译:本文提出自强制,一种用于自回归视频扩散模型的新型训练范式。该方法解决了长期存在的曝光偏差问题,即训练时基于真实上下文训练的模型在推理时必须基于自身不完美的输出生成序列。与先前基于真实上下文帧对后续帧进行去噪的方法不同,自强制通过在训练期间执行带键值缓存的自回归推演,使每一帧的生成都基于先前自生成的输出。该策略通过视频层面的整体损失函数实现监督,直接评估整个生成序列的质量,而非仅依赖传统的逐帧目标函数。为确保训练效率,我们采用少步扩散模型结合随机梯度截断策略,有效平衡计算成本与性能。我们进一步引入滚动键值缓存机制,实现了高效的自回归视频外推。大量实验表明,我们的方法在单GPU上实现了亚秒级延迟的实时流式视频生成,同时达到甚至超越了速度显著较慢的非因果扩散模型的生成质量。项目网站:http://self-forcing.github.io/