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

Method __init__

wan/models/portrait_encoder.py:122–132  ·  view source on GitHub ↗
(self, adapter_in_dim=1024, cross_attention_dim=1024)

Source from the content-addressed store, hash-verified

120
121class MultiProjModel(nn.Module):
122 def __init__(self, adapter_in_dim=1024, cross_attention_dim=1024):
123 super().__init__()
124
125 self.generator = None
126 self.cross_attention_dim = cross_attention_dim
127 self.eye_proj = torch.nn.Linear(6, cross_attention_dim, bias=False)
128 self.emo_proj = torch.nn.Linear(30, cross_attention_dim, bias=False)
129 self.mouth_proj = torch.nn.Linear(512, cross_attention_dim, bias=False)
130 self.headpose_proj = torch.nn.Linear(6, cross_attention_dim, bias=False)
131
132 self.norm = torch.nn.LayerNorm(cross_attention_dim)
133
134 def forward(self, adapter_embeds):
135 B, num_frames, C = adapter_embeds.shape

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected