Skip to content

Commit eb60749

Browse files
fix(config): create parent dir when writing config file
1 parent bdb52cf commit eb60749

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

invokeai/app/services/config/config_default.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def write_file(self, dest_path: Path, as_example: bool = False) -> None:
230230
Args:
231231
dest_path: Path to write the config to.
232232
"""
233+
dest_path.parent.mkdir(parents=True, exist_ok=True)
233234
with open(dest_path, "w") as file:
234235
# Meta fields should be written in a separate stanza - skip legacy_models_yaml_path
235236
meta_dict = self.model_dump(mode="json", include={"schema_version"})

0 commit comments

Comments
 (0)