[Feat]audio streaming input for async chunk (#3614)
Signed-off-by: CHEN <116010019@link.cuhk.edu.cn>
This commit is contained in:
1 parent
6f4bd3e45c
commit
5dfdf584dd
20 files changed
+536
-184
No files matched your search
@@ -183,11 +183,6 @@ class Qwen3OmniMoeForConditionalGeneration(
|
||||
# sync stall; build_mm_cpu handles the eventual D2H at payload time.
|
||||
("codes", "audio"),
|
||||
}
|
||||
# Keys that need to be accumulated across streaming inputs
|
||||
self.streaming_accumulated_keys: set[tuple[str, str]] = {
|
||||
("embed", "prefill"),
|
||||
("hidden_states", "output"),
|
||||
}
|
||||
|
||||
elif self.model_stage == "code2wav":
|
||||
multimodal_config.skip_mm_profiling = True
|
||||
@@ -685,7 +680,8 @@ class Qwen3OmniMoeForConditionalGeneration(
|
||||
is_prefill = bool(payload.get("_omni_is_prefill", span_len > 1))
|
||||
if is_prefill:
|
||||
num_computed_tokens = payload.get("_omni_num_computed_tokens")
|
||||
if num_computed_tokens is not None:
|
||||
request_resumable = meta.get("resumable", False)
|
||||
if num_computed_tokens is not None and not request_resumable:
|
||||
meta["num_processed_tokens"] = int(num_computed_tokens)
|
||||
input_ids, input_embeds, update_dict = self.talker_preprocess_prefill(input_ids, input_embeds, payload)
|
||||
code_predictor_codes = torch.zeros(
|
||||
|
||||
@@ -893,12 +893,12 @@ class Qwen3TTSPromptEmbedsBuilder:
|
||||
|
||||
* ``talker_prompt``: ``[prompt_len, hidden]`` prefill embedding.
|
||||
* ``trailing_text_hidden``: ``[T, hidden]`` queue of text-side
|
||||
embeddings consumed one-per-decode-step (streaming mode) or a
|
||||
single pad row (non-streaming).
|
||||
embeddings consumed one-per-decode-step (streaming mode) or a
|
||||
single pad row (non-streaming).
|
||||
* ``ref_code_len``: Number of ref codec frames consumed when the
|
||||
Base task ran in in-context mode (``None`` otherwise).
|
||||
Base task ran in in-context mode (``None`` otherwise).
|
||||
* ``ref_code``: The ``[T, Q]`` ref codec tensor used for ICL
|
||||
(``None`` outside Base / ICL).
|
||||
(``None`` outside Base / ICL).
|
||||
"""
|
||||
config = self._config
|
||||
talker_config = self._talker_config
|
||||
|
||||
Reference in new issue
Block a user