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

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers 8

__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
__init__Method · 0.45

Calls 1

WanLayerNormClass · 0.70

Tested by

no test coverage detected