Nodes/Qwen3-TTS - Voice Synthesis & Cloning/πŸ’¬ Qwen3-TTS DialogueInference
ComfyUI Node

πŸ’¬ Qwen3-TTS DialogueInference

Multi-role dialogue in one node

By flybirdxxΒ·Created 7 months agoΒ·Updated 3 months agoΒ· 1,874
πŸ’¬ Qwen3-TTS DialogueInference
  • role_bank
  • audio
β—„scriptRole1: Hello, how are you? Role2: I am fine, thank you.β–Ί
β—„model_choice1.7Bβ–Ί
β—„deviceautoβ–Ί
β—„precisionbf16β–Ί
β—„languageAutoβ–Ί
β—„pause_linebreak0.5β–Ί
β—„period_pause0.4β–Ί
β—„comma_pause0.2β–Ί
β—„question_pause0.6β–Ί
β—„hyphen_pause0.3β–Ί
β—„merge_outputstrueβ–Ί
β—„batch_size4β–Ί
β—„seed0β–Ί
β—„max_new_tokens_per_line2048β–Ί
β—„top_p0.80β–Ί
β—„top_k20β–Ί
β—„temperature1.0β–Ί
β—„repetition_penalty1.05β–Ί
β—„attentionautoβ–Ί
β—„unload_model_after_generatefalseβ–Ί

If you've ever pasted a chat transcript into a TTS node and manually chained a dozen clones to hear it out loud, this node exists to retire that workflow. DialogueInference takes a text script with roles, looks each role up in a RoleBank of cloned voices, and speaks the whole thing as one continuous audio clip - silence and all. It's the pack's answer to audiobook narration, podcast sketches, and roleplay scenes, and it's genuinely the node that makes Qwen3-TTS feel like more than a talking read-aloud box.

How it works

The script is plain text, one line per utterance, in RoleName: Text format (a Chinese full-width colon : works too):

Alice: Hey, are you coming to the party?
Bob: Only if there's cake.
Alice: There's always cake.

The role_bank input is a QWEN3_ROLE_BANK object produced by the pack's RoleBank node - a registry mapping names like "Alice" to their voice clone prompts. Lines whose role name isn't in the bank are silently skipped, so you can leave a narrator line out by not registering that role. Each line is split into segments on punctuation, and the pack inserts configurable silence after periods, commas, question marks, hyphens, and between lines (period_pause, comma_pause, question_pause, hyphen_pause, pause_linebreak - all in seconds). That's a small detail that makes the output sound like human conversation instead of a robot reading a phonebook. Generation is batched: batch_size (default 4) lines run in parallel per chunk - larger is faster but eats VRAM. merge_outputs on (default) concatenates everything into one long clip; off, you get the segments as a padded batch.

Inputs and outputs that matter

For a beginner, three things: the script, the role_bank, and model_choice. Everything else is either timing detail or the pack's standard sampling toolbox (seed, max_new_tokens_per_line, top_p/top_k/temperature/repetition_penalty, attention, unload_model_after_generate). There's no separate device/precision/language split here - device, precision, and language are right up in required - so set language once and forget it.

Output is a single audio (AUDIO) when merged, ready for any preview or save node.

Install

This ships in flybirdxx/ComfyUI-Qwen-TTS ("Qwen3-TTS - Voice Synthesis & Cloning"). Via ComfyUI Manager search "Qwen3-TTS", or:

cd ComfyUI/custom_nodes
git clone https://github.com/flybirdxx/ComfyUI-Qwen-TTS
cd ComfyUI-Qwen-TTS
pip install -r requirements.txt

Restart ComfyUI, then pin the dependency the README insists on - transformers 5.0+ breaks this pack:

pip install "transformers>=4.57.0,<5.0.0"   # e.g. transformers==4.57.3

Models auto-download into models/qwen-tts/ on first use; pre-fetch with python download_models.py if you don't want a surprise multi-GB pull mid-run.

Common issues

The most common failure is "No valid dialogue lines found matching Role Bank" - a role name in your script that doesn't exactly match a name in the bank. Match them character-for-character (case included). Second: because every voice here is a clone, the stuttery-clone problem that plagues Qwen3-TTS cloning will land on whichever role has a bad reference - fix it at the source by re-extracting that voice with clean reference audio and correct ref_text, not by editing the script. And if generation crawls or OOMs, drop batch_size to 1 or 2 and consider the 0.6B model.

CategoryQwen3-TTS

Inputs (21)

NameTypeDefaultDescription
scriptSTRINGRole1: Hello, how are you? Role2: I am fine, thank you.β€”
role_bankQWEN3_ROLE_BANKβ€”
model_choiceCOMBO1.7B2 options: 0.6B, 1.7B
deviceCOMBOauto5 options: auto, cuda, xpu, mps, cpu
precisionCOMBObf162 options: bf16, fp32
languageCOMBOAuto11 options: Auto, Chinese, English, Japanese, Korean, French, +5
pause_linebreakFLOAT0.50–5Silence duration between lines
period_pauseFLOAT0.40–5Silence duration after periods (.)
comma_pauseFLOAT0.20–5Silence duration after commas (,)
question_pauseFLOAT0.60–5Silence duration after question marks (?)
hyphen_pauseFLOAT0.30–5Silence duration after hyphens (-)
merge_outputsBOOLEANtrueMerge all dialogue segments into a single long audio
batch_sizeINT41–32Number of lines to process in parallel. Larger = faster but more VRAM.
seedoptINT00–18446744073709550000β€”
max_new_tokens_per_lineoptINT2048512–4096β€”
top_poptFLOAT0.800–1Nucleus sampling probability
top_koptINT200–100Top-k sampling parameter
temperatureoptFLOAT1.00.1–2Sampling temperature
repetition_penaltyoptFLOAT1.051–2Penalty for repetition
attentionoptCOMBOautoAttention implementation
unload_model_after_generateoptBOOLEANfalseUnload model from memory after generation

Outputs (1)

NameTypeDescription
audioAUDIOβ€”