MCPcopy
hub / github.com/Wan-Video/Wan2.2 / forward

Method forward

wan/modules/t5.py:170–175  ·  view source on GitHub ↗
(self, x, mask=None, pos_bias=None)

Source from the content-addressed store, hash-verified

168 num_buckets, num_heads, bidirectional=True)
169
170 def forward(self, x, mask=None, pos_bias=None):
171 e = pos_bias if self.shared_pos else self.pos_embedding(
172 x.size(1), x.size(1))
173 x = fp16_clamp(x + self.attn(self.norm1(x), mask=mask, pos_bias=e))
174 x = fp16_clamp(x + self.ffn(self.norm2(x)))
175 return x
176
177
178class T5CrossAttention(nn.Module):

Callers

nothing calls this directly

Calls 2

fp16_clampFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected