diff --git a/invokeai/backend/model_manager/probe.py b/invokeai/backend/model_manager/probe.py index 029366e357..5f4d5a4b5d 100644 --- a/invokeai/backend/model_manager/probe.py +++ b/invokeai/backend/model_manager/probe.py @@ -304,6 +304,11 @@ class ModelProbe(object): else: error_hint = f"class {class_name} is not one of the supported classes [{', '.join(cls.CLASS2TYPE.keys())}]" + if (folder_path / "tokenizer").exists() and (folder_path / "text_encoder").exists(): + return ModelType.CLIPEmbed + if (folder_path / "tokenizer_2").exists() and (folder_path / "text_encoder_2").exists(): + return ModelType.T5Encoder + # give up raise InvalidModelConfigException( f"Unable to determine model type for {folder_path}" + (f"; {error_hint}" if error_hint else "") @@ -747,6 +752,10 @@ class TextualInversionFolderProbe(FolderProbeBase): class T5EncoderFolderProbe(FolderProbeBase): + + def get_base_type(self) -> BaseModelType: + return BaseModelType.Any + def get_format(self) -> ModelFormat: return ModelFormat.T5Encoder