mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(install): do not use deprecated pydantic methods
This commit is contained in:
parent
3d1f3818cb
commit
b4b0af7c60
@ -149,7 +149,7 @@ class InstallHelper(object):
|
|||||||
"""
|
"""
|
||||||
# previously-installed models
|
# previously-installed models
|
||||||
for model in self._installer.record_store.all_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
|
info.installed = True
|
||||||
model_key = f"{model.base.value}/{model.type.value}/{model.name}"
|
model_key = f"{model.base.value}/{model.type.value}/{model.name}"
|
||||||
self.all_models[model_key] = info
|
self.all_models[model_key] = info
|
||||||
@ -183,7 +183,7 @@ class InstallHelper(object):
|
|||||||
|
|
||||||
# previously-installed models
|
# previously-installed models
|
||||||
for model in self._installer.record_store.all_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
|
info.installed = True
|
||||||
model_key = f"{model.base.value}/{model.type.value}/{model.name}"
|
model_key = f"{model.base.value}/{model.type.value}/{model.name}"
|
||||||
self.all_models[model_key] = info
|
self.all_models[model_key] = info
|
||||||
|
Loading…
Reference in New Issue
Block a user