IndexTTS 2.5 TensorRT

TensorRT engines of IndexTTS 2.5, made by Moonbox for NVIDIA RTX GPUs. Each precision is one folder holding the engine, trt_runner.py (a small numpy runner: TensorRT plus Polygraphy, no PyTorch) and a script that does the rest of the pipeline. What the engine takes and returns is under How to run.

Compatibility. The engines are built hardware compatible (Ampere and newer: RTX 30, 40 and 50 series) and version compatible (any TensorRT 10.x from 10.13 on, through its lean runtime). That costs a little speed against an engine built for one GPU, but no rebuild is needed. Install the runtime with pip install "tensorrt-cu12>=10.13,<11" "tensorrt-lean-cu12>=10.13,<11" polygraphy numpy.

Files

The last column is the benchmark (details under How to run).

Precision File Size sha256 Benchmark
fp16 fp16/campplus.engine 141.1 MB 280752169674 WER 0.45 % / CER 0.5 % (ONNX fp16 0.15 / 0.0), similarity 0.955 / 0.637 (0.956 / 0.630), DNSMOS 3.20 / 3.12 (3.13 / 3.11); RTF 0.65 (ONNX fp16 1.16)
fp16 fp16/codec.engine 121.8 MB 4678285e3b22 (the same build: numbers in its first row)
fp16 fp16/decoder_0.engine 624.6 MB f26e98a3e7f5 (the same build: numbers in its first row)
fp16 fp16/decoder_1.engine 483.9 MB b940b21c57af (the same build: numbers in its first row)
fp16 fp16/decoder_split.json 4.5 kB 4b85ed54346c (the same build: numbers in its first row)
fp16 fp16/device_chain.py 8.3 kB e675d2e7e2d1 (the same build: numbers in its first row)
fp16 fp16/embed.engine 70.0 MB ffb0392830f7 (the same build: numbers in its first row)
fp16 fp16/emovec.engine 390.5 MB 9098af3fde2f (the same build: numbers in its first row)
fp16 fp16/estimator.engine 447.3 MB e1378c96f7b4 (the same build: numbers in its first row)
fp16 fp16/estimator_long.engine 446.1 MB 7bb62de8715d (the same build: numbers in its first row)
fp16 fp16/pipeline.py 23.9 kB 018ab5b8adcf (the same build: numbers in its first row)
fp16 fp16/pipeline_trt.py 6.6 kB 916887236700 (the same build: numbers in its first row)
fp16 fp16/prefix.engine 201.7 MB ffed4ed1bdcd (the same build: numbers in its first row)
fp16 fp16/regulator.engine 66.3 MB 8f704a229ff3 (the same build: numbers in its first row)
fp16 fp16/semantic.engine 947.6 MB 7cddb50666e8 (the same build: numbers in its first row)
fp16 fp16/tokenizer.json 36.1 kB ed8d69e9e670 (the same build: numbers in its first row)
fp16 fp16/tokenizer.tiktoken 0.9 MB 747979631e81 (the same build: numbers in its first row)
fp16 fp16/trt_runner.py 4.4 kB cbc9abb1f59c (the same build: numbers in its first row)
fp16 fp16/vocoder.engine 569.6 MB 24d2fb18d0c2 (the same build: numbers in its first row)

How to run

Any modifications made to the original model in this Derivative Work are not endorsed, warranted, or guaranteed by the original right-holder of the original model, and the original right-holder disclaims all liability related to this Derivative Work. These files are a Derivative Work of bilibili's IndexTTS-2.5 and are distributed under the bilibili Model Use License Agreement, copied in this repository as LICENSE. By using them you accept that agreement, and its terms bind you as a downstream recipient (section 3.4a). In particular:

  • If your or your affiliates' products or services had more than 100 million monthly active users in the preceding calendar month, or annual revenue above RMB 1 billion in the preceding calendar year, you need a separate license from bilibili before any use (section 2.2).
  • You may not use the model or any Derivative Work to improve any other AI model, except IndexTTS itself, its Derivative Works or non-commercial AI models (section 3.4c).
  • Keep the copyright notices and a copy of the agreement in every copy (section 3.4b). Do not deploy in the high-risk settings of section 4.2, and comply with section 4.1 and the publisher's DISCLAIMER: no synthesis of political or public figures or of anyone's voice without authorisation, and no fraud or impersonation.

IndexTTS-2.5 (IndexTeam / bilibili: zero-shot voice cloning from a few seconds of reference audio, Chinese, English and more, 22.05 kHz output) as TensorRT engines built from this model's fp16 ONNX graphs, plus pipeline_trt.py. The pipeline is the ONNX build's pipeline.py (the official IndexTTS2.infer_generator(spk_audio_prompt, text, lang, text_normalization=False) at index-tts @d9e41aa: 3-beam sampling, 25 flow steps with CFG 0.7) with every graph run as engines.

