aboutsummaryrefslogtreecommitdiff
path: root/modules/images.py
diff options
context:
space:
mode:
authorMilly <milly.ca@gmail.com>2022-10-05 02:17:15 +0900
committerAUTOMATIC1111 <16777216c@gmail.com>2022-10-06 20:41:23 +0300
commit1cc36d170ac15e7f04208df32db27af1b10c867c (patch)
treef4bf661655e9b1554ac4e7a632640cb343211a4b /modules/images.py
parent070b7d60cf5dac6387b3bfc8f3b3977b620e4fd5 (diff)
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.py2
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: