From b39f06cea7082183c0091119635239f10b3fe180 Mon Sep 17 00:00:00 2001 From: tateisu Date: Mon, 26 Sep 2022 11:50:11 +0900 Subject: [PATCH] add [datetime] to image file name pattern --- modules/images.py | 1 + 1 file changed, 1 insertion(+) 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: