diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-13 05:16:37 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-13 05:16:37 +0000 |
commit | b08500cec8a791ef20082628b49b17df833f5dda (patch) | |
tree | 2d09f3ca93139f082b88463f3a2a43a4ac45526f /launch.py | |
parent | 5ab7f213bec2f816f9c5644becb32eb72c8ffb89 (diff) | |
parent | 231562ea13e4f697953bdbabd6b76b22a88c587b (diff) | |
download | stable-diffusion-webui-gfx803-b08500cec8a791ef20082628b49b17df833f5dda.tar.gz stable-diffusion-webui-gfx803-b08500cec8a791ef20082628b49b17df833f5dda.tar.bz2 stable-diffusion-webui-gfx803-b08500cec8a791ef20082628b49b17df833f5dda.zip |
Merge branch 'release_candidate'
Diffstat (limited to 'launch.py')
-rw-r--r-- | launch.py | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -19,6 +19,7 @@ python = sys.executable git = os.environ.get('GIT', "git")
index_url = os.environ.get('INDEX_URL', "")
stored_commit_hash = None
+stored_git_tag = None
dir_repos = "repositories"
if 'GRADIO_ANALYTICS_ENABLED' not in os.environ:
@@ -70,6 +71,20 @@ def commit_hash(): return stored_commit_hash
+def git_tag():
+ global stored_git_tag
+
+ if stored_git_tag is not None:
+ return stored_git_tag
+
+ try:
+ stored_git_tag = run(f"{git} describe --tags").strip()
+ except Exception:
+ stored_git_tag = "<none>"
+
+ return stored_git_tag
+
+
def run(command, desc=None, errdesc=None, custom_env=None, live=False):
if desc is not None:
print(desc)
@@ -222,7 +237,7 @@ def run_extensions_installers(settings_file): def prepare_environment():
- torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==2.0.0 torchvision==0.15.1 --extra-index-url https://download.pytorch.org/whl/cu118")
+ torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118")
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")
xformers_package = os.environ.get('XFORMERS_PACKAGE', 'xformers==0.0.17')
@@ -246,8 +261,10 @@ def prepare_environment(): check_python_version()
commit = commit_hash()
+ tag = git_tag()
print(f"Python {sys.version}")
+ print(f"Version: {tag}")
print(f"Commit hash: {commit}")
if args.reinstall_torch or not is_installed("torch") or not is_installed("torchvision"):
|