update live preview

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-12-30 09:21:02 -05:00
parent 85cc55af51
commit 02f833b2db
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -123,7 +123,7 @@ class State:
self.skipped = False
self.textinfo = None
self.prediction_type = "epsilon"
self.api = api if api is not None else self.api
self.api = api or self.api
self.time_start = time.time()
if self.debug_output:
log.debug(f'State begin: {self.job}')
@@ -144,11 +144,11 @@ class State:
self.paused = False
self.interrupted = False
self.skipped = False
self.api = api if api is not None else self.api
self.api = api or self.api
modules.devices.torch_gc()
def set_current_image(self):
if self.job == 'VAE': # avoid generating preview while vae is running
if self.job == 'VAE' or self.job == 'Upscale': # avoid generating preview while vae is running
return False
from modules.shared import opts, cmd_opts
if cmd_opts.lowvram or self.api or (not opts.live_previews_enable) or (opts.show_progress_every_n_steps <= 0):