fix case where first step skilled if skip early cond is 0

This commit is contained in:
drhead 2024-05-18 01:22:31 -04:00 committed by GitHub
parent 029adbe531
commit feeb6802aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -212,7 +212,7 @@ class CFGDenoiser(torch.nn.Module):
uncond = denoiser_params.text_uncond
skip_uncond = False
if self.step / self.total_steps <= shared.opts.skip_early_cond:
if shared.opts.skip_early_cond != 0. and self.step / self.total_steps <= shared.opts.skip_early_cond:
skip_uncond = True
x_in = x_in[:-batch_size]
sigma_in = sigma_in[:-batch_size]