aboutsummaryrefslogtreecommitdiff
path: root/modules/processing.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py4
1 files changed, 4 insertions, 0 deletions
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