Commit 029adbe5 authored by drhead's avatar drhead Committed by GitHub

implement option to skip uncond on all steps below ngms

parent 33cbbf9f
...@@ -218,7 +218,7 @@ class CFGDenoiser(torch.nn.Module): ...@@ -218,7 +218,7 @@ class CFGDenoiser(torch.nn.Module):
sigma_in = sigma_in[:-batch_size] sigma_in = sigma_in[:-batch_size]
# alternating uncond allows for higher thresholds without the quality loss normally expected from raising it # alternating uncond allows for higher thresholds without the quality loss normally expected from raising it
if self.step % 2 and s_min_uncond > 0 and sigma[0] < s_min_uncond and not is_edit_model: if (self.step % 2 or shared.opts.s_min_uncond_all) and s_min_uncond > 0 and sigma[0] < s_min_uncond and not is_edit_model:
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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment