diff options
author | Trung Ngo <codem01@gmail.com> | 2022-10-08 10:33:21 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-08 10:40:39 +0000 |
commit | 00117a07efbbe8482add12262a179326541467de (patch) | |
tree | 6a92d8bbbaa9b8a7e12eaf5cbb342b24917aac57 /modules | |
parent | 786d9f63aaa4515df82eb2cf357ea92f3dae1e29 (diff) | |
download | stable-diffusion-webui-gfx803-00117a07efbbe8482add12262a179326541467de.tar.gz stable-diffusion-webui-gfx803-00117a07efbbe8482add12262a179326541467de.tar.bz2 stable-diffusion-webui-gfx803-00117a07efbbe8482add12262a179326541467de.zip |
check specifically for skipped
Diffstat (limited to 'modules')
-rw-r--r-- | modules/img2img.py | 2 | ||||
-rw-r--r-- | modules/processing.py | 3 | ||||
-rw-r--r-- | modules/sd_samplers.py | 4 | ||||
-rw-r--r-- | modules/shared.py | 1 |
4 files changed, 3 insertions, 7 deletions
diff --git a/modules/img2img.py b/modules/img2img.py index e60b7e0f..24126774 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -34,8 +34,6 @@ def process_batch(p, input_dir, output_dir, args): state.job = f"{i+1} out of {len(images)}"
if state.skipped:
state.skipped = False
- state.interrupted = False
- continue
if state.interrupted:
break
diff --git a/modules/processing.py b/modules/processing.py index 6805039c..3657fe69 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -357,7 +357,6 @@ def process_images(p: StableDiffusionProcessing) -> Processed: for n in range(p.n_iter):
if state.skipped:
state.skipped = False
- state.interrupted = False
if state.interrupted:
break
@@ -385,7 +384,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed: with devices.autocast():
samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength)
- if state.interrupted:
+ if state.interrupted or state.skipped:
# if we are interruped, sample returns just noise
# use the image collected previously in sampler loop
diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index df17e93c..13a8b322 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -106,7 +106,7 @@ def extended_tdqm(sequence, *args, desc=None, **kwargs): seq = sequence if cmd_opts.disable_console_progressbars else tqdm.tqdm(sequence, *args, desc=state.job, file=shared.progress_print_out, **kwargs)
for x in seq:
- if state.interrupted:
+ if state.interrupted or state.skipped:
break
yield x
@@ -254,7 +254,7 @@ def extended_trange(sampler, count, *args, **kwargs): seq = range(count) if cmd_opts.disable_console_progressbars else tqdm.trange(count, *args, desc=state.job, file=shared.progress_print_out, **kwargs)
for x in seq:
- if state.interrupted:
+ if state.interrupted or state.skipped:
break
if sampler.stop_at is not None and x > sampler.stop_at:
diff --git a/modules/shared.py b/modules/shared.py index 7f802bd9..ca462628 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -99,7 +99,6 @@ class State: def skip(self):
self.skipped = True
- self.interrupted = True
def interrupt(self):
self.interrupted = True
|