MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / forward

Method forward

architecture/embeddings.py:1583–1590  ·  view source on GitHub ↗
(self, image_embeds: torch.Tensor)

Source from the content-addressed store, hash-verified

1581 self.norm = nn.LayerNorm(cross_attention_dim)
1582
1583 def forward(self, image_embeds: torch.Tensor):
1584 batch_size = image_embeds.shape[0]
1585
1586 # image
1587 image_embeds = self.image_embeds(image_embeds.to(self.image_embeds.weight.dtype))
1588 image_embeds = image_embeds.reshape(batch_size, self.num_image_text_embeds, -1)
1589 image_embeds = self.norm(image_embeds)
1590 return image_embeds
1591
1592
1593class IPAdapterFullImageProjection(nn.Module):

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected