MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS-TTS / __init__

Method __init__

moss_soundeffect_v2/diffsynth/models/wan_audio_dit.py:58–69  ·  view source on GitHub ↗
(self, in_dim, out_dim, has_pos_emb=False)

Source from the content-addressed store, hash-verified

56
57class MLP(torch.nn.Module):
58 def __init__(self, in_dim, out_dim, has_pos_emb=False):
59 super().__init__()
60 self.proj = torch.nn.Sequential(
61 nn.LayerNorm(in_dim),
62 nn.Linear(in_dim, in_dim),
63 nn.GELU(),
64 nn.Linear(in_dim, out_dim),
65 nn.LayerNorm(out_dim)
66 )
67 self.has_pos_emb = has_pos_emb
68 if has_pos_emb:
69 self.emb_pos = torch.nn.Parameter(torch.zeros((1, 514, 1280)))
70
71 def forward(self, x):
72 if self.has_pos_emb:

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected