Hotfix/t5 load (#487)

* hotfix

* hotfix for stdit

* hotfix for vae
This commit is contained in:
Zheng Zangwei (Alex Zheng) 2024-06-19 23:15:29 +08:00 committed by GitHub
parent 396307c050
commit 4cbf3c33b8

View file

@ -253,6 +253,7 @@ def OpenSoraVAE_V1_2(
local_files_only=False,
freeze_vae_2d=False,
cal_loss=False,
force_huggingface=True,
):
vae_2d = dict(
type="VideoAutoencoderKL",
@ -277,7 +278,7 @@ def OpenSoraVAE_V1_2(
scale=scale,
)
if from_pretrained is not None and not os.path.isdir(from_pretrained):
if force_huggingface or (from_pretrained is not None and not os.path.isdir(from_pretrained)):
model = VideoAutoencoderPipeline.from_pretrained(from_pretrained, **kwargs)
else:
config = VideoAutoencoderPipelineConfig(**kwargs)