MCPcopy Create free account
hub / github.com/TencentARC/InstantMesh / forward

Method forward

src/models/decoder/transformer.py:56–63  ·  view source on GitHub ↗
(self, x, cond)

Source from the content-addressed store, hash-verified

54 )
55
56 def forward(self, x, cond):
57 # x: [N, L, D]
58 # cond: [N, L_cond, D_cond]
59 x = x + self.cross_attn(self.norm1(x), cond, cond)[0]
60 before_sa = self.norm2(x)
61 x = x + self.self_attn(before_sa, before_sa, before_sa)[0]
62 x = x + self.mlp(self.norm3(x))
63 return x
64
65
66class TriplaneTransformer(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected