From 303896a475c47f3acf6c283ad79933316171ba04 Mon Sep 17 00:00:00 2001 From: qyb233 <1959345727@qq.com> Date: Tue, 21 Jul 2026 19:54:36 +0800 Subject: [PATCH] [Bugfix] Place empty Qwen encoder-DP embeddings on the communication device (#31663) --- python/sglang/srt/multimodal/mm_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/multimodal/mm_utils.py b/python/sglang/srt/multimodal/mm_utils.py index f57a97b41..4abf3dfb2 100644 --- a/python/sglang/srt/multimodal/mm_utils.py +++ b/python/sglang/srt/multimodal/mm_utils.py @@ -707,7 +707,7 @@ def run_dp_sharded_mrope_vision_model( out_dim = getattr(vision_model.config, "hidden_size", None) image_embeds_local = torch.empty( (0, embed_dim_reduction_factor, out_dim), - device=input_device, + device=vision_model.device, dtype=input_dtype, ) else: @@ -725,7 +725,7 @@ def run_dp_sharded_mrope_vision_model( out_dim = vision_model.config.hidden_size image_embeds_local = torch.empty( (0, out_dim), - device=input_device, + device=vision_model.device, dtype=input_dtype, )