mudler/LocalAI · error

[qwen3-tts-cpp] ERROR: model not loaded\n

Error message

[qwen3-tts-cpp] ERROR: model not loaded\n

What it means

A synthesis request arrived before the model finished loading. Guard: track loaded state in the backend and reject inference requests with a FailedPrecondition-style error until LoadModel completes.

Source

Thrown at backend/go/qwen3-tts-cpp/cpp/goqwen3ttscpp.cpp:105

    if (top_k > 0)
        tp->top_k = top_k;
    if (top_p > 0.0f)
        tp->top_p = top_p;
    if (repetition_penalty > 0.0f)
        tp->repetition_penalty = repetition_penalty;
    if (max_new_tokens > 0)
        tp->max_new_tokens = max_new_tokens;
}

float *qt3_tts(const char *text, const char *lang, const char *instruct,
               const char *speaker, const float *ref_samples, int ref_n,
               const char *ref_text, long long seed, float temperature,
               int top_k, float top_p, float repetition_penalty,
               int max_new_tokens, int *out_n) {
    if (out_n)
        *out_n = 0;
    if (!g_ctx) {
        fprintf(stderr, "[qwen3-tts-cpp] ERROR: model not loaded\n");
        return nullptr;
    }
    if (!text || text[0] == '\0') {
        fprintf(stderr, "[qwen3-tts-cpp] ERROR: text is required\n");
        return nullptr;
    }
    qt_tts_params tp;
    fill_params(&tp, text, lang, instruct, speaker, ref_samples, ref_n,
                ref_text, seed, temperature, top_k, top_p, repetition_penalty,
                max_new_tokens);

    qt_audio out = {0};
    enum qt_status rc = qt_synthesize(g_ctx, &tp, &out);
    if (rc != QT_STATUS_OK || out.n_samples <= 0 || !out.samples) {
        fprintf(stderr, "[qwen3-tts-cpp] ERROR: synthesize failed (rc=%d): %s\n",
                (int)rc, qt_last_error());
        qt_audio_free(&out);
        return nullptr;

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Load the model first (LoadModel request) before requesting synthesis.
  2. Check earlier logs for a failed model load that left the backend uninitialized.

When it happens

Trigger: Thrown at backend/go/qwen3-tts-cpp/cpp/goqwen3ttscpp.cpp:105 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15). Data as JSON: /api/errors/6c2276ef2e9fc1e2. Report an issue: GitHub.