From d5f1e20c08712f5124bf3c65d021a50fddb645a4 Mon Sep 17 00:00:00 2001 From: Pascal Date: Mon, 11 May 2026 18:27:06 +0200 Subject: [PATCH] pipeline: zero-init qenc_host_ready, value-init PipelineTTS The lazy-init flag started on stack garbage. When non-zero the encode path skipped the codebook load and silently returned empty RVQ codes. --- src/pipeline-codec.cpp | 5 +++-- tools/qwen-tts.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pipeline-codec.cpp b/src/pipeline-codec.cpp index a36aa96..b31ff39 100644 --- a/src/pipeline-codec.cpp +++ b/src/pipeline-codec.cpp @@ -19,8 +19,9 @@ #include bool pipeline_codec_load(PipelineCodec * pc, const char * gguf_path, BackendPair bp) { - pc->bp = bp; - pc->backend = bp.backend; + pc->bp = bp; + pc->backend = bp.backend; + pc->qenc_host_ready = false; if (!gf_load(&pc->gguf, gguf_path)) { qt_log(QT_LOG_ERROR, "[Pipeline] failed to load %s", gguf_path); diff --git a/tools/qwen-tts.cpp b/tools/qwen-tts.cpp index 24562b4..4bfbbc8 100644 --- a/tools/qwen-tts.cpp +++ b/tools/qwen-tts.cpp @@ -209,7 +209,7 @@ static bool parse_args(int argc, char ** argv, Args & a) { static int run(const Args & a) { BackendPair bp = backend_init("Talker"); - PipelineTTS pt; + PipelineTTS pt = {}; if (!pipeline_tts_load(&pt, a.model, a.codec, bp)) { backend_release(bp.backend, bp.cpu_backend); return 1;