Skip to content

Commit b58b3e9

Browse files
Thiago Crepaldiyiyixuxu
andauthored
Update src/diffusers/schedulers/scheduling_euler_discrete.py
Co-authored-by: YiYi Xu <yixu310@gmail.com>
1 parent 15c9796 commit b58b3e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/schedulers/scheduling_euler_discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def __init__(
216216
# FP16 smallest positive subnormal works well here
217217
self.alphas_cumprod[-1] = 2**-24
218218

219-
sigmas = (((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5).flip(0)
219+
sigmas = (((1 - self.alphas_cumprod) / self.alphas_cumprod) ** 0.5).flip(0).to(dtype=torch.float32)
220220
timesteps = np.linspace(0, num_train_timesteps - 1, num_train_timesteps, dtype=float)[::-1].copy()
221221
timesteps = torch.from_numpy(timesteps).to(dtype=torch.float32)
222222

0 commit comments

Comments
 (0)