From 231dfe01f4e2f9a50a2b3dd126b8188e2f876074 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 30 Oct 2022 10:35:55 -0400 Subject: [PATCH] fix incorrect thresholding reporting for karras noise; close #1300 --- ldm/models/diffusion/ksampler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldm/models/diffusion/ksampler.py b/ldm/models/diffusion/ksampler.py index 54d78b302b..756756db95 100644 --- a/ldm/models/diffusion/ksampler.py +++ b/ldm/models/diffusion/ksampler.py @@ -10,7 +10,7 @@ from .shared_invokeai_diffusion import InvokeAIDiffuserComponent # at this threshold, the scheduler will stop using the Karras # noise schedule and start using the model's schedule -STEP_THRESHOLD = 29 +STEP_THRESHOLD = 30 def cfg_apply_threshold(result, threshold = 0.0, scale = 0.7): if threshold <= 0.0: @@ -101,10 +101,10 @@ class KSampler(Sampler): ) if ddim_num_steps >= self.karras_max: - print(f'>> Ksampler using model noise schedule (steps > {self.karras_max})') + print(f'>> Ksampler using model noise schedule (steps >= {self.karras_max})') self.sigmas = self.model_sigmas else: - print(f'>> Ksampler using karras noise schedule (steps <= {self.karras_max})') + print(f'>> Ksampler using karras noise schedule (steps < {self.karras_max})') self.sigmas = self.karras_sigmas # ALERT: We are completely overriding the sample() method in the base class, which