Nodes/TTS Audio Suite/⚙️ IndexTTS-2 Engine
ComfyUI Node

⚙️ IndexTTS-2 Engine

Voice cloning with real emotion control

By diodiogod·Created about a year ago·Updated 21 days ago· 1,098
⚙️ IndexTTS-2 Engine
  • emotion_control
  • emotion_audio
  • TTS_engine
model_pathIndexTTS-2
deviceauto
emotion_alpha1.0
use_randomfalse
max_text_tokens_per_segment120
interval_silence200
temperature0.8
top_p0.80
top_k30
do_sampletrue
length_penalty0.0
num_beams3
repetition_penalty10.0
max_mel_tokens1500
use_fp16true
use_deepspeedfalse
use_cuda_kernelauto
use_torch_compilefalse
use_accelfalse
stream_returnfalse
more_segment_before0
low_vramfalse

IndexTTS-2 is the engine you pick when you care about how a line is delivered, not just what it says. Most TTS engines give you a voice and maybe a vague "expressiveness" slider. IndexTTS-2 lets you steer emotion directly - eight named emotions you can dial by hand, or an audio reference, or AI-analyzed emotion from the text itself, blended together in the model's conditioning space. For dialogue, character work, and anything where a flat read won't cut it, it's the standout in this pack. This node configures it and outputs a TTS_ENGINE for 🎤 TTS Text or 📺 TTS SRT.

It's a mid-size model (~4.7GB), covers English, Chinese, and Japanese, and clones a voice from a reference clip.

How it works

IndexTTS-2 conditions generation on both a speaker reference (the voice) and an emotion reference (the feeling), kept on separate paths so you can mix and match. That separation is the trick: you can clone Alice's voice but drive it happy, angry, or melancholic without needing a happy/angry/melancholic recording of Alice. The emotion side comes in through two optional inputs on this node, and emotion_alpha scales how much of it actually gets applied.

The inputs and outputs that matter

For a beginner, most of the required widgets are sampler internals you can ignore. The ones that matter:

  • emotion_alpha (0–2, default 1) - the master emotion intensity. 0 is neutral, 1 is normal, 2 is maximum drama. This is the single most useful dial on the node. If emotion sounds too strong or too weak, this is what you turn.
  • temperature (default 0.8), top_p (default 0.8), top_k (default 30) - standard sampling controls; defaults are fine.
  • repetition_penalty (default 10) - note this default is unusually high on purpose, to stop the model looping. Don't casually drop it to 1.

Then two optional inputs that are the whole point of IndexTTS-2:

  • emotion_control - takes an EMOTION_CONTROL from the 🌈 IndexTTS-2 Emotion Vectors node (manual 8-emotion sliders) or a text-emotion source. This is the "set the feeling by hand" path.
  • emotion_audio - takes any audio clip as an emotion reference; the model copies its emotional tone. You can feed a Character Voices opt_narrator here for per-character emotion references. Both can be used at once and get blended.

Advanced toggles like use_fp16 (on by default, saves VRAM), low_vram, use_cuda_kernel, and use_deepspeed are performance switches - leave them until you hit a memory wall, then flip low_vram. Output is a single TTS_engine.

Installing it

Comes with TTS Audio Suite. Easiest is ComfyUI Manager: search TTS Audio Suite, install, restart - Manager runs the pack's install.py, which handles the dependency conflicts (NumPy, librosa, s3tokenizer) and Python 3.13. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/diodiogod/TTS-Audio-Suite.git, then python install.py from inside the folder with your ComfyUI venv active (run the script, not just a requirements pip-install). Linux: sudo apt-get install portaudio19-dev libsamplerate0-dev first. The IndexTTS-2 model (~4.7GB, emotion components included) auto-downloads on first use into ComfyUI/models/TTS/IndexTTS/. There's a "🌈 IndexTTS-2 Integration" example workflow in the repo that wires the emotion inputs for you.

Common issues

  • Emotion isn't showing up. Check emotion_alpha first - at 0 you've muted it entirely. Then check that something is actually connected to emotion_control or emotion_audio; the node happily generates neutral speech with nothing plugged in.
  • Over-dramatic, warbly output. emotion_alpha too high, or an emotion audio reference that's very intense. Pull alpha back toward 1.
  • Looping or repeated words. That's what the high default repetition_penalty guards against - if you lowered it, put it back up.
  • VRAM errors. It's a 4.7GB model plus emotion components. Enable low_vram and keep use_fp16 on. Per-character emotion via [Character:emotion_ref] tags is powerful but multiplies the references the model juggles.
