(minor) Remove redundant else clause on a for-loop with no break statement.

This commit is contained in:
Ryan Dick 2024-06-28 14:30:14 -04:00
parent c335f92345
commit e6abea7bc5

View File

@ -235,10 +235,10 @@ class ModelProbe(object):
return ModelType.IPAdapter return ModelType.IPAdapter
elif key in {"emb_params", "string_to_param"}: elif key in {"emb_params", "string_to_param"}:
return ModelType.TextualInversion return ModelType.TextualInversion
else:
# diffusers-ti # diffusers-ti
if len(ckpt) < 10 and all(isinstance(v, torch.Tensor) for v in ckpt.values()): if len(ckpt) < 10 and all(isinstance(v, torch.Tensor) for v in ckpt.values()):
return ModelType.TextualInversion return ModelType.TextualInversion
raise InvalidModelConfigException(f"Unable to determine model type for {model_path}") raise InvalidModelConfigException(f"Unable to determine model type for {model_path}")