Skip to content

Commit

Permalink
Fix duplicate sigmas on beta scheduler.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Oct 22, 2024
1 parent 0075c6d commit f82314f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion comfy/samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f82314f

Please sign in to comment.