MCPcopy Index your code
hub / github.com/huggingface/diffusers / FP32LayerNorm

Class FP32LayerNorm

src/diffusers/models/normalization.py:84–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84class FP32LayerNorm(nn.LayerNorm):
85 def forward(self, inputs: torch.Tensor) -> torch.Tensor:
86 origin_dtype = inputs.dtype
87 return F.layer_norm(
88 inputs.float(),
89 self.normalized_shape,
90 self.weight.float() if self.weight is not None else None,
91 self.bias.float() if self.bias is not None else None,
92 self.eps,
93 ).to(origin_dtype)
94
95
96class SD35AdaLayerNormZeroX(nn.Module):

Callers 15

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…