MCPcopy Create free account
hub / github.com/microsoft/TRELLIS.2 / forward

Method forward

trellis2/modules/sparse/norm.py:49–53  ·  view source on GitHub ↗
(self, x: VarLenTensor)

Source from the content-addressed store, hash-verified

47 A GroupNorm layer that converts to float32 before the forward pass.
48 """
49 def forward(self, x: VarLenTensor) -> VarLenTensor:
50 x_dtype = x.dtype
51 x = manual_cast(x, torch.float32)
52 o = super().forward(x)
53 return manual_cast(o, x_dtype)
54
55
56class SparseLayerNorm32(SparseLayerNorm):

Callers

nothing calls this directly

Calls 2

manual_castFunction · 0.85
forwardMethod · 0.45

Tested by

no test coverage detected