CategoryTTS Audio Suite/⚙️ Engines

Inputs (24)

NameTypeDefaultDescription
model_pathCOMBOIndexTTS-2IndexTTS-2 model selection: • local:ModelName: Use locally installed model (respects extra_model_paths.yaml) • ModelName: Auto-download model if not found locally • Downloads respect extra_model_paths.yaml configuration
deviceCOMBOautoDevice to run IndexTTS-2 model on: • auto: Automatically select best available (MPS on Apple Silicon, CUDA on NVIDIA, XPU on Intel, CPU fallback) • cuda: NVIDIA GPU (requires CUDA-capable GPU) • xpu: Intel GPU (requires Intel PyTorch XPU) • cpu: CPU-only processing (slower) • mps: Apple Metal Performance Shaders (Apple Silicon Macs only)
emotion_alphaFLOAT1.00–2Emotion intensity control (0.0-2.0). Affects emotion control from connected emotion nodes. 1.0=full emotion, 0.5=50% blend, 0.0=neutral.
use_randomBOOLEANfalseEnable random sampling for more varied generation. Can improve diversity.
max_text_tokens_per_segmentINT12050–300Maximum text tokens per segment. Longer segments may cause quality issues.
interval_silenceINT2000–1000Silence duration between segments in milliseconds.
temperatureFLOAT0.80.1–2Controls randomness. Higher values = more creative, lower = more consistent.
top_pFLOAT0.800.1–1Nucleus sampling threshold. Controls probability mass of tokens to consider.
top_kINT301–100Top-k sampling parameter. Lower values = more focused generation.
do_sampleBOOLEANtrueEnable sampling for generation. Disable for deterministic output.
length_penaltyFLOAT0.0-2–2Length penalty for beam search. Positive values favor longer sequences.
num_beamsINT31–10Number of beams for beam search. Higher values = better quality but slower.
repetition_penaltyFLOAT10.01–20Penalty for repeated tokens. Higher values reduce repetition.
max_mel_tokensINT1500500–3000Maximum mel-spectrogram tokens to generate. Controls output length limit.
use_fp16BOOLEANtrueUse FP16 for faster inference. Disable if you encounter numerical issues.
use_deepspeedBOOLEANfalseUse DeepSpeed optimization. Requires DeepSpeed installation.
emotion_controlopt*Vector/text emotion control (legacy unified input): • 🌈 Emotion Vectors - Manual emotion control sliders • 🌈 Text Emotion - AI-analyzed emotion from text Connect audio separately to 'emotion_audio' when you want to blend both. Character emotion tags [Alice:emotion_ref] can provide per-segment audio emotion.
emotion_audioopt*Dedicated emotion-reference audio input. Connect Character Voices, opt_narrator, or AUDIO here. This can be connected together with the vector/text emotion input above; IndexTTS-2 blends both.
use_cuda_kerneloptCOMBOautoUse BigVGAN CUDA kernels for faster vocoding. Auto-detects availability.
use_torch_compileoptBOOLEANfalseEnable torch.compile optimization for S2Mel mel-spectrogram generation stage. Provides 1.5-2x speedup. Requires a compatible PyTorch version and Triton on CUDA systems (triton-windows on Windows).
use_acceloptBOOLEANfalseEnable GPT2 acceleration with FlashAttention and KV-cache optimization. Provides 1.5-3x speedup for GPT2 stage. REQUIRES: flash-attn library (pip install flash-attn)
stream_returnoptBOOLEANfalseEnable streaming mode for low-latency audio generation. Returns generator yielding audio chunks instead of complete file.
more_segment_beforeoptINT00–80Streaming segmentation parameter. Higher values produce first audio chunk faster but may affect quality. Only used when stream_return is enabled. Recommended: 0-20.
low_vramoptBOOLEANfalseEnable Low VRAM mode. Keeps models on CPU and only moves them to GPU when needed. Prevents OOM on 8GB cards but is slower.

Outputs (1)

NameTypeDescription
TTS_engineTTS_ENGINE