diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-30 06:12:43 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-30 06:12:43 +0000 |
commit | cbd6329488beafe036ea3a3d0cea1a6940105cf9 (patch) | |
tree | d1f714af9c1705b0b0758125e13a3b691ca1fcaf /launch.py | |
parent | c81b52ffbd6252842b3473a7aa8eb7ffc88ee7d1 (diff) | |
download | stable-diffusion-webui-gfx803-cbd6329488beafe036ea3a3d0cea1a6940105cf9.tar.gz stable-diffusion-webui-gfx803-cbd6329488beafe036ea3a3d0cea1a6940105cf9.tar.bz2 stable-diffusion-webui-gfx803-cbd6329488beafe036ea3a3d0cea1a6940105cf9.zip |
add an environment variable for selecting xformers package
Diffstat (limited to 'launch.py')
-rw-r--r-- | launch.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -223,6 +223,7 @@ def prepare_environment(): requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")
commandline_args = os.environ.get('COMMANDLINE_ARGS', "")
+ xformers_package = os.environ.get('XFORMERS_PACKAGE', 'xformers==0.0.16rc425')
gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379")
clip_package = os.environ.get('CLIP_PACKAGE', "git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1")
openclip_package = os.environ.get('OPENCLIP_PACKAGE', "git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b")
@@ -282,7 +283,7 @@ def prepare_environment(): if (not is_installed("xformers") or reinstall_xformers) and xformers:
if platform.system() == "Windows":
if platform.python_version().startswith("3.10"):
- run_pip(f"install -U -I --no-deps xformers==0.0.16rc425", "xformers")
+ run_pip(f"install -U -I --no-deps {xformers_package}", "xformers")
else:
print("Installation of xformers is not supported in this version of Python.")
print("You can also check this and build manually: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers#building-xformers-on-windows-by-duckness")
|