MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / forward

Method forward

models/wan/t5.py:297–306  ·  view source on GitHub ↗
(self, ids, mask=None)

Source from the content-addressed store, hash-verified

295 self.apply(init_weights)
296
297 def forward(self, ids, mask=None):
298 x = self.token_embedding(ids)
299 x = self.dropout(x)
300 e = self.pos_embedding(x.size(1),
301 x.size(1)) if self.shared_pos else None
302 for block in self.blocks:
303 x = block(x, mask, pos_bias=e)
304 x = self.norm(x)
305 x = self.dropout(x)
306 return x
307
308
309class T5Decoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected