VidTok: A Versatile and Open-Source Video Tokenizer

Anni Tang, Tianyu He, Junliang Guo, Xinle Cheng, Li Song, Jiang BianarXiv 2024 · DOI

Introduction

In generative AI, tokenization is the critical process of compressing high-dimensional raw data, such as video pixels, into a compact latent representation. While robust open-source tokenizers exist for images, video tokenization remains a significant bottleneck due to three primary challenges: temporal inconsistency (flickering), training instability (specifically "codebook collapse" in discrete models), and prohibitive computational costs for high-resolution training.

VidTok is introduced as a high-performance, open-source foundational tool designed to address these hurdles. It supports both discrete and continuous tokenization, achieving state-of-the-art reconstruction quality while maintaining high training efficiency.

Architecture and Methodology

VidTok's performance stems from three core architectural and procedural innovations:

Decoupled Spatial-Temporal Architecture

Rather than relying on computationally expensive 3D convolutions for all operations, VidTok employs a decoupled approach. It uses 2D convolutions for spatial scaling and a specialized AlphaBlender operator for temporal scaling. 3D convolutions are strategically reserved for "information fusion" layers, which significantly reduces floating-point operations (FLOPs) without compromising visual quality.

The detailed architecture of VidTok, highlighting the decoupled spatial-temporal blocks and the AlphaBlender operator used for temporal scaling.

Finite Scalar Quantization (FSQ)

To resolve the "codebook collapse" common in traditional Vector Quantization (VQ) models—where the model utilizes only a fraction of its available vocabulary—VidTok adopts Finite Scalar Quantization (FSQ). By quantizing scalars to a fixed, pre-defined set of values rather than learning a codebook of vectors, VidTok ensures 100% codebook utilization and superior training stability.

Two-Stage Training Strategy

To optimize compute resources, VidTok utilizes a two-stage training pipeline. The model is initially trained on low-resolution (128x128) video. In the second stage, the encoder is frozen, and only the decoder is fine-tuned on high-resolution (256x256) video. This approach preserves a unified latent space while cutting total training time by approximately 50%.

Key Insights: Motion and Efficiency

A significant finding in VidTok's development is that training on reduced frame rates (e.g., 3 FPS) actually enhances motion representation. By forcing the model to reconstruct frames that are temporally distant, it learns deeper motion dynamics rather than simple pixel interpolation. Additionally, the AlphaBlender operator proved more efficient than standard 3D pooling for temporal up/downsampling.

Experimental Results

VidTok was evaluated against state-of-the-art models including CogVideoX, Cosmos-Tokenizer, and Open-Sora using the MCL-JCV benchmark and a custom web video dataset. Metrics included PSNR (signal quality), SSIM (structural similarity), LPIPS (perceptual similarity), and FVD (Fréchet Video Distance).

Radar charts comparing VidTok's performance against other state-of-the-art models in discrete and continuous tokenization settings across multiple metrics.

Key results include:

  • Superior Reconstruction: On the MCL-JCV benchmark, the 16-channel VidTok achieved a PSNR of 35.04 and an FVD of 78.9, outperforming CogVideoX (33.76 PSNR / 93.2 FVD).
  • Efficiency Gains: The two-stage strategy reduced computational requirements from 3,072 to 1,536 GPU hours.
  • Quantization Stability: FSQ models maintained nearly 100% codebook utilization throughout training.

Conclusion and Future Work

VidTok provides a robust, efficient framework for video tokenization. While it sets a new standard for reconstruction, future work will focus on narrowing the performance gap between causal and non-causal models for real-time applications and exploring VidTok's integration as a backbone for large-scale Video Diffusion Transformers (DiT).

Summary updated

BibTeX
@misc{tang2024vidtok,
  author = {Anni Tang and Tianyu He and Junliang Guo and Xinle Cheng and Li Song and Jiang Bian},
  title = {{VidTok: A Versatile and Open-Source Video Tokenizer}},
  year = {2024},
  eprint = {2412.13061},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.13061},
}
Figure