AlUlkesh / sd_save_intermediate_images

Save intermediate images during the sampling process
The Unlicense
110 stars 17 forks source link

Only last set of images kept when Batch count > 1 #16

Closed Zetsubold closed 1 year ago

Zetsubold commented 1 year ago

When I want to save the intermediates of a group of images created using Batch size = 1 and Batch count > 1, only one set of files are created, and each successive image in the batch overwrites the intermediates of the previous one.

Here's a sample batch: sd_sample_1

and the resulting intermediates: (there was only this folder generated) sd_sample_2

finally, the debug text:

2023-01-19 01:08:54,795 DEBUG ssii_intermediate_type, ssii_every_n, ssii_stop_at_n, ssii_video, ssii_video_format, ssii_video_fps, ssii_video_hires, ssii_smooth, ssii_seconds, ssii_debug:
2023-01-19 01:08:54,795 DEBUG Denoised, 1.0, 0.0, False, mp4, 2.0, 2, False, 0.0, True
2023-01-19 01:08:54,798 DEBUG Step: 0
2023-01-19 01:08:54,800 DEBUG hr: False
2023-01-19 01:08:54,807 DEBUG ssii_intermediate_type, ssii_every_n, ssii_stop_at_n: Denoised, 1.0, 0.0
2023-01-19 01:08:54,807 DEBUG Step: 0
2023-01-19 01:08:54,810 DEBUG p.intermed_outpath: outputs/txt2img-images\intermediates\01116
2023-01-19 01:08:54,810 DEBUG p.intermed_outpath_suffix:
2023-01-19 01:08:54,811 DEBUG p.steps: 8
2023-01-19 01:08:54,811 DEBUG p.all_seeds: [2518042455, 2518042456]
2023-01-19 01:08:54,811 DEBUG p.cfg_scale: 7
2023-01-19 01:08:54,812 DEBUG p.sampler_name: Euler a
2023-01-19 01:08:54,812 DEBUG p.batch_size: 1

2023-01-19 01:09:00,046 DEBUG filename: 01116-001-2518042455
2023-01-19 01:09:05,352 DEBUG filename: 01116-002-2518042455
2023-01-19 01:09:10,599 DEBUG filename: 01116-003-2518042455
2023-01-19 01:09:15,858 DEBUG filename: 01116-004-2518042455
2023-01-19 01:09:21,119 DEBUG filename: 01116-005-2518042455
2023-01-19 01:09:26,362 DEBUG filename: 01116-006-2518042455
2023-01-19 01:09:31,607 DEBUG filename: 01116-007-2518042455
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [01:01<00:00,  7.63s/it]
2023-01-19 01:09:51,167 DEBUG filename: 01116-001-2518042455
2023-01-19 01:09:56,433 DEBUG filename: 01116-002-2518042455
2023-01-19 01:10:01,754 DEBUG filename: 01116-003-2518042455
2023-01-19 01:10:07,020 DEBUG filename: 01116-004-2518042455
2023-01-19 01:10:12,258 DEBUG filename: 01116-005-2518042455
2023-01-19 01:10:17,487 DEBUG filename: 01116-006-2518042455
2023-01-19 01:10:22,749 DEBUG filename: 01116-007-2518042455
100%|████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:42<00:00,  5.26s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 16/16 [01:29<00:00,  5.58s/it]
AlUlkesh commented 1 year ago

Thanks, should work with the latest commit. Can you try it?

Zetsubold commented 1 year ago

yeah it works now, both directories got created properly. Thanks!