Skip to content

Commit 3eb2593

Browse files
committed
a few more additions
1 parent 7eb4bfa commit 3eb2593

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffusers/schedulers/scheduling_ddpm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def __init__(
142142

143143
self.alphas = 1.0 - self.betas
144144
self.alphas_cumprod = torch.cumprod(self.alphas, dim=0)
145-
self.sigmas = 1 - self.alphas ** 2
145+
self.sigmas = 1 - self.alphas**2
146146
self.one = torch.tensor(1.0)
147147

148148
# standard deviation of the initial noise distribution
@@ -269,8 +269,8 @@ def step(
269269
elif prediction_type == "v":
270270
# v_t = alpha_t * epsilon - sigma_t * x
271271
# need to merge the PRs for sigma to be available in DDPM
272-
pred_original_sample = sample*self.alphas[t] - model_output * self.sigmas[t]
273-
eps = model_output*self.alphas[t] - sample * self.sigmas[t]
272+
pred_original_sample = sample * self.alphas[t] - model_output * self.sigmas[t]
273+
eps = model_output * self.alphas[t] - sample * self.sigmas[t]
274274
raise NotImplementedError(f"v prediction not yet implemented for DDPM")
275275
else:
276276
raise ValueError(f"prediction_type given as {prediction_type} must be one of `epsilon`, `sample`, or `v`")

0 commit comments

Comments
 (0)