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

Method forward

diffsynth/models/wan_video_text_encoder.py:139–144  ·  view source on GitHub ↗
(self, x, mask=None, pos_bias=None)

Source from the content-addressed store, hash-verified

137 num_buckets, num_heads, bidirectional=True)
138
139 def forward(self, x, mask=None, pos_bias=None):
140 e = pos_bias if self.shared_pos else self.pos_embedding(
141 x.size(1), x.size(1))
142 x = fp16_clamp(x + self.attn(self.norm1(x), mask=mask, pos_bias=e))
143 x = fp16_clamp(x + self.ffn(self.norm2(x)))
144 return x
145
146
147class T5RelativeEmbedding(nn.Module):

Callers

nothing calls this directly

Calls 1

fp16_clampFunction · 0.85

Tested by

no test coverage detected