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

Method forward

diffsynth/models/sd3_dit.py:17–24  ·  view source on GitHub ↗
(self, hidden_states)

Source from the content-addressed store, hash-verified

15 self.weight = None
16
17 def forward(self, hidden_states):
18 input_dtype = hidden_states.dtype
19 variance = hidden_states.to(torch.float32).square().mean(-1, keepdim=True)
20 hidden_states = hidden_states * torch.rsqrt(variance + self.eps)
21 hidden_states = hidden_states.to(input_dtype)
22 if self.weight is not None:
23 hidden_states = hidden_states * self.weight
24 return hidden_states
25
26
27

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected