MCPcopy Create free account
hub / github.com/cubiq/ComfyUI_InstantID / forward

Method forward

InstantID.py:104–108  ·  view source on GitHub ↗
(self, image_embeds)

Source from the content-addressed store, hash-verified

102 self.norm = torch.nn.LayerNorm(cross_attention_dim)
103
104 def forward(self, image_embeds):
105 embeds = image_embeds
106 clip_extra_context_tokens = self.proj(embeds).reshape(-1, self.clip_extra_context_tokens, self.cross_attention_dim)
107 clip_extra_context_tokens = self.norm(clip_extra_context_tokens)
108 return clip_extra_context_tokens
109
110class To_KV(torch.nn.Module):
111 def __init__(self, state_dict):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected