[Core] Defer generation payload host waits to output consumption (#8540)

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
This commit is contained in:
amy-why-3459 authored and GitHub committed 2026-10-07 17:20:54 +08:00
1 parent d5a3380103
commit de253412b0
8 files changed
+350 -11

No files matched your search

@@ -1109,3 +1109,14 @@ def test_request_conditioning_reaches_code2wav_with_true_prompt_length():
assert call["prompt_token"].shape == (1, 2)
assert call["prompt_feat"].shape == (1, 4, 80)
assert output.multimodal_outputs
@pytest.mark.parametrize("stage", ["cosyvoice3_talker", "cosyvoice3_code2wav"])
@pytest.mark.parametrize("owned", [False, True])
def test_generation_output_ownership_is_exposed_only_for_owned_codec(stage, owned):
model = object.__new__(CosyVoice3Model)
nn.Module.__init__(model)
model.model_stage = stage
if stage == "cosyvoice3_code2wav":
model.code2wav = SimpleNamespace(owns_generation_output_storage=owned)
assert model.owns_generation_output_storage is (stage == "cosyvoice3_code2wav" and owned)