From d63ce76dd88a8d487338a7826744857be9f01045 Mon Sep 17 00:00:00 2001 From: Ean Garvey <87458719+monorimet@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:30:47 -0500 Subject: [PATCH] Use sortable image filenames for SD outputs. (#1528) --- apps/stable_diffusion/src/utils/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/stable_diffusion/src/utils/utils.py b/apps/stable_diffusion/src/utils/utils.py index 37145ef12b..816f024d3a 100644 --- a/apps/stable_diffusion/src/utils/utils.py +++ b/apps/stable_diffusion/src/utils/utils.py @@ -755,9 +755,7 @@ def save_output_img(output_img, img_seed, extra_info={}): csv_path = Path(generated_imgs_path, "imgs_details.csv") prompt_slice = re.sub("[^a-zA-Z0-9]", "_", args.prompts[0][:15]) - out_img_name = ( - f"{prompt_slice}_{img_seed}_{dt.now().strftime('%y%m%d_%H%M%S')}" - ) + out_img_name = f"{dt.now().strftime('%H%M%S')}_{prompt_slice}_{img_seed}" img_model = args.hf_model_id if args.ckpt_loc: