From 388999f7ad107b895fc05babf94d44a0ed7e93df Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Fri, 10 Feb 2023 00:54:44 -0800 Subject: [PATCH] cosine up/down were apparently backwards --- scripts/dynamic_thresholding.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/dynamic_thresholding.py b/scripts/dynamic_thresholding.py index dca31de..9481936 100644 --- a/scripts/dynamic_thresholding.py +++ b/scripts/dynamic_thresholding.py @@ -126,15 +126,15 @@ class CustomCFGDenoiser(sd_samplers_kdiffusion.CFGDenoiser): elif mode == "Linear Down": scale *= 1.0 - (self.step / max) elif mode == "Half Cosine Down": - scale *= 1.0 - math.cos((self.step / max)) + scale *= math.cos((self.step / max)) elif mode == "Cosine Down": - scale *= 1.0 - math.cos((self.step / max) * 1.5707) + scale *= math.cos((self.step / max) * 1.5707) elif mode == "Linear Up": scale *= self.step / max elif mode == "Half Cosine Up": - scale *= math.cos((self.step / max)) + scale *= 1.0 - math.cos((self.step / max)) elif mode == "Cosine Up": - scale *= math.cos((self.step / max) * 1.5707) + scale *= 1.0 - math.cos((self.step / max) * 1.5707) scale += min return scale