python fp16/pipeline_trt.py "The quick brown fox jumps over the lazy dog." out.wav --ref voice.wav --lang en --seed 0
import sys, soundfile as sf
sys.path.insert(0, "fp16")
from pipeline_trt import IndexTTS25Trt
tts = IndexTTS25Trt("fp16")
ref, sr = sf.read("voice.wav", dtype="float32")
wav, out_sr = tts("Text to say.", ref, sr, "en", seed=0)       # 22.05 kHz

It needs numpy, tiktoken, soundfile, soxr, TensorRT 10.13 (tensorrt-cu12 or tensorrt-lean-cu12) and Polygraphy. No PyTorch and no ONNX Runtime. The engines are version-compatible and built for Ampere or newer GPUs (RTX 30-series and up). They hold 4.5 GB, and the benchmark's process peaked at 9.7 GB of memory, GPU memory included. What the ONNX build leaves out is left out here too: the official text normalisation (pass written-out text), the Japanese and Spanish frontends, emotion control and the duration factor. Sampling uses numpy's generator, so a seed gives the same speech every run here, not the same speech as PyTorch with that seed.

The engines. Together they compute the ONNX fp16/ graphs, with the changes under Precisions.

  • decoder_0..1.engine: the 24-layer GPT-2 that writes the speech tokens: inputs_embeds [B, S, 1280], beam_idx [B], past_key_values.{0..23}.key / .value [B', 20, P, 64] (fp16) -> logits [B, 8194] and present.*. The cache is reordered for the beams inside the engine. decoder_split.json gives the order of the pieces and the tensors passed between them. The decoder is cut into pieces of at most 0.7 GB of weights, so that each engine builds within the build machine's memory.
  • semantic, emovec, campplus, prefix, embed, codec, regulator.engine: as the ONNX graphs of those names.
  • estimator.engine / estimator_long.engine: the s2mel diffusion transformer, for flows up to 2,048 mel frames and from 2,048 to 4,096. The long one is loaded only when a flow needs it: its attention keeps 3.5 GB of working memory.
  • vocoder.engine: BigVGAN, run in windows of 512 mel frames with 64 frames of context on each side, whose audio is dropped. Its output is local: on the CPU the windows give one whole pass's samples exactly. Built for whole utterances it needed 16 GB to build.

Limits. A text segment up to 160 ids (pipeline.py splits text at 120 tokens). Up to 800 speech tokens a segment (32 s), and a segment's flow (the reference's first 15 s plus the segment) up to 4,096 mel frames: a segment's speech tokens stop where its flow would pass that. With a 15 s reference that leaves about 32 s a segment; long text is split into segments anyway.

On the GPU. The pipeline (device_chain.py) keeps the decoder's KV cache on the GPU: each step reads one set of buffers and writes the longer, reordered cache into the other, so a step allocates nothing. The activations between the decoder's pieces never leave the GPU, and the pieces share one working-memory buffer.

