diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index c8a1405428..8bade9cb04 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -258,7 +258,8 @@ from .models import ( ModelConfigBase, ModelNotFoundException, InvalidModelException, - DuplicateModelException, ModelBase, + DuplicateModelException, + ModelBase, ) # We are only starting to number the config file with release 3. @@ -381,13 +382,7 @@ class ModelManager(object): # causing otherwise unreferenced models to be removed from memory self._read_models() - def model_exists( - self, - model_name: str, - base_model: BaseModelType, - model_type: ModelType, - rescan = False - ) -> bool: + def model_exists(self, model_name: str, base_model: BaseModelType, model_type: ModelType, rescan=False) -> bool: """ Given a model name, returns True if it is a valid identifier. @@ -540,8 +535,9 @@ class ModelManager(object): model_class = MODEL_CLASSES[base_model][model_type] return model_class - def _instantiate(self, model_name: str, base_model: BaseModelType, model_type: ModelType, - submodel_type: SubModelType = None) -> ModelBase: + def _instantiate( + self, model_name: str, base_model: BaseModelType, model_type: ModelType, submodel_type: SubModelType = None + ) -> ModelBase: model_config = self._get_model_config(base_model, model_name, model_type) model_path, is_submodel_override = self._get_model_path(model_config, submodel_type) # FIXME: do non-overriden submodels get the right class?