aboutsummaryrefslogtreecommitdiff
path: root/launch.py
diff options
context:
space:
mode:
authorSakura-Luna <53183413+Sakura-Luna@users.noreply.github.com>2023-05-18 17:29:47 +0800
committerGitHub <noreply@github.com>2023-05-18 17:29:47 +0800
commit96cba45d71cf25ab2f3bb7d7085347c8b6ef6d7d (patch)
tree030d9c920182de78d010fcef47c5a4de23fdddb7 /launch.py
parent9a9557ecfc824c4a005dc79466dba8f5884dbfb1 (diff)
Modify xformers instead of pytorch
Diffstat (limited to 'launch.py')
-rw-r--r--launch.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/launch.py b/launch.py
index 034de0a9..de8bde24 100644
--- a/launch.py
+++ b/launch.py
@@ -237,7 +237,8 @@ def run_extensions_installers(settings_file):
def prepare_environment():
- torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118")
+ torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu118")
+ torch_command = os.environ.get('TORCH_COMMAND', f"pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url {torch_index_url}")
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")
xformers_package = os.environ.get('XFORMERS_PACKAGE', 'xformers==0.0.17')
@@ -292,7 +293,7 @@ def prepare_environment():
if not is_installed("xformers"):
exit(0)
elif platform.system() == "Linux":
- run_pip(f"install {xformers_package}", "xformers")
+ run_pip(f"install -U -I --no-deps {xformers_package}", "xformers")
if not is_installed("pyngrok") and args.ngrok:
run_pip("install pyngrok", "ngrok")