MCPcopy Create free account
hub / github.com/pytorch/executorch / image_embedding

Method image_embedding

examples/models/llava/model.py:253–255  ·  view source on GitHub ↗
(self, images: torch.Tensor)

Source from the content-addressed store, hash-verified

251 return self.text_model.forward(None, {"input_pos": input_pos}, token_embeds)
252
253 def image_embedding(self, images: torch.Tensor) -> torch.Tensor:
254 preprocessed_img = self.image_preprocess(images)
255 return self.encode_images(preprocessed_img)
256
257 def prefill_embedding(
258 self,

Callers 3

prefill_embeddingMethod · 0.95
forwardMethod · 0.95
forwardMethod · 0.80

Calls 2

image_preprocessMethod · 0.95
encode_imagesMethod · 0.95

Tested by

no test coverage detected