Skip to content

Commit ecc5c66

Browse files
[SD] Save output images to different loc every day (huggingface#1027)
Signed-off-by: Gaurav Shukla <[email protected]>
1 parent d973ba1 commit ecc5c66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/stable_diffusion/src/utils/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ def clear_all():
538538
# save output images and the inputs corresponding to it.
539539
def save_output_img(output_img, img_seed):
540540
output_path = args.output_dir if args.output_dir else Path.cwd()
541-
generated_imgs_path = Path(output_path, "generated_imgs")
541+
generated_imgs_path = Path(
542+
output_path, "generated_imgs", dt.now().strftime("%Y%m%d")
543+
)
542544
generated_imgs_path.mkdir(parents=True, exist_ok=True)
543545
csv_path = Path(generated_imgs_path, "imgs_details.csv")
544546

0 commit comments

Comments
 (0)