clean up python errors

This commit is contained in:
Jennifer Player 2024-03-11 12:02:18 -04:00 committed by psychedelicious
parent ee77abb4fe
commit 90340a39c7
3 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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):

View File

@ -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)