diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-05 23:09:01 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-05 23:09:01 +0000 |
commit | a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba (patch) | |
tree | 8da54414ef8918317a6b7eab14f6ada3bed47d0e /modules/processing.py | |
parent | b6763fb8847df5a5678f37137e7a702569e5c925 (diff) | |
download | stable-diffusion-webui-gfx803-a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba.tar.gz stable-diffusion-webui-gfx803-a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba.tar.bz2 stable-diffusion-webui-gfx803-a243bc7859b7ab92a28d28c11b0ed5525fa0d6ba.zip |
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.py | 4 |
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
|