mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
add pause button
This commit is contained in:
@@ -64,6 +64,13 @@ class VanillaStableDiffusionSampler:
|
||||
def before_sample(self, x, ts, cond, unconditional_conditioning):
|
||||
if state.interrupted or state.skipped:
|
||||
raise sd_samplers_common.InterruptedException
|
||||
if state.paused:
|
||||
shared.log.debug('Sampling paused')
|
||||
while state.paused:
|
||||
if state.interrupted or state.skipped:
|
||||
raise sd_samplers_common.InterruptedException
|
||||
import time
|
||||
time.sleep(0.1)
|
||||
|
||||
if self.stop_at is not None and self.step > self.stop_at:
|
||||
raise sd_samplers_common.InterruptedException
|
||||
|
||||
Reference in New Issue
Block a user