Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

[wip] adapt qk-norm

Zangwei Zheng4b816146d50c
diff --git a/configs/opensora-v1-2/inference/xl.py b/configs/opensora-v1-2/inference/xl.py
index 00bb21d..e700ea1 100644
--- a/configs/opensora-v1-2/inference/xl.py
+++ b/configs/opensora-v1-2/inference/xl.py
@@ -1,4 +1,4 @@
-num_frames = 2
+num_frames = 1
fps = 1
image_size = (2560, 1536)
# image_size = (2048, 2048)
@@ -25,7 +25,7 @@ text_encoder = dict(
)
scheduler = dict(
type="dpm-solver",
- num_sampling_steps=14,
+ num_sampling_steps=50,
cfg_scale=4.5,
)
dtype = "bf16"
diff --git a/configs/opensora-v1-2/train/adapt.py b/configs/opensora-v1-2/train/adapt.py
index 365b714..d785d16 100644
--- a/configs/opensora-v1-2/train/adapt.py
+++ b/configs/opensora-v1-2/train/adapt.py
@@ -4,22 +4,22 @@ dataset = dict(
transform_name="resize_crop",
)
bucket_config = {
- # "144p": {1: (1.0, 128)},
+ "144p": {1: (1.0, 64)},
# ---
- # "256": {1: (0.8, 64)},
- # "240p": {1: (0.8, 64)},
+ "256": {1: (0.5, 48)},
+ "240p": {1: (0.5, 48)},
# ---
- # "360p": {1: (0.5, 28)},
- # "512": {1: (0.5, 28)},
+ "360p": {1: (0.5, 18)},
+ "512": {1: (0.5, 18)},
# ---
- "480p": {1: (0.4, 14)},
+ "480p": {1: (0.5, 8)},
# ---
- # "720p": {1: (0.4, 6)},
- # "1024": {1: (0.3, 6)},
+ "720p": {1: (0.2, 4)},
+ "1024": {1: (0.2, 4)},
# ---
- # "1080p": {1: (0.3, 3)},
+ "1080p": {1: (0.3, 2)},
# ---
- # "2048": {1: (0.2, 2)},
+ "2048": {1: (0.5, 1)},
}
# Define acceleration
@@ -34,6 +34,7 @@ sp_size = 1
model = dict(
type="STDiT3-XL/2",
from_pretrained="PixArt-Sigma-XL-2-2K-MS.pth",
+ qk_norm=True,
enable_flashattn=True,
enable_layernorm_kernel=True,
)