ComfyUI Node

Dia2 2B

The bigger, fiddlier TTS model for when you want control

By Runware·Created 2 years ago·Updated about a month ago· 140
Dia2 2B
  • speech
  • audioSettings
  • audio
negativePrompt
seed0
CFGScale3.00
numberResults1
settings.audioTemperature0.80
settings.includePrefixfalse
settings.temperature0.60
settings.topK50
ttlfalse
ttl_value60
outputFormatMP3
advanced_json

Dia2 2B is the second generation of Runware's hosted voice model, and "2B" is doing real work: roughly twice the parameters of Dia 1.6B, which buys you cleaner prosody and, more importantly, actual control knobs. Where the 1.6B node gives you one temperature, Dia2 splits the brain - separate temperatures for text tokens and audio tokens, plus top-K, plus a flag for how to treat reference audio. It's the TTS node you reach for when you care about the take, not just the words.

Like every node in this pack it runs in the cloud: no download, no local GPU, just a request over REST and an AUDIO tensor back. The catch is that with more knobs comes more ways to confuse yourself - so here's the mental model: text temperature is for how coherent the words come out, audio temperature is for how expressive the voice sounds, and 0 on either means greedy decoding (most consistent, least character).

What you set

  • speech (required) - from the Runware Speech builder: text (with [Name] dialogue tags), voice (default Zephyr), speed, pitch, volume, language.
  • settings.temperature - text-token sampling, default 0.6. Lower = more coherent.
  • settings.audioTemperature - audio-token sampling, default 0.8. Lower = cleaner, higher = more expressive.
  • settings.topK - limits selection to the K most likely tokens per step (default 50).
  • settings.includePrefix - whether reference/prefix audio stays in the output or gets trimmed. Off by default.
  • CFGScale - default 3 (1–30); the negative prompt only bites when guidance is on.
  • outputFormat - MP3 / WAV / FLAC / OGG. advanced_json is your escape hatch for extra inputs.audios.

Output is audio (AUDIO).

How it works

The node builds a request with the runware:dia2@2b AIR and taskType: audioInference, ships it through the Runware SDK over REST, downloads the file, and decodes it with soundfile into a native AUDIO dict (falling back to torchaudio, then to a saved-file warning, if decode hiccups). The title bar prints the run cost. Because each request is a fresh cloud call, iterating on voice takes costs a few cents, not minutes of local queue time.

Installing

ComfyUI Manager → search Runware → install → restart. Manual:

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

No model downloads; deps are runware-sdk, pillow, soundfile. API key via Settings → Runware API key, RUNWARE_API_KEY, or runware auth login.

Troubleshooting

The runaway-take failure mode is temperature creep - if outputs get weird, push audioTemperature down, not up. Voices sounding samey across lines? That's often the text temperature too low, or greedy decoding on. If you wired reference audio and it shows up in the output when you don't want it, that's includePrefix - flip it on to trim the prefix. And remember the guidance rule: negative prompts are dead weight until CFGScale goes above 1.

CategoryRunware/Audio/runware

Inputs (14)

NameTypeDefaultDescription
speechRUNWARE_SPEECH
audioSettingsoptRUNWARE_AUDIOSETTINGS
negativePromptoptSTRINGPrompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1).
seedoptINT00–2147483647Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.
CFGScaleoptFLOAT3.001–30Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt.
numberResultsoptINT11–4Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
settings.audioTemperatureoptFLOAT0.800–5Sampling temperature for audio token generation. Lower = cleaner audio, higher = more expressive. 0 = greedy decoding.
settings.includePrefixoptBOOLEANfalseWhether to include prefix audio in the final output or trim it.
settings.temperatureoptFLOAT0.600–5Sampling temperature for text token generation. Lower = more coherent, higher = more variety. 0 = greedy decoding.
settings.topKoptINT501–500Top-K sampling for both text and audio tokens. Limits selection to K most likely tokens per step.
ttloptBOOLEANfalseEnable to set ttl. Off uses the model's default.
ttl_valueoptINT60Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.
outputFormatoptCOMBOMP3File format for the generated audio.
advanced_jsonoptSTRINGOptional JSON merged into the request. For: inputs.audios

Outputs (1)

NameTypeDescription
audioAUDIO