quote output, embedding and autoscan directores in invokeai.init

- this should prevent the errors that users are seeing with
  spaces in the file pathsa

quot
This commit is contained in:
Lincoln Stein 2023-02-26 23:02:18 -05:00
parent 33f832e6ab
commit e3a19d4f3e
2 changed files with 3 additions and 3 deletions

View File

@ -712,8 +712,8 @@ def write_opts(opts: Namespace, init_file: Path):
out_file.write(line + "\n")
out_file.write(
f"""
--outdir={opts.outdir}
--embedding_path={opts.embedding_path}
--outdir="{opts.outdir}"
--embedding_path="{opts.embedding_path}"
--precision={opts.precision}
--max_loaded_models={int(opts.max_loaded_models)}
--{'no-' if not opts.safety_checker else ''}nsfw_checker

View File

@ -126,7 +126,7 @@ def install_requested_models(
while line := input.readline():
if not line.startswith(argument):
output.writelines([line])
output.writelines([f'{argument} {directory}'])
output.writelines([f'{argument} "{directory}"'])
os.replace(replacement,initfile)
# -------------------------------------