From 88a75c29f6a01c8ce6344d80f6dc3bd816d81b59 Mon Sep 17 00:00:00 2001 From: Lanze Liu <86434077+liulanze@users.noreply.github.com> Date: Mon, 8 Jun 2026 20:02:27 -0700 Subject: [PATCH] [Bugfix][Model] Qwen3-Omni: move cu_seqlens to GPU before VIT attention (#44264) Signed-off-by: Lanze Liu (cherry picked from commit 540aaf21406bad1eb0f3d5ddc5e835e45ea01e43) --- vllm/model_executor/models/qwen3_omni_moe_thinker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vllm/model_executor/models/qwen3_omni_moe_thinker.py b/vllm/model_executor/models/qwen3_omni_moe_thinker.py index bd8a87b7dce6..05586324df86 100755 --- a/vllm/model_executor/models/qwen3_omni_moe_thinker.py +++ b/vllm/model_executor/models/qwen3_omni_moe_thinker.py @@ -991,6 +991,9 @@ def forward( ) cu_seqlens = F.pad(cu_seqlens, (1, 0), value=0) + # Move cu_seqlens to GPU; grid_thw may be on CPU during profile_run + # and FA3 vit attention requires cu_seqlens on CUDA. + cu_seqlens = cu_seqlens.to(self.device, non_blocking=True) hidden_states = hidden_states.unsqueeze(1) rotary_pos_emb_cos = rotary_pos_emb_cos.to(hidden_states.device) rotary_pos_emb_sin = rotary_pos_emb_sin.to(hidden_states.device)