mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
+1
-1
@@ -78,7 +78,7 @@ def progressapi(req: ProgressRequest):
|
||||
id_live_preview = req.id_live_preview
|
||||
live_preview = None
|
||||
updated = shared.state.set_current_image()
|
||||
debug_log(f'Preview: job={shared.state.job} active={active} progress={current}/{total} request={id_live_preview} last={shared.state.id_live_preview} enabled={shared.opts.live_previews_enable} updated={updated} image={shared.state.current_image} elapsed={elapsed:.3f}')
|
||||
debug_log(f'Preview: job={shared.state.job} active={active} progress={current}/{total} step={shared.state.current_image_sampling_step}/{shared.state.sampling_step} request={id_live_preview} last={shared.state.id_live_preview} enabled={shared.opts.live_previews_enable} busy={shared.state.preview_busy} updated={updated} image={shared.state.current_image} elapsed={elapsed:.3f}')
|
||||
if not active:
|
||||
return InternalProgressResponse(job=shared.state.job, active=active, queued=queued, paused=paused, completed=completed, id_live_preview=-1, debug=debug, textinfo="Queued..." if queued else "Waiting...")
|
||||
if shared.opts.live_previews_enable and (shared.state.id_live_preview != id_live_preview) and (shared.state.current_image is not None):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user