mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
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:
parent
33f832e6ab
commit
e3a19d4f3e
@ -712,8 +712,8 @@ def write_opts(opts: Namespace, init_file: Path):
|
|||||||
out_file.write(line + "\n")
|
out_file.write(line + "\n")
|
||||||
out_file.write(
|
out_file.write(
|
||||||
f"""
|
f"""
|
||||||
--outdir={opts.outdir}
|
--outdir="{opts.outdir}"
|
||||||
--embedding_path={opts.embedding_path}
|
--embedding_path="{opts.embedding_path}"
|
||||||
--precision={opts.precision}
|
--precision={opts.precision}
|
||||||
--max_loaded_models={int(opts.max_loaded_models)}
|
--max_loaded_models={int(opts.max_loaded_models)}
|
||||||
--{'no-' if not opts.safety_checker else ''}nsfw_checker
|
--{'no-' if not opts.safety_checker else ''}nsfw_checker
|
||||||
|
@ -126,7 +126,7 @@ def install_requested_models(
|
|||||||
while line := input.readline():
|
while line := input.readline():
|
||||||
if not line.startswith(argument):
|
if not line.startswith(argument):
|
||||||
output.writelines([line])
|
output.writelines([line])
|
||||||
output.writelines([f'{argument} {directory}'])
|
output.writelines([f'{argument} "{directory}"'])
|
||||||
os.replace(replacement,initfile)
|
os.replace(replacement,initfile)
|
||||||
|
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user