MCPcopy Create free account
hub / github.com/MeiGen-AI/InfiniteTalk / __init__

Method __init__

wan/modules/model.py:322–335  ·  view source on GitHub ↗
(self, dim, out_dim, patch_size, eps=1e-6)

Source from the content-addressed store, hash-verified

320class Head(nn.Module):
321
322 def __init__(self, dim, out_dim, patch_size, eps=1e-6):
323 super().__init__()
324 self.dim = dim
325 self.out_dim = out_dim
326 self.patch_size = patch_size
327 self.eps = eps
328
329 # layers
330 out_dim = math.prod(patch_size) * out_dim
331 self.norm = WanLayerNorm(dim, eps)
332 self.head = nn.Linear(dim, out_dim)
333
334 # modulation
335 self.modulation = nn.Parameter(torch.randn(1, 2, dim) / dim**0.5)
336
337 def forward(self, x, e):
338 r"""

Callers 7

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 1

WanLayerNormClass · 0.70

Tested by

no test coverage detected