MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / __init__

Method __init__

diffsynth/models/wan_video_dit.py:479–490  ·  view source on GitHub ↗
(self, in_dim, out_dim, has_pos_emb=False)

Source from the content-addressed store, hash-verified

477
478class MLP(torch.nn.Module):
479 def __init__(self, in_dim, out_dim, has_pos_emb=False):
480 super().__init__()
481 self.proj = torch.nn.Sequential(
482 nn.LayerNorm(in_dim),
483 nn.Linear(in_dim, in_dim),
484 nn.GELU(),
485 nn.Linear(in_dim, out_dim),
486 nn.LayerNorm(out_dim)
487 )
488 self.has_pos_emb = has_pos_emb
489 if has_pos_emb:
490 self.emb_pos = torch.nn.Parameter(torch.zeros((1, 514, 1280)))
491
492 def forward(self, x):
493 if self.has_pos_emb:

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

no outgoing calls

Tested by

no test coverage detected