Skip to content

Commit d4c1900

Browse files
committed
fix sqrt_1m_alpha_bar
1 parent e4b26f0 commit d4c1900

File tree

1 file changed

+1
-1
lines changed
  • labml_nn/diffusion/stable_diffusion/sampler

1 file changed

+1
-1
lines changed

labml_nn/diffusion/stable_diffusion/sampler/ddpm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self, model: LatentDiffusion):
6868
# $\sqrt{\bar\alpha}$
6969
self.sqrt_alpha_bar = alpha_bar ** .5
7070
# $\sqrt{1 - \bar\alpha}$
71-
self.sqrt_1m_alpha_bar = alpha_bar ** .5
71+
self.sqrt_1m_alpha_bar = (1. - alpha_bar) ** .5
7272
# $\frac{1}{\sqrt{\bar\alpha_t}}$
7373
self.sqrt_recip_alpha_bar = alpha_bar ** -.5
7474
# $\sqrt{\frac{1}{\bar\alpha_t} - 1}$

0 commit comments

Comments
 (0)