[Bugfix] Place empty Qwen encoder-DP embeddings on the communication device (#31663)

This commit is contained in:
qyb233
2026-07-21 19:54:36 +08:00
committed by GitHub
parent 7c9257529f
commit 303896a475
+2 -2
View File
@@ -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,
)