What is Open-Sora
Open-Sora is a video generation model open-sourced by the Colossal-AI team, aiming to reproduce OpenAI'sSoravideo generation product. Open-Sora is also based on the DiT architecture and is trained in three stages: large-scale image pretraining, large-scale video pretraining, and fine-tuning on high-quality video data, in order to generate video content that matches text descriptions. This open-source solution covers the entire training process of the video generation model, including data processing, all training details, and model checkpoints, for everyone interested in text-to-video models to learn from and use for free.
Open-Sora's official website entry
- Official project homepage:https://hpcaitech.github.io/Open-Sora/
- GitHub code repository:https://github.com/hpcaitech/Open-Sora
Open-Sora's model architecture
The Open-Sora model adopts the currently popularDiffusion Transformer (DiT) architecture, uses Huawei's open-source PixArt-α high-quality text-to-image generation model, and extends it to generate videos by adding temporal attention layers. The specific design is as follows:

Core components
- Pretrained VAE (Variational Autoencoder): VAE is a component used for data compression; it maps input video data to a low-dimensional representation in a latent space. In Open-Sora, the encoder part of the VAE is used during the training stage to compress video data, while in the inference stage, it samples Gaussian noise from the latent space and generates videos.
- Text encoder: This component is responsible for converting text prompts (such as sentences describing video content) into text embeddings, which are then combined with video data to ensure that the generated video matches the text description.
- STDiT (Spatial Temporal Diffusion Transformer): This is the core component of Open-Sora, a DiT model that utilizes a spatial-temporal attention mechanism. STDiT models the temporal relationships in video data by serially stacking one-dimensional temporal attention modules on top of two-dimensional spatial attention modules. In addition, a cross-attention module is used to align the semantic information of the text.
Architecture design
- Spatial-temporal attention mechanism: Each layer of the STDiT model contains a spatial attention module and a temporal attention module. The spatial attention module processes the two-dimensional spatial features of video frames, while the temporal attention module processes the temporal relationships between frames. This design enables the model to effectively handle the spatial and temporal dimensions in video data.
- Cross-attention: After the temporal attention module, the cross-attention module is used to fuse text embeddings with video features, ensuring that the generated video content matches the text description.
- Training and inference process: During the training stage, the encoder of the VAE compresses video data, which is then used together with text embeddings to train the STDiT model. During the inference stage, noise is sampled from the latent space of the VAE, and together with the text prompt is input into the STDiT model to generate denoised features, which are finally decoded by the VAE decoder to obtain the final video.

Open-Sora's reproduction solution
Open-Sora's training reproduction solution refers to the work of Stable Video Diffusion (SVD) and is divided into three stages: large-scale image pretraining, large-scale video pretraining, and fine-tuning on high-quality video data. Through this three-stage training reproduction solution, the Open-Sora model can gradually improve its video generation capabilities, from basic image understanding to complex video content generation, ultimately achieving high-quality video generation results.
Stage 1: Large-scale image pretraining
In the first stage, the model is pretrained on large-scale image datasets to establish a basic understanding of image content. The purpose of this stage is to use existing high-quality image generation models (such as Stable Diffusion) as a foundation to initialize the weights of the video generation model. In this way, the model can learn rich visual features from image data, laying a solid foundation for subsequent video pretraining.
Stage 2: Large-scale video pretraining
The second stage focuses on pretraining on large-scale video data, with the goal of enhancing the model's understanding of video temporal sequences. In this stage, the model is trained on a large amount of video data to learn the temporal relationships and dynamic changes in videos. To improve the model's generalization ability, it is necessary to ensure the diversity of video themes. In addition, in this stage the model incorporates temporal attention modules to better handle time-series data. Training in this stage is carried out on the basis of the first stage, using the weights from the previous stage as the starting point.
Stage 3: Fine-tuning on high-quality video data
The final stage is to fine-tune the model, using high-quality video data to further improve the quality and realism of the generated videos. In this stage, although the amount of video data used may be less than in the second stage, the video duration, resolution, and quality will all be higher. The fine-tuning process helps the model capture more detailed and realistic video content, thereby generating videos that better meet user expectations.