CogVideoX: Text-to-Video Diffusion Models with An Expert Transformer

Zhuoyi Yang, Jiayan Teng, Wendi Zheng, Ming Ding, Shiyu Huang, Jiazheng Xu, Yuanming Yang, Wenyi Hong, Xiaohan Zhang, Guanyu Feng, Da Yin, Yuxuan.Zhang, Weihan Wang, Yean Cheng, Bin Xu, Xiaotao Gu, Yuxiao Dong, Jie Tang

Overview

CogVideoX is a large-scale text-to-video diffusion model designed to overcome the "short-and-shaky" limitations of previous open-source generators. By integrating a 3D Causal VAE with a novel "Expert Transformer" architecture, it produces high-resolution (768x1360), 10-second videos at 16 fps. The resulting videos maintain impressive temporal consistency and semantic alignment with complex prompts.

The Challenge

Despite the hype surrounding models like Sora, generating long-duration, high-resolution video remains a massive technical challenge. Most existing models suffer from three main issues:

  1. Temporal Inconsistency: Videos often "flicker" or objects morph unnaturally because the model treats time and space as separate dimensions.
  2. Limited Duration: Many models are capped at 2-3 seconds, failing to maintain a coherent narrative over longer spans.
  3. Poor Text Alignment: Models often ignore parts of a prompt or fail to understand complex actions (e.g., "a bolt of lightning splits a rock, and a person jumps out").

CogVideoX aims to bridge this gap by rethinking how video data is compressed, how text and video features are fused, and how the model is trained on diverse resolutions.

Methodology

CogVideoX introduces several architectural and procedural innovations to address these bottlenecks.

Architecture of CogVideoX featuring the 3D Causal VAE and Expert Transformer blocks.
  • 3D Causal VAE: Unlike standard 2D VAEs that compress frame-by-frame, this 3D Variational Autoencoder compresses video across both spatial and temporal dimensions. This significantly reduces the sequence length for the transformer (saving compute) while ensuring smoother transitions between frames. By placing all VAE paddings at the start of the convolution space, they ensure that "future" information doesn't leak into the "past," which is critical for maintaining temporal logic.
  • Expert Transformer with Expert AdaLN: To better fuse text and video, the authors developed "Expert Adaptive LayerNorm." Instead of a one-size-fits-all normalization, the model uses separate "expert" paths for text and vision hidden states. This allows the model to handle the different numerical scales and feature spaces of the two modalities more effectively.
  • 3D Full Attention: Many models use "2D+1D" attention (spatial then temporal) to save memory. CogVideoX argues this is a mistake for complex motion, as it prevents a pixel in frame A from directly "seeing" its new position in frame B. They use full 3D attention, optimized via FlashAttention to keep it computationally feasible.
  • Multi-Resolution Frame Packing: To handle various aspect ratios and durations without losing data to cropping, they implement a "packing" strategy that allows different video shapes to coexist in the same training batch.

Datasets and Processing

The model's training pipeline relies heavily on data quality over sheer quantity. The training set consists of a massive collection of ~35M single-shot video clips (averaging 6 seconds) and 2B images. A custom classifier filters out "negative" data, such as videos with heavy editing, lecture-style "talking heads," or low-quality screenshots.

Crucially, the authors built a Dense Captioning Pipeline. Recognizing that most web-scale video captions are too brief, they used CogVLM2 and GPT-4 to generate extremely detailed, frame-by-frame descriptions for their training data. By training on dense, descriptive text rather than short tags, the model learned to "understand" the relationship between specific words and complex physical movements.

Key Results

CogVideoX was released in two sizes: 2B and 5B parameters. Thanks to the 3D VAE, the model can generate a 10-second, 768x1360 video in a single pass, avoiding the need for separate frame-interpolation or super-resolution models.

Radar chart comparing CogVideoX performance against other models on VBench metrics.
  • State-of-the-Art Performance: CogVideoX-5B outperformed top models like Gen-2, Pika, and OpenSora V1.2 across nearly all VBench categories, including Dynamic Quality and GPT4o-MTScore.
  • Human Preference: In side-by-side human evaluations against Kling (a leading closed-source model), CogVideoX-5B won across all four metrics: Sensory Quality, Instruction Following, Physics Simulation, and Cover Quality.
  • The "Aha" on Attention: The paper demonstrates that 2D+1D attention is prone to "collapse" and instability at larger scales (like their 5B parameter model). Full 3D attention proved essential for maintaining the identity of fast-moving objects.

Limitations and Future Work

While highly capable, the authors noted that "High-Quality Fine-Tuning" (used to remove watermarks and subtitles) slightly degraded the model's ability to follow complex semantic instructions. Additionally, while they achieved 8x8x4 compression, more aggressive temporal compression (e.g., a factor of 8) made the model difficult to converge. The team is currently exploring even larger model sizes and further scaling of the training data to push the boundaries of video length and resolution.

Summary updated

BibTeX
@inproceedings{yang2025cogvideox,
  author = {Zhuoyi Yang and Jiayan Teng and Wendi Zheng and Ming Ding and Shiyu Huang and Jiazheng Xu and Yuanming Yang and Wenyi Hong and Xiaohan Zhang and Guanyu Feng and Da Yin and Yuxuan.Zhang and Weihan Wang and Yean Cheng and Bin Xu and Xiaotao Gu and Yuxiao Dong and Jie Tang},
  title = {{CogVideoX: Text-to-Video Diffusion Models with An Expert Transformer}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=LQzN6TRFg9},
}
Figure