Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

[exp]

Zangwei Zheng856407422908
diff --git a/configs/opensora-v1-2/train/stage1.py b/configs/opensora-v1-2/train/stage1.py
index 3bb43b9..7de8bed 100644
--- a/configs/opensora-v1-2/train/stage1.py
+++ b/configs/opensora-v1-2/train/stage1.py
@@ -39,7 +39,7 @@ model = dict(
)
vae = dict(
type="VideoAutoencoderPipeline",
- from_pretrained="pretrained_models/vae-v2",
+ from_pretrained="pretrained_models/vae-v3",
micro_frame_size=17,
vae_2d=dict(
type="VideoAutoencoderKL",
diff --git a/opensora/models/vae/vae.py b/opensora/models/vae/vae.py
index bf4e9a7..f9e467b 100644
--- a/opensora/models/vae/vae.py
+++ b/opensora/models/vae/vae.py
@@ -126,6 +126,7 @@ class VideoAutoencoderPipeline(nn.Module):
freeze_vae_2d=False,
cal_loss=False,
micro_frame_size=None,
+ scale=2.5,
):
super().__init__()
self.spatial_vae = build_module(vae_2d, MODELS)
@@ -141,7 +142,7 @@ class VideoAutoencoderPipeline(nn.Module):
param.requires_grad = False
self.out_channels = self.temporal_vae.out_channels
- self.scale = 2.5 # make std = 1.0
+ self.scale = scale # make std = 1.0
def encode(self, x):
x_z = self.spatial_vae.encode(x)
diff --git a/scripts/train.py b/scripts/train.py
index 184008c..43137b2 100644
--- a/scripts/train.py
+++ b/scripts/train.py
@@ -238,7 +238,6 @@ def main():
x = vae.encode(x) # [B, C, T, H/P, W/P]
# Prepare text inputs
model_args = text_encoder.encode(y)
- breakpoint()
# Mask
if cfg.mask_ratios is not None: