aboutsummaryrefslogtreecommitdiff
path: root/modules/processing.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-06 02:09:01 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-09-06 02:09:01 +0300
commita243bc7859b7ab92a28d28c11b0ed5525fa0d6ba (patch)
tree8da54414ef8918317a6b7eab14f6ada3bed47d0e /modules/processing.py
parentb6763fb8847df5a5678f37137e7a702569e5c925 (diff)
added progressbar
added an option to disable progressbar added interrupt support to DDIM/PLMS
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