aboutsummaryrefslogtreecommitdiff
path: root/launch.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-04-29 12:36:50 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-04-29 12:36:50 +0300
commitee71eee1818f6f6eba9895c93ba25e0cad27e069 (patch)
treebeb15cdd03de3ae2230aa6de058141d80f13d92f /launch.py
parent9eb49b04e36914b1bfbd5d30ff8587f99d588281 (diff)
stuff related to torch version change
Diffstat (limited to 'launch.py')
-rw-r--r--launch.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/launch.py b/launch.py
index 4256ef25..af1c8309 100644
--- a/launch.py
+++ b/launch.py
@@ -121,12 +121,12 @@ def run_python(code, desc=None, errdesc=None):
return run(f'"{python}" -c "{code}"', desc, errdesc)
-def run_pip(args, desc=None):
+def run_pip(args, desc=None, live=False):
if skip_install:
return
index_url_line = f' --index-url {index_url}' if index_url != '' else ''
- return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
+ return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
def check_run_python(code):
@@ -225,7 +225,7 @@ def run_extensions_installers(settings_file):
def prepare_environment():
global skip_install
- torch_command = os.environ.get('TORCH_COMMAND', "pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118")
+ torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==2.0.0 torchvision==0.15.1 --index-url https://download.pytorch.org/whl/cu118")
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")
xformers_package = os.environ.get('XFORMERS_PACKAGE', 'xformers==0.0.17')
@@ -271,7 +271,7 @@ def prepare_environment():
if (not is_installed("xformers") or args.reinstall_xformers) and args.xformers:
if platform.system() == "Windows":
if platform.python_version().startswith("3.10"):
- run_pip(f"install -U -I --no-deps {xformers_package}", "xformers")
+ run_pip(f"install -U -I --no-deps {xformers_package}", "xformers", live=True)
else:
print("Installation of xformers is not supported in this version of Python.")
print("You can also check this and build manually: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers#building-xformers-on-windows-by-duckness")