Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

bs test

zhengzangw236d2377c401
diff --git a/configs/opensora-v1-1/train/stage3-hq.py b/configs/opensora-v1-1/train/stage3-hq.py
index b12699b..2b1db51 100644
--- a/configs/opensora-v1-1/train/stage3-hq.py
+++ b/configs/opensora-v1-1/train/stage3-hq.py
@@ -10,13 +10,12 @@ dataset = dict(
bucket_config = { # 18s/it
"144p": {1: (1.0, 200), 16: (1.0, 36), 32: (1.0, 18), 64: (1.0, 9), 128: (1.0, 4)},
"256": {1: (0.8, 200), 16: (0.5, 24), 32: (0.5, 12), 64: (0.5, 6), 128: (0.8, 4)},
- "240p": {1: (0.8, 200), 16: (0.5, 24), 32: (0.5, 12), 64: (0.5, 6), 128: (0.5, 4)},
+ "240p": {1: (0.8, 200), 16: (0.5, 23), 32: (0.5, 11), 64: (0.5, 6), 128: (0.5, 3)},
"360p": {1: (0.5, 120), 16: (0.5, 11), 32: (0.5, 5), 64: (0.5, 2), 128: (0.5, 1)},
"512": {1: (0.5, 120), 16: (0.5, 11), 32: (0.5, 5), 64: (0.5, 2), 128: (0.8, 1)},
- "480p": {1: (0.4, 80), 16: (0.6, 8), 32: (0.6, 4), 64: (0.6, 2), 128: (0.0, None)},
+ "480p": {1: (0.4, 80), 16: (0.6, 7), 32: (0.6, 3), 64: (0.6, 1), 128: (0.0, None)},
"720p": {1: (0.4, 40), 16: (0.6, 3), 32: (0.6, 1), 96: (0.0, None)},
"1024": {1: (0.3, 40)},
- "1080p": {1: (0.3, 20)},
}
mask_ratios = {
"mask_no": 0.75,
diff --git a/docs/report_02.md b/docs/report_02.md
index 05ac062..b225bf6 100644
--- a/docs/report_02.md
+++ b/docs/report_02.md
@@ -93,7 +93,7 @@ With limited computational resources, we have to carefully monitor the training
1. First, we fine-tune **6k** steps with images of different resolution from `Pixart-alpha-1024` checkpoints. We find the model easily adapts to generate images with different resolutions. We use [SpeeDiT](https://github.com/1zeryu/SpeeDiT) (iddpm-speed) to accelerate the diffusion training.
2. **[Stage 1]** Then, we pretrain the model with gradient-checkpointing for **24k** steps, which takes **4 days** on 64 H800 GPUs. Although the number of samples seen by the model is the same, we find the model learns slowly compared to a smaller batch size. We speculate that at an early stage, the number of steps is more important for training. The most videos are in **240p** resolution, and the config is similar to [stage2.py](/configs/opensora-v1-1/train/stage2.py).
-3. **[Stage 1]** To increase the number of steps, we switch to a smaller batch size without gradient-checkpointing. We also add fps conditioning at this point. We trained **40k** steps for **2 days**. The most videos are in **144p** resolution, and the config file is [stage1.py](/configs/opensora-v1-1/train/stage1.py).
+3. **[Stage 1]** To increase the number of steps, we switch to a smaller batch size without gradient-checkpointing. We also add fps conditioning at this point. We trained **40k** steps for **2 days**. The most videos are in **144p** resolution, and the config file is [stage1.py](/configs/opensora-v1-1/train/stage1.py). We use a lower resolution as we find in Open-Sora 1.0 that the model can learn temporal knowledge with relatively low resolution.
4. **[Stage 1]** We find the model cannot learn well for long videos, and find a noised generation result as speculated to be half-precision problem found in Open-Sora 1.0 training. Thus, we adopt the QK-normalization to stabilize the training. We also switch iddpm-speed to iddpm. We trained for **17k** steps for **14 hours**. The most videos are in **144p** resolution, and the config file is [stage1.py](/configs/opensora-v1-1/train/stage1.py). The stage 1 training lasts for approximately one week, with total step **81k**.
5. **[Stage 2]** We switch to a higher resolution, where most videos are in **240p and 480p** resolution ([stage2.py](/configs/opensora-v1-1/train/stage2.py)). We trained **22k** steps for **one day** on all pre-training data.
6. **[Stage 3]** We switch to a higher resolution, where most videos are in **480p and 720p** resolution ([stage3.py](/configs/opensora-v1-1/train/stage3.py)). We trained **4k** with **one day** on high-quality data.
@@ -108,6 +108,7 @@ As we get one step closer to the replication of Sora, we find many limitations f
- **Lack of time consistency**: we find the model cannot generate videos with high time consistency. We think the problem is due to the lack of training FLOPs. We plan to collect more data and continue training the model to improve the time consistency.
- **Bad human generation**: We find the model cannot generate high-quality human videos. We think the problem is due to the lack of human data. We plan to collect more human data and continue training the model to improve the human generation.
- **Low aesthetic score**: we find the model's aesthetic score is not high. The problem is due to the lack of aesthetic score filtering, which is not conducted due to IO bottleneck. We plan to filter the data by aesthetic score and finetuning the model to improve the aesthetic score.
+- **Worse quality for longer video genration**: we find with a same prompt, the longer video has worse quality. This means the image quality is not equally adapted to different lengths of sequences.
> - **Algorithm & Acceleration**: Zangwei Zheng, Xiangyu Peng, Shenggui Li, Hongxing Liu, Yukun Zhou
> - **Data Collection & Pipeline**: Xiangyu Peng, Zangwei Zheng, Chenhui Shen, Tom Young, Junjie Wang, Chenfeng Yu