[Bugfix][MiniCPM-o] Isolate duplex handoff failures and barge-in (#6170)

Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
Sy03 authored and GitHub committed 2026-08-28 15:46:41 +08:00
1 parent 04b97a5922
commit 009b992c5b
23 files changed
+817 -98

No files matched your search

@@ -392,14 +392,13 @@ class NemotronVoiceChatTalkerForConditionalGeneration(nn.Module):
info = merge_runtime_info(info_dict)
device = input_ids.device
span = int(input_ids.shape[0])
is_prefill_raw = info.get("_omni_is_prefill")
is_prefill = bool(is_prefill_raw) if isinstance(is_prefill_raw, bool) else span > 1
request_id = require_request_id(info, "talker")
embeds = torch.zeros((span, self._hidden), device=device, dtype=self._dtype)
if is_prefill or request_id not in self._sessions:
# The 1-token vLLM prefill is the session boundary: run the vendored
# warmup here so the first decode step is a pure NeMo t=1 step.
if request_id not in self._sessions:
# The request id, not vLLM's per-segment prefill flag, is the
# session boundary. Resumable updates are prefill again in v0.28
# and must preserve the existing EAR-TTS cache and step.
self._init_session(request_id, info, device)
return input_ids, embeds, {}