From 57c554a23f75054a72aebe62583123cd2e810e39 Mon Sep 17 00:00:00 2001 From: tanhaoan333 Date: Mon, 9 Mar 2026 16:05:52 +0800 Subject: [PATCH] [bugfix]Fix parameter ordering bug in _merge_multimodal_embeddings (#7068) ### What this PR does / why we need it? This PR fixes a bug in the `_merge_multimodal_embeddings` function where the parameter order was incorrect. The `multimodal_embeddings` and `is_multimodal` parameters were swapped, which would lead to runtime errors when the function is called with positional arguments. This change corrects the function signature to align with its expected usage, ensuring that multimodal embeddings are correctly merged. ### Does this PR introduce _any_ user-facing change? No. This is a bug fix for an internal utility function and has no user-facing impact. ### How was this patch tested? The correctness of this fix is validated by existing tests for multimodal functionality. With the incorrect function signature, these tests would fail due to argument type mismatches. CI passing confirms the fix is effective. - vLLM version: v0.16.0 - vLLM main: https://github.com/vllm-project/vllm/commit/4034c3d32e30d01639459edd3ab486f56993876d Signed-off-by: tanhaoan333 --- vllm_ascend/patch/worker/patch_multimodal_merge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm_ascend/patch/worker/patch_multimodal_merge.py b/vllm_ascend/patch/worker/patch_multimodal_merge.py index 35be3cf3..6d62a317 100644 --- a/vllm_ascend/patch/worker/patch_multimodal_merge.py +++ b/vllm_ascend/patch/worker/patch_multimodal_merge.py @@ -24,8 +24,8 @@ from vllm.multimodal import NestedTensors def _merge_multimodal_embeddings( inputs_embeds: torch.Tensor, - is_multimodal: torch.Tensor, multimodal_embeddings: NestedTensors, + is_multimodal: torch.Tensor, ) -> torch.Tensor: """ Merge ``multimodal_embeddings`` into ``inputs_embeds`` by overwriting the