diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-08 13:29:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 13:29:59 +0000 |
commit | 48feae37ff36915df9a3502a0a5aa1b7f146ab14 (patch) | |
tree | 698e1ad35b2ee6d528ece2f9cdadc96aa22d3e54 /launch.py | |
parent | 5f85a74b00c0154bfd559dc67edfa7e30342b7c9 (diff) | |
parent | 970de9ee6891ff586821d0d80dde01c2f6c681b3 (diff) | |
download | stable-diffusion-webui-gfx803-48feae37ff36915df9a3502a0a5aa1b7f146ab14.tar.gz stable-diffusion-webui-gfx803-48feae37ff36915df9a3502a0a5aa1b7f146ab14.tar.bz2 stable-diffusion-webui-gfx803-48feae37ff36915df9a3502a0a5aa1b7f146ab14.zip |
Merge pull request #1851 from C43H66N12O12S2/flash
xformers attention
Diffstat (limited to 'launch.py')
-rw-r--r-- | launch.py | 8 |
1 files changed, 8 insertions, 0 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,6 +126,12 @@ if not is_installed("gfpgan"): if not is_installed("clip"):
run_pip(f"install {clip_package}", "clip")
+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 platform.system() == "Linux":
+ run_pip("install xformers", "xformers")
+
os.makedirs(dir_repos, exist_ok=True)
git_clone("https://github.com/CompVis/stable-diffusion.git", repo_dir('stable-diffusion'), "Stable Diffusion", stable_diffusion_commit_hash)
|