Skip to content

Commit 650f4bb

Browse files
authored
quote output, embedding and autoscan directores in invokeai.init (#2827)
This should prevent the errors that users are seeing with spaces in the file paths
2 parents 8f1b301 + 7b92b27 commit 650f4bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ldm/invoke/config/invokeai_configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,8 @@ def write_opts(opts: Namespace, init_file: Path):
712712
out_file.write(line + "\n")
713713
out_file.write(
714714
f"""
715-
--outdir={opts.outdir}
716-
--embedding_path={opts.embedding_path}
715+
--outdir="{opts.outdir}"
716+
--embedding_path="{opts.embedding_path}"
717717
--precision={opts.precision}
718718
--max_loaded_models={int(opts.max_loaded_models)}
719719
--{'no-' if not opts.safety_checker else ''}nsfw_checker

ldm/invoke/config/model_install_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def install_requested_models(
126126
while line := input.readline():
127127
if not line.startswith(argument):
128128
output.writelines([line])
129-
output.writelines([f'{argument} {directory}'])
129+
output.writelines([f'{argument} "{directory}"'])
130130
os.replace(replacement,initfile)
131131

132132
# -------------------------------------

0 commit comments

Comments
 (0)