Fixed an issue where building the sigmas could go into a state where the total_steps wasn't being used

This commit is contained in:
Chris Tefer
2024-12-08 13:41:33 -06:00
parent ef1d0c2ad3
commit 1f4fe0c465
+3 -4
View File
@@ -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):]