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

Method forward

wan/models/wan_image_encoder.py:148–155  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

146 nn.Linear(int(dim * mlp_ratio), dim), nn.Dropout(proj_dropout))
147
148 def forward(self, x):
149 if self.post_norm:
150 x = x + self.norm1(self.attn(x))
151 x = x + self.norm2(self.mlp(x))
152 else:
153 x = x + self.attn(self.norm1(x))
154 x = x + self.mlp(self.norm2(x))
155 return x
156
157
158class AttentionPool(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected