Allow type field to be a string

This commit is contained in:
Brandon Rising 2024-03-15 12:49:11 -04:00 committed by Brandon
parent b83427d7ce
commit 902e26507d

View File

@ -132,7 +132,7 @@ class ModelProbe(object):
format_type = ModelFormat.Diffusers if model_path.is_dir() else ModelFormat.Checkpoint format_type = ModelFormat.Diffusers if model_path.is_dir() else ModelFormat.Checkpoint
model_info = None model_info = None
model_type = fields['type'] if 'type' in fields else None model_type = ModelType(fields['type']) if 'type' in fields else None
if not model_type: if not model_type:
if format_type is ModelFormat.Diffusers: if format_type is ModelFormat.Diffusers:
model_type = cls.get_model_type_from_folder(model_path) model_type = cls.get_model_type_from_folder(model_path)