[VLM] Merged multi-modal processor for Pixtral (#12211)
Signed-off-by: remi <remi@mistral.ai> Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
co-authored by
DarkLight1337
parent
74bc397b0a
commit
61c6a5a796
@@ -1585,15 +1585,13 @@ class MolmoForCausalLM(nn.Module, SupportsMultiModal, SupportsPP, SupportsLoRA,
|
||||
|
||||
image_features = self._process_image_input(image_input)
|
||||
|
||||
nested_embeds = [
|
||||
return flatten_2d_lists(
|
||||
self._get_mm_embeds(*args) for args in zip(
|
||||
image_features,
|
||||
image_input["feat_is_patch"],
|
||||
image_input["num_crops"],
|
||||
image_input["embed_is_patch"],
|
||||
)
|
||||
]
|
||||
return flatten_2d_lists(nested_embeds)
|
||||
))
|
||||
|
||||
def get_input_embeddings(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user