MCPcopy Create free account
hub / github.com/PowerHouseMan/ComfyUI-AdvancedLivePortrait / forward

Method forward

LivePortrait/modules/util.py:267–274  ·  view source on GitHub ↗
(self, x, segmap)

Source from the content-addressed store, hash-verified

265 self.mlp_beta = nn.Conv2d(nhidden, norm_nc, kernel_size=3, padding=1)
266
267 def forward(self, x, segmap):
268 normalized = self.param_free_norm(x)
269 segmap = F.interpolate(segmap, size=x.size()[2:], mode='nearest')
270 actv = self.mlp_shared(segmap)
271 gamma = self.mlp_gamma(actv)
272 beta = self.mlp_beta(actv)
273 out = normalized * (1 + gamma) + beta
274 return out
275
276
277class SPADEResnetBlock(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected