Skip to content

Commit 6936311

Browse files
authored
update opensora vae init (#206)
1 parent 97ea150 commit 6936311

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

videosys/models/autoencoders/autoencoder_kl_open_sora.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# OpenSora: https://github.com/hpcaitech/Open-Sora
88
# --------------------------------------------------------
99

10-
import os
1110
from typing import Tuple, Union
1211

1312
import numpy as np
@@ -727,7 +726,6 @@ def OpenSoraVAE_V1_2(
727726
micro_batch_size=4,
728727
micro_frame_size=17,
729728
from_pretrained=None,
730-
local_files_only=False,
731729
freeze_vae_2d=False,
732730
cal_loss=False,
733731
):
@@ -736,7 +734,6 @@ def OpenSoraVAE_V1_2(
736734
from_pretrained="PixArt-alpha/pixart_sigma_sdxlvae_T5_diffusers",
737735
subfolder="vae",
738736
micro_batch_size=micro_batch_size,
739-
local_files_only=local_files_only,
740737
)
741738
vae_temporal = dict(
742739
type="VAE_Temporal_SD",
@@ -754,9 +751,5 @@ def OpenSoraVAE_V1_2(
754751
scale=scale,
755752
)
756753

757-
if from_pretrained is not None and not os.path.isdir(from_pretrained):
758-
model = VideoAutoencoderPipeline.from_pretrained(from_pretrained, **kwargs)
759-
else:
760-
config = VideoAutoencoderPipelineConfig(**kwargs)
761-
model = VideoAutoencoderPipeline(config)
754+
model = VideoAutoencoderPipeline.from_pretrained(from_pretrained, **kwargs)
762755
return model

0 commit comments

Comments
 (0)