Precisions. fp16/ is strongly typed: every tensor keeps the precision the ONNX graph gives it (the flow estimator and the vocoder fp32, the rest fp16), with these changes:

  • every fp16 LayerNormalization and softmax is computed in fp32, as ONNX Runtime's kernels compute them;
  • the decoder's KV cache is fp16 at its inputs and outputs too (exact: the graph computes it in fp16);
  • regulator.engine is built weakly typed: built strongly typed, its fp16 engine faults on odd lengths (CUDA error
    1. in TensorRT 10.13.

No int8: TensorRT's int8 needs calibrated activations, and the ONNX int4/ build is weight-only MatMulNBits, which TensorRT doesn't take.

Each engine was checked against its ONNX graph on one clip's real inputs (signal-to-noise ratio of the outputs):

  • the decoder, teacher-forced over 30 beam steps: 51-53 dB, the same top token on every step;
  • the other engines: 45-77 dB.
  • The vocoder: 84 dB from ONNX Runtime on the CPU. ONNX Runtime's CUDA vocoder is 14.7 dB from its own CPU result, so the engine is closer to the graph than the CUDA run is.

Benchmark.

  • Setup: the ONNX build's benchmark. The lab's TTS set: 6 English sentences cloned from a LibriSpeech test-clean prompt and 4 Chinese sentences from an AISHELL-1 prompt, each with seeds 0-7 (80 clips per build), the original's sampling. RTX 3080 Laptop GPU, whole pipeline.
  • Score: sampled speech can't be compared sample by sample, so each build is judged as the original is. Whisper large-v3-turbo's WER (English) or CER (Chinese) against the text, WavLM-base-plus-sv speaker similarity to the prompt, and DNSMOS (P.835 overall). Real-time factor is processing time / audio time.
  • Pass mark (set before the first run): against the ONNX fp16 build, per language, error rate at most 2 points higher, similarity at most 0.03 lower, DNSMOS at most 0.2 lower.
English WER similarity DNSMOS Chinese CER similarity DNSMOS Real-time factor
ONNX fp16/ (ONNX Runtime CUDA) 0.15 % 0.956 3.13 0.0 % 0.630 3.11 1.16
TensorRT fp16/ 0.45 % 0.955 3.20 0.5 % 0.637 3.12 0.65

The original (PyTorch fp32) scores 0.3 % / 0.963 / 3.13 and 0.0 % / 0.652 / 3.04 on the same set. The engines load on first use, so the first clip's time includes the loading.

How these were made

From IndexTTS 2.5 at revision c39ce5ba98: each engine was built with TensorRT's builder from Moonbox's published ONNX graph of the same model and precision. The network is strongly typed: every tensor keeps the precision the ONNX graph gives it, so an fp16 engine computes what the fp16 ONNX build computes. Built on an RTX 3080 Laptop GPU, it was benchmarked against the original before upload, and the sha256 column above is what the files must hash to.

License

other (bilibili custom license). These files are a derivative of the original model and carry its license: it is copied in this repository, and it governs your use of these files. The original model card follows unchanged.


Original model card

IndexTTS-2.5

IndexTTS-2.5 is a zero-shot text-to-speech model that clones a voice from a single reference audio clip. It supports Chinese, English, Japanese, Spanish and Arabic, with cross-lingual voice transfer and emotion control disentangled from timbre.

Compared with IndexTTS-2, it adds Japanese, Spanish and Arabic, infers faster, adds speaking speed control, and improves controllability of Chinese Pinyin, English CMU phonemes and Japanese Kana.

Model Details

Getting Started

Requires Python 3.10–3.11, an NVIDIA GPU, and roughly 6 GB of VRAM for inference.

Install

git clone https://github.com/index-tts/index-tts.git && cd index-tts
pip install -U uv
uv sync --all-extras

Download the weights

# HuggingFace
uv tool install "huggingface-hub"
hf download IndexTeam/IndexTTS-2.5 --local-dir=checkpoints

# or ModelScope
uv tool install "modelscope"
modelscope download --model IndexTeam/IndexTTS-2.5 --local_dir checkpoints

Auxiliary models (w2v-bert-2.0, MaskGCT semantic codec, CAMPPlus, BigVGAN) are not part of this repository; they are downloaded into checkpoints/hf_cache/ on first run.

Inference

from indextts.infer_v2_5 import IndexTTS2

tts = IndexTTS2(cfg_path="checkpoints/config.yaml", model_dir="checkpoints", use_bf16=True)

# Voice cloning
tts.infer(
    spk_audio_prompt="prompt.wav",
    text="Hello, this is a voice cloning demo.",
    lang="EN",
    output_path="output.wav",
)

# Emotion control with an 8-float vector, in the order
# [happy, angry, sad, afraid, disgusted, melancholic, surprised, calm]
tts.infer(
    spk_audio_prompt="prompt.wav",
    text="快躲起来!是他要来了!",
    lang="ZH",
    output_path="output.wav",
    emo_vector=[0, 0, 0.8, 0, 0, 0, 0, 0],
)

# Pronunciation control: Pinyin, CMU phonemes, or Kana in <word|reading> form
tts.infer(
    spk_audio_prompt="prompt.wav",
    text="他在银<行|XING2>里<行|HANG2>走了半天。",
    lang="ZH",
    output_path="output.wav",
)

# Speaking speed: >1.0 slows down, <1.0 speeds up (valid range 0.5–2.0)
tts.infer(
    spk_audio_prompt="prompt.wav",
    text="大家好,欢迎来到IndexTTS。",
    lang="ZH",
    output_path="output.wav",
    duration_factor=1.2,
)

Web UI

uv run webui.py

Limitations

  • Long text is split into segments and the pieces are concatenated with a short silence, so prosody is not modelled across a segment boundary.
  • Emotion control from a text description needs the QwenEmotion model, which is loaded only when IndexTTS2 is constructed with use_qwen_emo=True. Passing use_emo_text=True without it raises at inference time.
  • Enabling random sampling for emotion (use_random=True) reduces voice cloning fidelity.
  • The model does not verify that the speaker in a reference clip consented to being cloned. Obtaining that consent is the user's responsibility, and all use is subject to the license terms.

Citation

@misc{li2026indextts25technicalreport,
      title={IndexTTS 2.5 Technical Report},
      author={Yunpei Li and Xun Zhou and Jinchao Wang and Lu Wang and Yong Wu and Siyi Zhou and Yiquan Zhou and Yining Wang and Yaogen Yang and Zhetao Hu and Shiyao Duan and Jiacheng Xu and Bin Xia and Jingchen Shu},
      year={2026},
      eprint={2601.03888},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2601.03888},
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for moonbox-dev/IndexTTS-2.5-TensorRT

Quantized
(5)
this model

Paper for moonbox-dev/IndexTTS-2.5-TensorRT