diff --git a/invokeai/backend/install/model_install_backend.py b/invokeai/backend/install/model_install_backend.py index c5f15a3ce9..b6f6d62d97 100644 --- a/invokeai/backend/install/model_install_backend.py +++ b/invokeai/backend/install/model_install_backend.py @@ -121,8 +121,8 @@ class ModelInstall(object): installed_models = self.mgr.list_models() for md in installed_models: base = md['base_model'] - model_type = md['type'] - name = md['name'] + model_type = md['model_type'] + name = md['model_name'] key = ModelManager.create_key(name, base, model_type) if key in model_dict: model_dict[key].installed = True diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index a8d43a6888..0476425c8b 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -538,9 +538,9 @@ class ModelManager(object): model_dict = dict( **model_config.dict(exclude_defaults=True), # OpenAPIModelInfoBase - name=cur_model_name, + model_name=cur_model_name, base_model=cur_base_model, - type=cur_model_type, + model_type=cur_model_type, ) models.append(model_dict) diff --git a/invokeai/backend/model_management/models/__init__.py b/invokeai/backend/model_management/models/__init__.py index b02d85471d..1c573b26b6 100644 --- a/invokeai/backend/model_management/models/__init__.py +++ b/invokeai/backend/model_management/models/__init__.py @@ -37,9 +37,9 @@ MODEL_CONFIGS = list() OPENAPI_MODEL_CONFIGS = list() class OpenAPIModelInfoBase(BaseModel): - name: str + model_name: str base_model: BaseModelType - type: ModelType + model_type: ModelType for base_model, models in MODEL_CLASSES.items(): @@ -56,7 +56,7 @@ for base_model, models in MODEL_CLASSES.items(): api_wrapper = type(openapi_cfg_name, (cfg, OpenAPIModelInfoBase), dict( __annotations__ = dict( - type=Literal[model_type.value], + model_type=Literal[model_type.value], ), ))