MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / forward

Method forward

wan/models/portrait_encoder.py:108–118  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

106 )
107
108 def forward(self, x): # x (b, 512, 1)
109 latents = self.latents.repeat(x.size(0), 1, 1)
110
111 x = self.proj_in(x) # (b, 512, 1024)
112
113 for attn, ff in self.layers:
114 latents = attn(x, latents) + latents # b 16 1024
115 latents = ff(latents) + latents
116
117 latents = self.proj_out(latents)
118 return self.norm_out(latents)
119
120
121class MultiProjModel(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected