Open-Sora: Democratizing Efficient Video Production for All
Python
[wip] image wrong with flashattn
Zangwei Zheng889788dd49d5
diff --git a/configs/opensora-v1-1/train/Vx360p.py b/configs/opensora-v1-1/train/Vx360p.pyindex 2d8305d..81ff50a 100644--- a/configs/opensora-v1-1/train/Vx360p.py+++ b/configs/opensora-v1-1/train/Vx360p.py@@ -9,9 +9,9 @@ dataset = dict()bucket_config = {"240p": {1: (1.0, 128), 16: (1.0, 4), 48: (1.0, 4), 72: (1.0, 2)},- "360p": {1: (1.0, 64), 16: (0.5, 2), 24: (0.5, 2), 72: (0.0, None)},- "720p": {1: (1.0, 32), 16: (0.5, 1), 72: (0.0, None)},- "1080p": {1: (1.0, 16)},+ "360p": {1: (1.0, 1), 16: (0.5, 2), 24: (0.5, 2), 72: (0.0, None)},+ "720p": {1: (1.0, 1), 16: (0.5, 1), 72: (0.0, None)},+ "1080p": {1: (1.0, 1)},}# Define accelerationdiff --git a/configs/opensora-v1-1/train/test.py b/configs/opensora-v1-1/train/test.pyindex 6a4541e..e05db5e 100644--- a/configs/opensora-v1-1/train/test.py+++ b/configs/opensora-v1-1/train/test.py@@ -1,18 +1,18 @@# Define datasetdataset = dict(- type="VideoTextDataset",+ type="VariableVideoTextDataset",data_path=None,- num_frames=72,+ num_frames=None,frame_interval=3,- image_size=(360, 480),+ image_size=(None, None, None),transform_name="resize_crop",)-# 72, bs=4, 8s/it-# 48, bs=6, 8s/it-# 24, bs=12, 8s/it+bucket_config = {+ "240p": {1: (1.0, 64)},+}# Define acceleration-num_workers = 4+num_workers = 0dtype = "bf16"grad_checkpoint = Trueplugin = "zero2"@@ -21,8 +21,8 @@ sp_size = 1# Define modelmodel = dict(type="STDiT2-XL/2",- space_scale=0.5,from_pretrained="PixArt-XL-2-1024-MS.pth",+ input_sq_size=512, # pretrained model is trained on 512x512enable_flashattn=True,enable_layernorm_kernel=True,)@@ -52,6 +52,6 @@ log_every = 10ckpt_every = 1000load = None-batch_size = 4+batch_size = 10 # only for logginglr = 2e-5grad_clip = 1.0