From f82314fcfcc4d83b307f30f06e77db44e95686cf Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 21 Oct 2024 20:19:45 -0400 Subject: [PATCH] Fix duplicate sigmas on beta scheduler. --- comfy/samplers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/comfy/samplers.py b/comfy/samplers.py index 1ecb41dd..f85bd203 100644 --- a/comfy/samplers.py +++ b/comfy/samplers.py @@ -358,8 +358,11 @@ def beta_scheduler(model_sampling, steps, alpha=0.6, beta=0.6): ts = numpy.rint(scipy.stats.beta.ppf(ts, alpha, beta) * total_timesteps) sigs = [] + last_t = -1 for t in ts: - sigs += [float(model_sampling.sigmas[int(t)])] + if t != last_t: + sigs += [float(model_sampling.sigmas[int(t)])] + last_t = t sigs += [0.0] return torch.FloatTensor(sigs)