Open-Sora: Democratizing Efficient Video Production for All
Python
Hotfix/t5 load (#486)
Zheng Zangwei (Alex Zheng)396307c0504b
diff --git a/opensora/models/stdit/stdit3.py b/opensora/models/stdit/stdit3.pyindex 1c7b516..159d56c 100644--- a/opensora/models/stdit/stdit3.py+++ b/opensora/models/stdit/stdit3.py@@ -447,7 +447,8 @@ class STDiT3(PreTrainedModel):@MODELS.register_module("STDiT3-XL/2")def STDiT3_XL_2(from_pretrained=None, **kwargs):- if from_pretrained is not None and not os.path.isdir(from_pretrained):+ force_huggingface = kwargs.pop("force_huggingface", True)+ if force_huggingface or from_pretrained is not None and not os.path.isdir(from_pretrained):model = STDiT3.from_pretrained(from_pretrained, **kwargs)else:config = STDiT3Config(depth=28, hidden_size=1152, patch_size=(1, 2, 2), num_heads=16, **kwargs)