support progress for img2img (#215)

WebGUI shows progress bar when an initial image is provided.
This commit is contained in:
Kevin Gibbons
2022-08-30 12:36:12 -07:00
committed by GitHub
parent a51e18ea98
commit 8ca4d6542d
4 changed files with 11 additions and 3 deletions

View File

@ -375,6 +375,7 @@ class DDIMSampler(object):
x_latent,
cond,
t_start,
img_callback=None,
unconditional_guidance_scale=1.0,
unconditional_conditioning=None,
use_original_steps=False,
@ -410,4 +411,7 @@ class DDIMSampler(object):
unconditional_guidance_scale=unconditional_guidance_scale,
unconditional_conditioning=unconditional_conditioning,
)
if img_callback:
img_callback(x_dec, i)
return x_dec