diff options
author | Milly <milly.ca@gmail.com> | 2022-10-04 17:17:15 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-06 17:41:23 +0000 |
commit | 1cc36d170ac15e7f04208df32db27af1b10c867c (patch) | |
tree | f4bf661655e9b1554ac4e7a632640cb343211a4b /modules/images.py | |
parent | 070b7d60cf5dac6387b3bfc8f3b3977b620e4fd5 (diff) | |
download | stable-diffusion-webui-gfx803-1cc36d170ac15e7f04208df32db27af1b10c867c.tar.gz stable-diffusion-webui-gfx803-1cc36d170ac15e7f04208df32db27af1b10c867c.tar.bz2 stable-diffusion-webui-gfx803-1cc36d170ac15e7f04208df32db27af1b10c867c.zip |
Added job_timestamp to Processed
So `[job_timestamp]` pattern can use in saving image UI.
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/images.py b/modules/images.py index fa0714fd..669d76af 100644 --- a/modules/images.py +++ b/modules/images.py @@ -298,7 +298,7 @@ def apply_filename_pattern(x, p, seed, prompt): x = x.replace("[model_hash]", shared.sd_model.sd_model_hash)
x = x.replace("[date]", datetime.date.today().isoformat())
x = x.replace("[datetime]", datetime.datetime.now().strftime("%Y%m%d%H%M%S"))
- x = x.replace("[job_timestamp]", shared.state.job_timestamp)
+ x = x.replace("[job_timestamp]", getattr(p, "job_timestamp", shared.state.job_timestamp))
# Apply [prompt] at last. Because it may contain any replacement word.^M
if prompt is not None:
|