From a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Tue, 6 Sep 2022 02:09:01 +0300 Subject: added progressbar added an option to disable progressbar added interrupt support to DDIM/PLMS --- modules/processing.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/processing.py') diff --git a/modules/processing.py b/modules/processing.py index c0c1adb7..1351579b 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -153,6 +153,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed: with torch.no_grad(), precision_scope("cuda"), ema_scope(): p.init() + state.job_count = p.n_iter + for n in range(p.n_iter): if state.interrupted: break @@ -207,6 +209,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed: output_images.append(image) + state.nextjob() + unwanted_grid_because_of_img_count = len(output_images) < 2 and opts.grid_only_if_multiple if not p.do_not_save_grid and not unwanted_grid_because_of_img_count: return_grid = opts.return_grid -- cgit v1.2.3