diff options
author | tateisu <tateisu@gmail.com> | 2022-09-26 02:50:11 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-26 13:24:21 +0000 |
commit | b39f06cea7082183c0091119635239f10b3fe180 (patch) | |
tree | 7222d0a4064fb1c79bd7e16873a135b0d4f138a5 /modules/images.py | |
parent | e61da308bace62442833e1d97c897f56d824b68b (diff) | |
download | stable-diffusion-webui-gfx803-b39f06cea7082183c0091119635239f10b3fe180.tar.gz stable-diffusion-webui-gfx803-b39f06cea7082183c0091119635239f10b3fe180.tar.bz2 stable-diffusion-webui-gfx803-b39f06cea7082183c0091119635239f10b3fe180.zip |
add [datetime] to image file name pattern
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/images.py b/modules/images.py index ae0e6304..76278339 100644 --- a/modules/images.py +++ b/modules/images.py @@ -295,6 +295,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]", re.sub(r'(\.\d+|\D+)', "", datetime.datetime.now().isoformat()))
x = x.replace("[job_timestamp]", shared.state.job_timestamp)
if cmd_opts.hide_ui_dir_config:
|