MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / MLPProj

Class MLPProj

wan/models/wan_transformer3d.py:588–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586
587
588class MLPProj(torch.nn.Module):
589
590 def __init__(self, in_dim, out_dim):
591 super().__init__()
592
593 self.proj = torch.nn.Sequential(
594 torch.nn.LayerNorm(in_dim), torch.nn.Linear(in_dim, in_dim),
595 torch.nn.GELU(), torch.nn.Linear(in_dim, out_dim),
596 torch.nn.LayerNorm(out_dim))
597
598 def forward(self, image_embeds):
599 clip_extra_context_tokens = self.proj(image_embeds)
600 return clip_extra_context_tokens
601
602
603

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected