[Bugfix] Fix the two multimodal root tests that fail on main (OpenPangu-VL embed merge, MiMo sink test fixture) (#58900)

Signed-off-by: khluu <khluu000@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Kevin H. Luu committed Sep 27, 2026 at 21:52 UTC 0da126676e38f5dc1b02b2c4f48dc85f90f5a79f
2 files changed +15 -27
tests/models/multimodal/test_mimo_v2_omni.py
+3 -18
@@ -5,13 +5,7 @@
5 import pytest
6 import torch
7
8 -from tests.utils import ensure_current_vllm_config
9 -from vllm.distributed.parallel_state import (
10 - init_distributed_environment,
11 - initialize_model_parallel,
12 -)
8 from vllm.platforms import current_platform
14 -from vllm.utils.network_utils import get_open_port
9
10 EMBED_DIM = 256
11 NUM_HEADS = 4
@@ -21,20 +15,11 @@ WINDOW = 8
15 SEQ_LENS = [5, 37]
16
17
24 -@pytest.fixture(scope="module")
25 -def vision_attn_env():
26 - init_distributed_environment(
27 - world_size=1,
28 - rank=0,
29 - local_rank=0,
30 - distributed_init_method=f"tcp://127.0.0.1:{get_open_port()}",
31 - backend="nccl",
32 - )
18 +@pytest.fixture
19 +def vision_attn_env(dist_init):
20 default_dtype = torch.get_default_dtype()
21 torch.set_default_dtype(torch.bfloat16)
35 - with ensure_current_vllm_config():
36 - initialize_model_parallel(tensor_model_parallel_size=1)
37 - yield
22 + yield
23 torch.set_default_dtype(default_dtype)
24
25
vllm/model_executor/models/openpangu_vl.py
+12 -9
@@ -1055,15 +1055,18 @@ class OpenPanguVLForConditionalGeneration(
1055 input_ids: torch.Tensor,
1056 multimodal_embeddings: MultiModalEmbeddings | None = None,
1057 ) -> torch.Tensor:
1058 - inputs_embeds = self.language_model.embed_input_ids(input_ids)
1059 - if multimodal_embeddings is not None:
1060 - inputs_embeds = self.embed_input_ids( # type: ignore[call-overload]
1061 - input_ids,
1062 - inputs_embeds,
1063 - multimodal_embeddings,
1064 - [self.config.image_token_id, self.config.video_token_id],
1065 - )
1066 - return inputs_embeds
1058 + if multimodal_embeddings is None:
1059 + return self.language_model.embed_input_ids(input_ids)
1060 +
1061 + mm_token_ids = input_ids.new_tensor(
1062 + [self.config.image_token_id, self.config.video_token_id]
1063 + )
1064 + is_multimodal = torch.isin(input_ids, mm_token_ids)
1065 + return self.embed_input_ids(
1066 + input_ids,
1067 + multimodal_embeddings,
1068 + is_multimodal=is_multimodal,
1069 + )
1070
1071 def _process_image_input(
1072 self, image_input: OpenPanguVLImageInputs