prevent model install crash "torch needs to be restarted with spawn"

This commit is contained in:
Lincoln Stein
2023-07-05 15:38:07 -04:00
parent 17c5568661
commit 90ae8ce26a
2 changed files with 3 additions and 5 deletions

View File

@@ -78,7 +78,6 @@ class ModelProbe(object):
format_type = 'diffusers' if model_path.is_dir() else 'checkpoint'
else:
format_type = 'diffusers' if isinstance(model,(ConfigMixin,ModelMixin)) else 'checkpoint'
model_info = None
try:
model_type = cls.get_model_type_from_folder(model_path, model) \
@@ -105,7 +104,7 @@ class ModelProbe(object):
) else 512,
)
except Exception:
return None
raise
return model_info