From bf82e18374c29f9f80973c9f73ff794d7af58fdc Mon Sep 17 00:00:00 2001 From: Baoyuan Qi Date: Sun, 16 Nov 2025 17:31:04 +0800 Subject: [PATCH] [fix] adapt hidden state device for multi-hardware support (#61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 齐保元 --- .../model_executor/stage_input_processors/qwen2_5_omni.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vllm_omni/model_executor/stage_input_processors/qwen2_5_omni.py b/vllm_omni/model_executor/stage_input_processors/qwen2_5_omni.py index ca5e02ba6..02da0bd20 100644 --- a/vllm_omni/model_executor/stage_input_processors/qwen2_5_omni.py +++ b/vllm_omni/model_executor/stage_input_processors/qwen2_5_omni.py @@ -29,9 +29,8 @@ def thinker2talker( prompt_token_ids = thinker_output.prompt_token_ids thinker_output_ids = output.token_ids prompt_token_ids_len = len(prompt_token_ids) - thinker_hidden_states = ( - output.multimodal_output["latent"].clone().detach().cuda() - ) + latent = output.multimodal_output["latent"] + thinker_hidden_states = latent.clone().detach().to(latent.device) talker_inputs.append( OmniTokensPrompt( prompt_token_ids=[TALKER_CODEC_START_TOKEN_ID] + [TALKER_CODEC_PAD_TOKEN_ID] * (len(prompt_token_ids)) + [TALKER_CODEC_END_TOKEN_ID],