From 1f4fe0c4655e283bb9ed035ed8dfd009d6d953ed Mon Sep 17 00:00:00 2001 From: Chris Tefer Date: Sun, 8 Dec 2024 13:41:33 -0600 Subject: [PATCH] Fixed an issue where building the sigmas could go into a state where the total_steps wasn't being used --- nodes/cfe_utils.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nodes/cfe_utils.py b/nodes/cfe_utils.py index 8b744bf..917a15a 100644 --- a/nodes/cfe_utils.py +++ b/nodes/cfe_utils.py @@ -16,12 +16,11 @@ def build_sigmas(model, steps, scheduler, denoise): Builds the sigmas from the steps and the denoise. """ sigmas = None - if denoise < 1.0: - if denoise <= 0.0: - sigmas = torch.FloatTensor([]) - total_steps = int(steps/denoise) + if denoise <= 0.0: + sigmas = torch.FloatTensor([]) if sigmas is None: + total_steps = int(steps/denoise) sigmas = comfy.samplers.calculate_sigmas(model.get_model_object("model_sampling"), scheduler, total_steps).cpu() sigmas = sigmas[-(steps + 1):]