Skip to content

Commit

Permalink
Align simple scheduling closer to official stable cascade scheduler.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Feb 20, 2024
1 parent ec4d89c commit c6b7a15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comfy/model_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ def set_parameters(self, shift=1.0, cosine_s=8e-3):
self._init_alpha_cumprod = torch.cos(self.cosine_s / (1 + self.cosine_s) * torch.pi * 0.5) ** 2

#This part is just for compatibility with some schedulers in the codebase
self.num_timesteps = 1000
self.num_timesteps = 10000
sigmas = torch.empty((self.num_timesteps), dtype=torch.float32)
for x in range(self.num_timesteps):
t = x / self.num_timesteps
t = (x + 1) / self.num_timesteps
sigmas[x] = self.sigma(t)

self.set_sigmas(sigmas)
Expand Down

0 comments on commit c6b7a15

Please sign in to comment.