MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / forward

Method forward

diffsynth/models/stepvideo_dit.py:60–74  ·  view source on GitHub ↗

Forward pass through the RMSNorm layer. Args: x (torch.Tensor): The input tensor. Returns: torch.Tensor: The output tensor after applying RMSNorm.

(self, x)

Source from the content-addressed store, hash-verified

58 return x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps)
59
60 def forward(self, x):
61 """
62 Forward pass through the RMSNorm layer.
63
64 Args:
65 x (torch.Tensor): The input tensor.
66
67 Returns:
68 torch.Tensor: The output tensor after applying RMSNorm.
69
70 """
71 output = self._norm(x.float()).type_as(x)
72 if hasattr(self, "weight"):
73 output = output * self.weight
74 return output
75
76
77ACTIVATION_FUNCTIONS = {

Callers

nothing calls this directly

Calls 1

_normMethod · 0.95

Tested by

no test coverage detected