change skip_early_cond code to use float

This commit is contained in:
drhead 2024-04-23 03:08:28 -04:00 committed by GitHub
parent 83182d2799
commit 6e9b69a338
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 uncond = denoiser_params.text_uncond
skip_uncond = False skip_uncond = False
if self.step < shared.opts.skip_cond_steps: if self.step / self.total_steps <= shared.opts.skip_early_cond:
skip_uncond = True skip_uncond = True
x_in = x_in[:-batch_size] x_in = x_in[:-batch_size]
sigma_in = sigma_in[:-batch_size] sigma_in = sigma_in[:-batch_size]