diff options
author | benbot <bbotwin@atlassian.com> | 2022-09-21 12:03:15 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-21 13:04:13 +0000 |
commit | d6e8d85e30443510b83ad3dc0e8b28e366391e1e (patch) | |
tree | 2b3a1304c1dc2a40fa91c5a696b4a3cd2d1c898d | |
parent | 06186582adc04cb24c9f250a71933e7fb782b1f8 (diff) | |
download | stable-diffusion-webui-gfx803-d6e8d85e30443510b83ad3dc0e8b28e366391e1e.tar.gz stable-diffusion-webui-gfx803-d6e8d85e30443510b83ad3dc0e8b28e366391e1e.tar.bz2 stable-diffusion-webui-gfx803-d6e8d85e30443510b83ad3dc0e8b28e366391e1e.zip |
removed TORCH_COMMAND section from webui.sh and
added correct torchvision version to default torch install command
-rw-r--r-- | launch.py | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | webui.sh | 6 |
2 files changed, 4 insertions, 9 deletions
@@ -11,7 +11,7 @@ dir_tmp = "tmp" python = sys.executable
git = os.environ.get('GIT', "git")
-torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113")
+torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113")
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")
commandline_args = os.environ.get('COMMANDLINE_ARGS', "")
@@ -102,8 +102,9 @@ except Exception: print(f"Python {sys.version}")
print(f"Commit hash: {commit}")
-if not is_installed("torch"):
- run(f'"{python}" -m {torch_command}', "Installing torch", "Couldn't install torch")
+
+if not is_installed("torch") or not is_installed("torchvision"):
+ run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
if not skip_torch_cuda_test:
run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDINE_ARGS variable to disable this check'")
@@ -41,12 +41,6 @@ then venv_dir="venv" fi -# install command for torch -if [[ -z "${TORCH_COMMAND}" ]] -then - export TORCH_COMMAND="pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113" -fi - # Do not reinstall existing pip packages on Debian/Ubuntu export PIP_IGNORE_INSTALLED=0 |