cosine up/down were apparently backwards

This commit is contained in:
Alex "mcmonkey" Goodwin
2023-02-10 00:54:44 -08:00
parent 7ee394d8cb
commit 388999f7ad
+4 -4
View File
@@ -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