aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-03-12 12:11:51 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-03-12 12:11:51 +0300
commit3c922d983bf60ba187b5422b3690e6b7fb07777e (patch)
tree77095930458eb9f0640b61fc37ec0d89f74c37c4
parent5c9f2bbb7473c7085dc961bbf81d5248a4859e90 (diff)
fix #8492 breaking the program when the directory with code contains spaces.
-rw-r--r--launch.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/launch.py b/launch.py
index 4873da60..b943fed2 100644
--- a/launch.py
+++ b/launch.py
@@ -319,9 +319,11 @@ def prepare_environment():
git_clone(blip_repo, repo_dir('BLIP'), "BLIP", blip_commit_hash)
if not is_installed("lpips"):
- run_pip(f"install -r {os.path.join(repo_dir('CodeFormer'), 'requirements.txt')}", "requirements for CodeFormer")
+ run_pip(f"install -r \"{os.path.join(repo_dir('CodeFormer'), 'requirements.txt')}\"", "requirements for CodeFormer")
- run_pip(f"install -r {os.path.join(script_path, requirements_file)}", "requirements for Web UI")
+ if not os.path.isfile(requirements_file):
+ requirements_file = os.path.join(script_path, requirements_file)
+ run_pip(f"install -r \"{requirements_file}\"", "requirements for Web UI")
run_extensions_installers(settings_file=args.ui_settings_file)