From eb607498bf326f878a179cc4af6e8bdc8d6b853b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 20 Mar 2024 09:24:56 +1100 Subject: [PATCH] fix(config): create parent dir when writing config file --- invokeai/app/services/config/config_default.py | 1 + 1 file changed, 1 insertion(+) diff --git a/invokeai/app/services/config/config_default.py b/invokeai/app/services/config/config_default.py index 9bca00615c..9329122cee 100644 --- a/invokeai/app/services/config/config_default.py +++ b/invokeai/app/services/config/config_default.py @@ -230,6 +230,7 @@ class InvokeAIAppConfig(BaseSettings): Args: dest_path: Path to write the config to. """ + dest_path.parent.mkdir(parents=True, exist_ok=True) with open(dest_path, "w") as file: # Meta fields should be written in a separate stanza - skip legacy_models_yaml_path meta_dict = self.model_dump(mode="json", include={"schema_version"})