--- license: other license_name: index-model-license license_link: https://github.com/index-tts/index-tts2/blob/main/INDEX_MODEL_LICENSE library_name: mlx tags: - mlx - text-to-speech - tts - emotion-control - duration-control base_model: IndexTeam/IndexTTS-2 pipeline_tag: text-to-speech --- # IndexTTS-2 (MLX, fp16) MLX conversion of [IndexTeam/IndexTTS-2](https://huggingface.co/IndexTeam/IndexTTS-2) — zero-shot voice-cloning TTS with **decoupled emotion control** and **duration control** (22.05 kHz output). Consolidated single-repo weight set for the Swift-MLX port [`xocialize/mlx-indextts2-swift`](https://github.com/xocialize/mlx-indextts2-swift) (an MLXEngine `tts` package; also loadable by [solar2ain/mlx-indextts](https://github.com/solar2ain/mlx-indextts), whose conversion lineage these weights follow — thanks to `vanch007/mlx-indextts2-standard-fp16`). ## Contents | File | Component | Dtype | |---|---|---| | `gpt.safetensors` | UnifiedVoice v2 GPT AR (text→semantic) + conformer/perceiver conditioners | fp16 | | `s2mel.safetensors` | S2Mel flow-matching (DiT/WaveNet/length-regulator) | fp16 | | `bigvgan.safetensors` | BigVGAN v2 vocoder | fp16 | | `vq2emb.safetensors` | Semantic-code embedding | fp16 | | `model.safetensors` | w2v-BERT 2.0 conditioning front-end | fp32 (as upstream) | | `semantic_codec/model.safetensors` | MaskGCT RepCodec semantic codec | fp32 | | `campplus.safetensors` | CampPlus DTDNN speaker embedding (192-d) | fp32 | | `emotion_matrices.safetensors` | 8-emotion preset matrices (`emo_matrix` 73×1280, `spk_matrix` 73×192) | fp32 | | `tokenizer.model` / `config.yaml` / `config.json` | SentencePiece Unigram (12k) + resolved config | — | int8/int4 tiers are produced **in-memory** by the Swift package (GPT transformer Linears, group 64) — no separate quantized repos. ## Parity The Swift port is phase-gated against a captured oracle: tokenizer bit-exact; GPT latent cos 0.9999995; conditioners ≥0.999999; CFM mel 0.9999999; vocoder at the reference's own CPU↔Metal precision floor; end-to-end waveform reproduces the reference render (spectral cos 0.9998, −23.0 dBFS vs −23.2). Emotion (`emoAlpha`) and exact `targetDuration` were validated live through MLXServeEngine. ## License **Weights: NonCommercial** — the INDEX_MODEL_LICENSE requires written authorization from bilibili for commercial use. Port/inference code is Apache-2.0 / MIT (see the source repos).