diff options
author | C43H66N12O12S2 <36072735+C43H66N12O12S2@users.noreply.github.com> | 2022-10-08 13:13:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 13:13:26 +0000 |
commit | d0e85873ac72416d32dee8720dc9e93ab3d3e236 (patch) | |
tree | d232a2612b1712afd56954edbfeadf1e37fc6e9e /launch.py | |
parent | 3f166be1b60ff2ab33a6d2646809ec3f48796303 (diff) | |
download | stable-diffusion-webui-gfx803-d0e85873ac72416d32dee8720dc9e93ab3d3e236.tar.gz stable-diffusion-webui-gfx803-d0e85873ac72416d32dee8720dc9e93ab3d3e236.tar.bz2 stable-diffusion-webui-gfx803-d0e85873ac72416d32dee8720dc9e93ab3d3e236.zip |
check for OS and env variable
Diffstat (limited to 'launch.py')
-rw-r--r-- | launch.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,6 +4,7 @@ import os import sys
import importlib.util
import shlex
+import platform
dir_repos = "repositories"
dir_tmp = "tmp"
@@ -31,6 +32,7 @@ def extract_arg(args, name): args, skip_torch_cuda_test = extract_arg(args, '--skip-torch-cuda-test')
+args, xformers = extract_arg(args, '--xformers')
def repo_dir(name):
@@ -124,8 +126,11 @@ if not is_installed("gfpgan"): if not is_installed("clip"):
run_pip(f"install {clip_package}", "clip")
-if not is_installed("xformers"):
- run_pip("install https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/a/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl", "xformers")
+if not is_installed("xformers") and xformers:
+ if platform.system() == "Windows":
+ run_pip("install https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/a/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl", "xformers")
+ elif:
+ run_pip("install xformers", "xformers")
os.makedirs(dir_repos, exist_ok=True)
|