mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2024-12-14 22:53:25 +03:00
check for OS and env variable
This commit is contained in:
parent
3f166be1b6
commit
d0e85873ac
@ -4,6 +4,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import importlib.util
|
import importlib.util
|
||||||
import shlex
|
import shlex
|
||||||
|
import platform
|
||||||
|
|
||||||
dir_repos = "repositories"
|
dir_repos = "repositories"
|
||||||
dir_tmp = "tmp"
|
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, skip_torch_cuda_test = extract_arg(args, '--skip-torch-cuda-test')
|
||||||
|
args, xformers = extract_arg(args, '--xformers')
|
||||||
|
|
||||||
|
|
||||||
def repo_dir(name):
|
def repo_dir(name):
|
||||||
@ -124,8 +126,11 @@ if not is_installed("gfpgan"):
|
|||||||
if not is_installed("clip"):
|
if not is_installed("clip"):
|
||||||
run_pip(f"install {clip_package}", "clip")
|
run_pip(f"install {clip_package}", "clip")
|
||||||
|
|
||||||
if not is_installed("xformers"):
|
if not is_installed("xformers") and 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 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)
|
os.makedirs(dir_repos, exist_ok=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user