From d6e8d85e30443510b83ad3dc0e8b28e366391e1e Mon Sep 17 00:00:00 2001 From: benbot Date: Wed, 21 Sep 2022 08:03:15 -0400 Subject: removed TORCH_COMMAND section from webui.sh and added correct torchvision version to default torch install command --- launch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'launch.py') diff --git a/launch.py b/launch.py index b34dc714..a11223b1 100644 --- a/launch.py +++ b/launch.py @@ -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'") -- cgit v1.2.3