MCPcopy Create free account
hub / github.com/CompVis/zigma / forward

Method forward

model_zigma.py:329–337  ·  view source on GitHub ↗
(self, x, c=None)

Source from the content-addressed store, hash-verified

327 )
328
329 def forward(self, x, c=None):
330 if c is not None:
331 shift, scale = self.adaLN_modulation(c).chunk(2, dim=1)
332 x = modulate(self.norm_final(x), shift, scale)
333 x = self.linear(x)
334 else:
335 x = self.norm_final(x)
336 x = self.linear(x)
337 return x
338
339
340class Block(nn.Module):

Callers

nothing calls this directly

Calls 1

modulateFunction · 0.85

Tested by

no test coverage detected