From feeb6802aa71fad190da2e051e50af84a94eda85 Mon Sep 17 00:00:00 2001 From: drhead <1313496+drhead@users.noreply.github.com> Date: Sat, 18 May 2024 01:22:31 -0400 Subject: [PATCH] fix case where first step skilled if skip early cond is 0 --- modules/sd_samplers_cfg_denoiser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_samplers_cfg_denoiser.py b/modules/sd_samplers_cfg_denoiser.py index 082a4f63c..d89ea2c8b 100644 --- a/modules/sd_samplers_cfg_denoiser.py +++ b/modules/sd_samplers_cfg_denoiser.py @@ -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]