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

Method forward

diffsynth/models/kolors_text_encoder.py:445–450  ·  view source on GitHub ↗
(self, hidden_states: torch.Tensor)

Source from the content-addressed store, hash-verified

443 self.eps = eps
444
445 def forward(self, hidden_states: torch.Tensor):
446 input_dtype = hidden_states.dtype
447 variance = hidden_states.to(torch.float32).pow(2).mean(-1, keepdim=True)
448 hidden_states = hidden_states * torch.rsqrt(variance + self.eps)
449
450 return (self.weight * hidden_states).to(input_dtype)
451
452
453class CoreAttention(torch.nn.Module):

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected