aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-06-03 06:01:05 +0000
committerGitHub <noreply@github.com>2023-06-03 06:01:05 +0000
commit58779b289ed785f4d140e4af7d2408068247bfba (patch)
tree260b1ca658e7d37ec7c83c86d525b549a50b2675 /modules
parent3e995778fc525ff15d56c1472c1a1bc701019ec5 (diff)
parentdf5a3cbefe46dbd6b5eb5b6a62e66d5b7378d4ee (diff)
downloadstable-diffusion-webui-gfx803-58779b289ed785f4d140e4af7d2408068247bfba.tar.gz
stable-diffusion-webui-gfx803-58779b289ed785f4d140e4af7d2408068247bfba.tar.bz2
stable-diffusion-webui-gfx803-58779b289ed785f4d140e4af7d2408068247bfba.zip
Merge pull request #10957 from AUTOMATIC1111/fallback_version_info
fallback version info form CHANGELOG.md
Diffstat (limited to 'modules')
-rw-r--r--modules/launch_utils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py
index 6e9bb770..0c8c4db0 100644
--- a/modules/launch_utils.py
+++ b/modules/launch_utils.py
@@ -68,7 +68,13 @@ def git_tag():
try:
return subprocess.check_output([git, "describe", "--tags"], shell=False, encoding='utf8').strip()
except Exception:
- return "<none>"
+ try:
+ from pathlib import Path
+ changelog_md = Path(__file__).parent.parent / "CHANGELOG.md"
+ with changelog_md.open(encoding="utf-8") as file:
+ return next((line.strip() for line in file if line.strip()), "<none>")
+ except Exception:
+ return "<none>"
def run(command, desc=None, errdesc=None, custom_env=None, live: bool = default_command_live) -> str: