check specifically for skipped
This commit is contained in:
parent
786d9f63aa
commit
00117a07ef
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -99,7 +99,6 @@ class State:
|
|||
|
||||
def skip(self):
|
||||
self.skipped = True
|
||||
self.interrupted = True
|
||||
|
||||
def interrupt(self):
|
||||
self.interrupted = True
|
||||
|
|
Loading…
Reference in New Issue
Block a user