Skip to content

bug(tts): TTS_MODEL_ID is never passed to the loader — the configured kani-tts-2 is pre-downloaded but a different model always runs #19734

Open
1 of 1 issue completed

Description

@mrveiss

Problem

The TTS worker's configured model is never used. TTS_MODEL_ID defaults to liquid-ai/kani-tts-2 (tts-worker defaults :22), but TTSModel.load_model() takes no model id (tts-worker.py.j2:214), so a different built-in model always loads.

On the audited host, kani-tts-2 is not cached, the other model is cached, and TTS works. The setting is a dead label: changing it changes nothing, and the predownload task fetches a model that never loads.

Fix

Pass the configured id through to the loader, or remove the setting if the engine only supports its built-in voice model. Either way, the default named in config is the model that actually runs, and the predownload fetches that model.

Acceptance criteria

  • The model that loads is the one TTS_MODEL_ID names. A test asserts the loader receives it.
  • The predownload task fetches exactly the model that loads.
  • Host: the worker's startup log names the loaded model, and it matches config.

Activity

  1. mrveiss commented on Nov 1, 2026

    @mrveiss
    OwnerAuthor

    Read from the installed engine on the local install: pocket_tts.TTSModel.load_model(language, config, temp, sampler_decode_steps, noise_clamp, eos_threshold, quantize, checkpoint, lsd_decode_steps). It takes no model id, and the cache on that host holds models--kyutai--pocket-tts-without-voice-cloning, with no kani model. So liquid-ai/kani-tts-2 can never be what this engine runs, and passing the id through is not an option; the issue's other branch applies.

    The setting still does two things that have to be handled together:

    • _is_gated_model(TTS_MODEL_ID) decides whether the worker reads degraded and whether a token is demanded, so a gated-looking default can report a problem about a model that never loads.
    • The predownload skips when that prefix is gated and no token is set, so on a default install it may fetch nothing.

    Whether checkpoint could load another Pocket TTS model was not tested.

  2. mrveiss commented on Nov 3, 2026

    @mrveiss
    OwnerAuthor

    Checked on main at 6f8c8d9 after PR #20506 landed in merge train #20715 (merge 6f8c8d9f82). 1 of 3 criteria delivered; stays open.

    Criterion (verbatim) Evidence Status
    "The model that loads is the one TTS_MODEL_ID names. A test asserts the loader receives it." The issue's second branch was taken: the setting now names the engine's own model, tts_model_id: "kyutai/pocket-tts" (autobot-slm-backend/ansible/roles/tts-worker/defaults/main.yml:23, comment :19-20 says it does not choose a model), and the worker logs it as "configured" (tts-worker.py.j2:220). The criterion's test half cannot be met as worded, because TTSModel.load_model() takes no model id (tts-worker.py.j2:214). Whether kyutai/pocket-tts matches the checkpoint that actually loads (a host cache earlier held kyutai/pocket-tts-without-voice-cloning) is a host fact. ❌ open: needs the maintainer to accept the rewording, plus host evidence
    "The predownload task fetches exactly the model that loads." templates/predownload-model.py.j2:39 and templates/tts-worker.py.j2:214 both call TTSModel.load_model() with no arguments; the default kyutai/pocket-tts is no longer under a gated prefix (GATED_PREFIXES, predownload :20), so a default install no longer skips the predownload. Test repo_tests/tts_model_config_names_what_runs_19734_test.py::test_worker_and_predownload_load_the_same_way and test_the_default_is_not_treated_as_gated_in_either_place. ✅ ticked
    "Host: the worker's startup log names the loaded model, and it matches config." Host behaviour; a merge is not host evidence. Needs the worker's startup log after a builtin update to 6f8c8d9f82 or later. ❌ open

    Follow-up filed: #20759 (the loader check in the test matches comments and strings and has no negative fixture).

  3. removed
    phase:M1.4Wizard and SLM: choose a mode, apply it, default models work
    on Nov 12, 2026
  4. added this to the M7 - Voice milestone on Nov 12, 2026
  5. mrveiss commented on Nov 20, 2026

    @mrveiss
    OwnerAuthor

    Branch issue-19734-tts-model (PR #20506, head d02599e) was deleted as a zero-change branch: its content is already on main.

    Left unticked:

    • AC1: not met as written. roles/tts-worker/templates/tts-worker.py.j2:214 still calls TTSModel.load_model() with no model id, and no test asserts the loader receives TTS_MODEL_ID. The default is now kyutai/pocket-tts (roles/tts-worker/defaults/main.yml:26), which is the engine's built-in model, so config and behaviour agree by default, but changing the setting still changes nothing. Needs either the id passed through (with the test) or the setting removed.
    • AC3: host evidence (startup log naming the loaded model).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions