mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 02:45:05 +08:00
prevent redundant preview
This commit is contained in:
parent
0120768f63
commit
938ec5e00a
@ -115,7 +115,11 @@ def images_tensor_to_samples(image, approximation=None, model=None):
|
||||
def store_latent(decoded):
|
||||
state.current_latent = decoded
|
||||
|
||||
if opts.live_previews_enable and opts.show_progress_every_n_steps > 0 and shared.state.sampling_step % opts.show_progress_every_n_steps == 0:
|
||||
if (
|
||||
(opts.live_previews_enable and opts.show_progress_every_n_steps > 0) and
|
||||
(shared.state.sampling_steps - shared.state.sampling_step > opts.show_progress_every_n_steps) and
|
||||
(shared.state.sampling_step % opts.show_progress_every_n_steps == 0)
|
||||
):
|
||||
if not shared.parallel_processing_allowed:
|
||||
shared.state.assign_current_image(sample_to_image(decoded))
|
||||
|
||||
|
@ -139,7 +139,11 @@ class State:
|
||||
if not shared.parallel_processing_allowed:
|
||||
return
|
||||
|
||||
if self.sampling_step - self.current_image_sampling_step >= shared.opts.show_progress_every_n_steps and shared.opts.live_previews_enable and shared.opts.show_progress_every_n_steps != -1:
|
||||
if (
|
||||
(shared.opts.live_previews_enable and shared.opts.show_progress_every_n_steps != -1) and
|
||||
(self.sampling_steps - self.sampling_step > shared.opts.show_progress_every_n_steps) and
|
||||
(self.sampling_step - self.current_image_sampling_step >= shared.opts.show_progress_every_n_steps)
|
||||
):
|
||||
self.do_set_current_image()
|
||||
|
||||
def do_set_current_image(self):
|
||||
|
Loading…
Reference in New Issue
Block a user