Nodes/IndexTTS2-PauseControl/IndexTTS 批量生成
ComfyUI Node

IndexTTS 批量生成

Batch TTS with resumable rounds and a manifest

By lynx-gt·Created about a month ago·Updated about a month ago· 4
IndexTTS 批量生成
  • model
  • task_dir
  • manifest_path
  • progress
segments_md
text
spk_ref
emo_strategy固定
emo_ref
emo_dir
rounds3
tag批量生成
output_dir
start0
end0
auto_pausetrue
whisper_modelbase
pause_modefalse
seed-1
temperature0.60
top_p0.80
top_k20
num_beams4
do_sampletrue
repetition_penalty10.0
emo_alpha0.75
speaking_speed1.0
interval_silence400

IndexTTSSingle is for one take. IndexTTSBatch is for the other end of the scale: a full script, a chapter, a whole audiobook, done in one run and safe to interrupt. It's the pack's production workhorse - it takes a Markdown script (or plain lines of text), generates several candidate takes per segment, writes everything to disk with a manifest, and lets you re-run to resume instead of starting over. If you're dubbing anything longer than a paragraph, this is the node you build the workflow around.

Feed it text

Two ways in, pick one:

  • segments_md - a file path to a Markdown script. The format is pleasantly structured: an optional YAML header (story, voice_ref, emotion_base, emotions, speaking_speed, max_text_tokens_per_segment), then one # 片段 N [role / emotion] heading per segment followed by its text. The [pause:N] markers carry through verbatim, and if a segment has an <!-- 处理后: ... --> comment, that content wins. The emotion tag in the heading feeds emotion-reference selection.
  • text - no file? Just type the script with one line per segment.

One sentence per segment is the recommended rhythm - period pauses stay uniform via interval_silence (default 400ms, the same fix as the single node), and you override individual ones with markers.

What you'll actually set

  • pause_mode - same switch as IndexTTSSingle, and yes, same rule: off means [pause:N] gets spoken out loud. On this node it also skips the old whisper-based post-processing path entirely (the new waveform method does it inside infer), which means you don't need a whisper model installed for the current path.
  • rounds - how many candidate takes per segment, 1–10, default 3. Output files look like 001_1.wav, 001_2.wav, 001_3.wav - segment 001, rounds 1–3. Rounds exist because TTS is stochastic; with rounds=3 you almost always get a take where every marker hits.
  • spk_ref - the voice reference audio, same as the single node.
  • seed - fixed seed reproduces takes; at -1, each round's actual seed is written next to its wav as a .seed file so you can pin a winner later.
  • start / end - filter to a segment range, handy for re-running just the back half.
  • emo_strategy - 固定 (fixed) or 目录随机 (random per directory) for picking emotion references, with emo_ref / emo_dir as the sources. Only interesting if you're doing character work.
  • tag and output_dir - name the task and/or force where files land.

The sampling stack (temperature, top_p, top_k, num_beams, etc.) is the same set with the same sane defaults as the single node. Don't touch them until you have a reason.

How the plumbing works

Each run produces a task directory, default ComfyUI/output/<tag>_<timestamp>/. Inside: the wavs, the .seed files, and a manifest.json that records every parameter plus per-segment, per-round seeds, durations, and acceptance marks. The manifest is written after every round, which is what makes resume real: re-run the node with the same task directory and completed rounds are skipped. Change a parameter and the manifest's hash mismatches, so it rebuilds cleanly instead of silently mixing old and new audio. That's the difference between a batch tool and a script someone wrote on a Tuesday.

You get three outputs: task_dir (feed it straight into IndexTTSListen), manifest_path, and progress (a summary string like "任务完成:5/5 段").

Wiring

The production loop the pack is built around:

IndexTTSLoader → IndexTTSBatch (pause_mode on, rounds=3) → IndexTTSListen → PreviewAudio×3

Troubleshooting

  • "没有可用的文本" (no usable text) - the script path was invalid and the text box was empty. Fix one of them.
  • A pause is off in one segment - don't rerun the batch. IndexTTSFix edits a single wav's pauses directly, and IndexTTSListen can mark a good round as accepted so downstream nodes know which take won.
  • Long single sentence, multiple markers, one misses - the by-character-proportion estimation drifts past 40 chars. Change the seed or lean on rounds and pick the winning take. The README's stress data says 3 rounds usually contains a clean one.
CategoryIndexTTS

Inputs (25)

NameTypeDefaultDescription
modelINDEXTTS_MODEL
segments_mdSTRING
textSTRING
spk_refSTRING
emo_strategyCOMBO固定2 options: 固定, 目录随机
emo_refSTRING
emo_dirSTRING
roundsINT31–10
tagSTRING批量生成
output_dirSTRING
startINT0
endINT0
auto_pauseBOOLEANtrue
whisper_modelSTRINGbase
pause_modeBOOLEANfalse开启 [pause:N] 全波形精确停顿(infer 内部处理,免 whisper 后处理;开启后 auto_pause 后处理自动跳过)
seedINT-1-1–9223372036854776000
temperatureFLOAT0.600.01–2
top_pFLOAT0.800.01–1
top_kINT200–200
num_beamsINT41–8
do_sampleBOOLEANtrue
repetition_penaltyFLOAT10.01–30
emo_alphaFLOAT0.750–1
speaking_speedFLOAT1.00.5–2
interval_silenceINT4000–2000段间插入静音(ms):每段结束到下一段开始的固定停顿

Outputs (3)

NameTypeDescription
task_dirSTRING
manifest_pathSTRING
progressSTRING