File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
vllm/model_executor/models Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -783,15 +783,19 @@ def get_multimodal_embeddings(self, **kwargs) -> Optional[NestedTensors]:
783783 if image_input is None :
784784 return None
785785 vision_embeddings = self ._process_image_input (image_input )
786- if kwargs .get ("v0_path" , False ):
786+
787+ if kwargs .get ("v0_path" , False ) or \
788+ image_input .get ("feat_is_patch" ) is None or \
789+ image_input .get ("embed_is_patch" ) is None :
790+ # The path is used for pixtral (V0 only) and llava (V0/V1)
787791 return vision_embeddings
788- else :
789- nested_emb = [
790- self ._get_mm_embeds (* args ) for args in zip (
791- vision_embeddings , image_input ["feat_is_patch" ],
792- image_input ["num_crops" ], image_input ["embed_is_patch" ])
793- ]
794- return flatten_2d_lists (nested_emb )
792+
793+ nested_emb = [
794+ self ._get_mm_embeds (* args ) for args in zip (
795+ vision_embeddings , image_input ["feat_is_patch" ],
796+ image_input ["num_crops" ], image_input ["embed_is_patch" ])
797+ ]
798+ return flatten_2d_lists (nested_emb )
795799
796800 def get_input_embeddings (
797801 self ,
You can’t perform that action at this time.
0 commit comments