Nodes/ComfyUI-DiaTTS/Dia TTS Generate
ComfyUI Node

Dia TTS Generate

Dia TTS in ComfyUI

By BobRandomNumber·Created about a year ago·Updated 7 months ago· 7
Dia TTS Generate
  • dia_model
  • audio_prompt
  • audio
text
max_tokens1720
cfg_scale3.0
temperature1.30
top_p0.95
cfg_filter_top_k32
speed_factor0.94
seed0

You've built the talking head, the animated scene, the video - and then you hit the wall: it needs an actual voice, and not a flat narration bot. This node is the reason you can keep that whole pipeline inside ComfyUI. DiaGenerate is the generation half of BobRandomNumber's ComfyUI-DiaTTS, a wrapper around Nari-Labs' Dia 1.6B text-to-speech model. The name is slightly off: Dia isn't an assistant-style TTS that reads anything you throw at it. It's a dialogue model, built for podcast-style multi-speaker audio. Give it [S1] and [S2] speaker tags and it hands back a scene with two distinct voices.

That's its superpower and its limit at the same time. If you want an audiobook narrator, Dia is the wrong tool - the community consensus at launch was basically "great for dialogue, and if you want one polished voice there are better single-speaker models." But if you want two characters arguing in one pass, nothing else in the ComfyUI audio scene lands quite like it. And it's fully local: no API, no key, no upload of your scripts.

How it works. DiaGenerate takes the dia_model object from DiaLoader and runs an autoregressive transformer decoder. Your text gets byte-tokenized (UTF-8 bytes, with [S1]/[S2] swapped for control tokens), and the decoder predicts audio codec tokens step by step using classifier-free guidance - the cfg_scale slider pushes it toward or away from the text, same instinct as image CFG. Those code tokens then pass through the Descript Audio Codec to become real 44.1 kHz mono audio. The whole thing is unashamedly heavy: float32 compute, CUDA required, and community tests put it around 10 GB VRAM with 30–45 seconds per dialogue block.

The inputs that actually matter (there are a lot, and you can ignore most of them):

  • text - your whole script. [S1] Hello! [S2] Hi. (laughs) and the parentheses are non-verbals: (laughs), (clears throat), (sighs), (applause), and a couple dozen more the model knows.
  • max_tokens - controls length, default 1720, hard ceiling 3072. If output cuts off mid-sentence, raise it; if it's slow, lower it.
  • temperature - default 1.3. Lower it if voices get warbly, raise it for more energy.
  • seed - set it for reproducible takes.
  • audio_prompt (optional) - an AUDIO input from LoadAudio for voice cloning or style transfer.

That last one is where people get burned. When you use audio_prompt, your text must start with the transcript of that audio file, followed by the new lines you want generated - the model needs the text alignment to understand the prompt. Get the order wrong and you'll get audio that ignores your reference voice. There's also an honest caveat floating around the community: voice cloning with Dia tends to produce different voices of the same gender as the reference. Manage expectations.

Output: audio in standard ComfyUI AUDIO format ({'waveform': tensor[B, C, T], 'sample_rate': 44100}). Wire it into SaveAudio or PreviewAudio and you're done.

Install. Get the whole pack through ComfyUI Manager (search "ComfyUI-DiaTTS") or clone it:

cd ComfyUI/custom_nodes
git clone https://github.com/BobRandomNumber/ComfyUI-DiaTTS.git
cd ComfyUI-DiaTTS
pip install -r requirements.txt

The requirements file is a single line: descript-audio-codec. You also need the model file - download model.safetensors from nari-labs/Dia-1.6B on Hugging Face and drop it in ComfyUI/models/diffusion_models/ (rename it Dia-1.6B.safetensors so it's recognizable). First run downloads the DAC codec automatically.

Common issues. No CUDA GPU = hard failure, this pack refuses to run on CPU. And watch the protobuf trap: descript-audio-codec pins protobuf >= 3.19.6, != 4.24.0, < 5.0.0, and one user reported pip resolving an ancient 3.19.6 that broke other nodes - the author's note says a fresh install should land on 4.25.8, which is fine. If some unrelated node starts throwing protobuf errors after this install, that's the suspect.

Categoryaudio/DiaTTS

Inputs (10)

NameTypeDefaultDescription
dia_modelDIA_MODEL
textSTRING
max_tokensINT1720860–3072
cfg_scaleFLOAT3.01–7
temperatureFLOAT1.300.1–1.5
top_pFLOAT0.950.1–1
cfg_filter_top_kINT321–100
speed_factorFLOAT0.940.5–1.5
seedINT00–18446744073709550000
audio_promptoptAUDIO

Outputs (1)

NameTypeDescription
audioAUDIO