Introduction
Generating high-quality, long-form videos remains a significant challenge for modern diffusion models. While current architectures excel at producing visually stunning short clips, extending these to durations of a minute or more typically encounters two primary hurdles: the memory bottleneck caused by joint spatial-temporal attention over thousands of frames, and the long-term consistency problem, where autoregressive generation leads to narrative drift and subject morphing.
TokensGen addresses these issues by decoupling the generation process. It utilizes a highly compressed "semantic token" space to plan the global narrative of a long video, which is then decoded into high-fidelity clips using an adaptive diffusion strategy. This approach enables the generation of minute-long videos with strong long-term consistency without prohibitive memory requirements.
Methodology
The TokensGen framework is built upon the CogVideoX architecture and operates in two distinct stages to balance global coherence with local detail.
1. Global Planning: Text-to-Token (T2To)
To ensure long-term consistency, the model first generates a sequence of semantic tokens representing the entire video. By operating in a token space that achieves an additional 192x compression over standard 3D-VAE latents, the T2To diffusion transformer can "see" the entire minute-long sequence at once. This global perspective prevents the character and environment drift common in purely autoregressive methods.
2. Local Rendering: Token-to-Video (To2V)
The generated tokens serve as a structural guide for the To2V model. Unlike standard text-to-video models, To2V incorporates a cross-attention branch that ingests these semantic tokens, ensuring that the final high-resolution frames adhere to the layout and motion planned in the first stage.
3. Seamless Transitions: Adaptive FIFO-Diffusion
To render long videos clip-by-clip without visible seams, TokensGen employs a modified FIFO-Diffusion strategy. Standard FIFO methods often introduce artifacts due to out-of-distribution noise padding. TokensGen introduces adaptive padding, which aligns initial frame partitions with the model's learned distribution, ensuring smooth temporal transitions between generated segments.
Experimental Results
The models were trained on the MiraData dataset, utilizing 56k videos for the To2V component and a filtered subset of 16k high-quality, minute-long videos for the T2To component.
Quantitative and Qualitative Performance
On the VBench benchmark, TokensGen demonstrated superior performance in temporal dynamics, achieving scores of 98.08 in Motion Smoothness and 78.95 in Dynamic Degree. In human evaluations involving 24 participants, TokensGen achieved a win rate exceeding 75% against state-of-the-art competitors like Video-Infinity and Kling in both text-visual alignment and motion consistency.
Video Editing Capabilities
Beyond generation, the framework supports zero-shot, prompt-guided long video editing. By providing a source video and a new text prompt, the model can modify the environment or subjects while maintaining the original motion trajectory.
Discussion and Conclusion
TokensGen represents a scalable approach to long video generation by leveraging the efficiency of semantic tokens. While the model currently faces limitations in preserving extremely fine-grained details due to the high compression of the token space, it successfully generates coherent videos up to 1176 frames (~2 minutes). Future work will explore multi-scale tokenization to better capture intricate textures and expand the model's training to broader, more diverse datasets.
Summary updated