This commit is contained in:
Zheng Zangwei (Alex Zheng) 2024-06-19 22:05:47 +08:00 committed by GitHub
parent 2461c0cb55
commit ccb85fc3c3

View file

@ -458,8 +458,9 @@ def STDiT3_XL_2(from_pretrained=None, **kwargs):
@MODELS.register_module("STDiT3-3B/2")
def STDiT3_3B_2(from_pretrained=None, force_huggingface=True, **kwargs):
def STDiT3_3B_2(from_pretrained=None, **kwargs):
# check if from_pretrained is a path
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: