MCPcopy Create free account
hub / github.com/Francis-Rings/StableAnimator / forward

Method forward

animation/modules/id_encoder.py:134–141  ·  view source on GitHub ↗
(self, id_embeds, clip_embeds, shortcut=False, scale=1.0)

Source from the content-addressed store, hash-verified

132
133
134 def forward(self, id_embeds, clip_embeds, shortcut=False, scale=1.0):
135 x = self.proj(id_embeds)
136 x = x.reshape(-1, self.num_tokens, self.cross_attention_dim)
137 x = self.norm(x)
138 out = self.fusion_model(x, clip_embeds)
139 if shortcut:
140 out = x + scale * out
141 return out

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected