From b4b0af7c60940100f05347a44103b51d77d8b2ff Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 11 Mar 2024 23:31:29 +1100 Subject: [PATCH] fix(install): do not use deprecated pydantic methods --- invokeai/backend/install/install_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/backend/install/install_helper.py b/invokeai/backend/install/install_helper.py index 388eaf9ee5..b177745ae6 100644 --- a/invokeai/backend/install/install_helper.py +++ b/invokeai/backend/install/install_helper.py @@ -149,7 +149,7 @@ class InstallHelper(object): """ # previously-installed models for model in self._installer.record_store.all_models(): - info = UnifiedModelInfo.parse_obj(model.dict()) + info = UnifiedModelInfo.model_validate(model.model_dump()) info.installed = True model_key = f"{model.base.value}/{model.type.value}/{model.name}" self.all_models[model_key] = info @@ -183,7 +183,7 @@ class InstallHelper(object): # previously-installed models for model in self._installer.record_store.all_models(): - info = UnifiedModelInfo.parse_obj(model.dict()) + info = UnifiedModelInfo.model_validate(model.model_dump()) info.installed = True model_key = f"{model.base.value}/{model.type.value}/{model.name}" self.all_models[model_key] = info