MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / forward

Method forward

diffusers/src/diffusers/models/normalization.py:89–97  ·  view source on GitHub ↗
(self, inputs: torch.Tensor)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected