From 8258c87a9f262044788cc6314d52fded60bd7c5a Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 7 Aug 2023 11:00:11 -0400 Subject: [PATCH] refrain from writing deprecated legacy options to invokeai.yaml --- invokeai/backend/install/invokeai_configure.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invokeai/backend/install/invokeai_configure.py b/invokeai/backend/install/invokeai_configure.py index 4bf2a484a1..a846c50dc3 100755 --- a/invokeai/backend/install/invokeai_configure.py +++ b/invokeai/backend/install/invokeai_configure.py @@ -44,6 +44,8 @@ from invokeai.app.services.config import ( ) from invokeai.backend.util.logging import InvokeAILogger from invokeai.frontend.install.model_install import addModelsForm, process_and_execute + +# TO DO - Move all the frontend code into invokeai.frontend.install from invokeai.frontend.install.widgets import ( SingleSelectColumns, CenteredButtonPress, @@ -654,7 +656,7 @@ def migrate_init_file(legacy_format: Path): old = legacy_parser.parse_args([f"@{str(legacy_format)}"]) new = InvokeAIAppConfig.get_config() - fields = list(get_type_hints(InvokeAIAppConfig).keys()) + fields = [x for x, y in InvokeAIAppConfig.__fields__.items() if y.field_info.extra.get("category") != "DEPRECATED"] for attr in fields: if hasattr(old, attr): setattr(new, attr, getattr(old, attr))