Skip to content

vllm_omni.model_executor.models.indextts2.prompt_utils

Prompt helpers for IndexTTS2 talker prefill.

build_indextts2_prefill_prompt_ids

build_indextts2_prefill_prompt_ids(
    model_id_or_path: str,
    text: str,
    *,
    placeholder_token_id: int = 1,
) -> list[int]

estimate_indextts2_prefill_prompt_len

estimate_indextts2_prefill_prompt_len(
    model_id_or_path: str, text: str
) -> int

Return the placeholder prompt length expected by the IndexTTS2 talker.

The model-side prefill replaces placeholder embeddings with: 34 conditioning tokens, text tokens wrapped with start/stop markers, and one start-mel token.