[BugFix] Fix qwen3omni thinker batching. (#207)

Signed-off-by: yinpeiqi <yinpeiqi809@gmail.com>
This commit is contained in:
Peiqi Yin authored and GitHub committed 2025-12-08 04:44:13 +00:00
1 parent aa689e6af0
commit bbb5a72871
2 files changed
+11 -4

No files matched your search

@@ -342,9 +342,9 @@ class Qwen3OmniMoeForConditionalGeneration(
and thinker_tts_embeds.shape[1] == 3
):
bos_eos_pad = thinker_tts_embeds.to(text_hidden_states.device).chunk(3, dim=1) # 3 * [1,1,H]
multimodal_outputs["tts_bos_embed"] = bos_eos_pad[0]
multimodal_outputs["tts_eos_embed"] = bos_eos_pad[1]
multimodal_outputs["tts_pad_embed"] = bos_eos_pad[2]
multimodal_outputs["tts_bos_embed"] = [bos_eos_pad[0]]
multimodal_outputs["tts_eos_embed"] = [bos_eos_pad[1]]
multimodal_outputs["tts_pad_embed"] = [bos_eos_pad[2]]
except Exception:
# Best-effort; absence will be handled by talker with fallbacks
pass