diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-08 12:23:49 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-08 12:23:49 +0000 |
commit | ab4ab4e595e89d1a9a39db70539d5944fdbe47fa (patch) | |
tree | 8b599241b3954d30f5d2d7ff8aea201620fda797 /modules/processing.py | |
parent | 505a10ad928eb11849828c88850ce3e5e3566fe4 (diff) | |
download | stable-diffusion-webui-gfx803-ab4ab4e595e89d1a9a39db70539d5944fdbe47fa.tar.gz stable-diffusion-webui-gfx803-ab4ab4e595e89d1a9a39db70539d5944fdbe47fa.tar.bz2 stable-diffusion-webui-gfx803-ab4ab4e595e89d1a9a39db70539d5944fdbe47fa.zip |
add version to infotext, footer and console output when starting
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/processing.py b/modules/processing.py index e8808beb..e786791a 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -458,6 +458,16 @@ def fix_seed(p): p.subseed = get_fixed_seed(p.subseed)
+def program_version():
+ import launch
+
+ res = launch.git_tag()
+ if res == "<none>":
+ res = None
+
+ return res
+
+
def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iteration=0, position_in_batch=0):
index = position_in_batch + iteration * p.batch_size
@@ -483,6 +493,7 @@ def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments=None, iter "Init image hash": getattr(p, 'init_img_hash', None),
"RNG": opts.randn_source if opts.randn_source != "GPU" else None,
"NGMS": None if p.s_min_uncond == 0 else p.s_min_uncond,
+ "Version": program_version() if opts.add_version_to_infotext else None,
}
generation_params.update(p.extra_generation_params)
|