Skip to content

Commit 2cfca5e

Browse files
committed
update
1 parent 8b9d5b6 commit 2cfca5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/normalization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def __init__(self, dim, eps: float, elementwise_affine: bool = True):
532532
def forward(self, hidden_states):
533533
input_dtype = hidden_states.dtype
534534
variance = hidden_states.to(torch.float32).pow(2).mean(-1, keepdim=True)
535-
hidden_states = hidden_states.float() * torch.rsqrt(variance + self.eps)
535+
hidden_states = hidden_states * torch.rsqrt(variance + self.eps)
536536

537537
if self.weight is not None:
538538
# convert into half-precision if necessary

0 commit comments

Comments
 (0)