diff --git a/invokeai/app/api/routers/model_manager.py b/invokeai/app/api/routers/model_manager.py index b1b338733a..08352d718e 100644 --- a/invokeai/app/api/routers/model_manager.py +++ b/invokeai/app/api/routers/model_manager.py @@ -29,7 +29,6 @@ from invokeai.backend.model_manager.config import ( ModelType, SubModelType, ) -from invokeai.backend.model_manager.metadata.metadata_base import RemoteModelFile from invokeai.backend.model_manager.search import ModelSearch from ..dependencies import ApiDependencies diff --git a/invokeai/app/services/model_install/model_install_base.py b/invokeai/app/services/model_install/model_install_base.py index 3989b46c8e..456700bf1d 100644 --- a/invokeai/app/services/model_install/model_install_base.py +++ b/invokeai/app/services/model_install/model_install_base.py @@ -20,7 +20,6 @@ from invokeai.app.services.model_records import ModelRecordServiceBase from invokeai.backend.model_manager import AnyModelConfig, ModelRepoVariant from invokeai.backend.model_manager.config import ModelSourceType from invokeai.backend.model_manager.metadata import AnyModelRepoMetadata -from invokeai.backend.model_manager.metadata.metadata_base import RemoteModelFile class InstallStatus(str, Enum): diff --git a/invokeai/app/services/model_install/model_install_default.py b/invokeai/app/services/model_install/model_install_default.py index b3f0b41a1a..3fe2cfa172 100644 --- a/invokeai/app/services/model_install/model_install_default.py +++ b/invokeai/app/services/model_install/model_install_default.py @@ -38,7 +38,7 @@ from invokeai.backend.model_manager.metadata import ( ModelMetadataWithFiles, RemoteModelFile, ) -from invokeai.backend.model_manager.metadata.metadata_base import HuggingFaceMetadata +from invokeai.backend.model_manager.metadata.metadata_base import HuggingFaceMetadata, UnknownMetadataException from invokeai.backend.model_manager.probe import ModelProbe from invokeai.backend.model_manager.search import ModelSearch from invokeai.backend.util import Chdir, InvokeAILogger @@ -241,7 +241,7 @@ class ModelInstallService(ModelInstallServiceBase): try: metadata = HuggingFaceMetadataFetch(self._session).from_id(source) - except: + except UnknownMetadataException: raise ValueError("No HuggingFace repository found") assert isinstance(metadata, ModelMetadataWithFiles)