Nodes/MOSS-TTS/MOSS-TTS Generate
ComfyUI Node

MOSS-TTS Generate

The node that makes MOSS-TTS talk

By Eutectico·Created 4 months ago·Updated 4 months ago· 0
MOSS-TTS Generate
  • model
  • voice
  • audio
  • status
text
presetBalanced (16 RVQ)
max_tokens2500
speed1.00
seed0
n_vq16
text_temperature1.50
text_top_p1.00
text_top_k50
audio_temperature0.95
audio_top_p0.95
audio_top_k50
audio_repetition_penalty1.10

This is the money node. Loader hands you a model, you type text, and MOSSTTSGenerate hands back an AUDIO output you can drop straight into Save Audio. It's the whole reason the pack exists: zero-shot text-to-speech and voice cloning on a 1.7B model, fully local, no API, no key.

How it works

Generate builds the model's chat-style message from your text - plus your voice reference, if one is attached - tokenizes it, then runs the model's decoder with a DelayGenerationConfig. The output is decoded into audio at the model's sample rate and returned as a ComfyUI AUDIO dict. speed is a post-generation resample trick (resample up, then back down) rather than anything the model understands natively, so don't expect it to change performance much.

The outputs are audio (AUDIO, wire to Save Audio) and status (STRING, wire to ShowText for a report on duration, generation time, and VRAM usage). The status string is genuinely useful - it's the easiest way to see how much VRAM a given config ate.

The inputs you'll actually touch

  • text (required, multiline) - the script. Empty text raises an error, so don't leave it blank.
  • preset - the real quality/speed dial. Fast (8 RVQ), Balanced (16 RVQ) (default), High Quality (24 RVQ), Maximum (32 RVQ), or Custom. RVQ is the number of residual vector quantization layers used to reconstruct the audio - more layers, better audio, slower. Here's the catch that trips people up: when the preset is anything but Custom, the preset's values override all the individual sampling widgets at execution time. You can fiddle with audio_temperature all day, and on Balanced (16 RVQ) it's ignored. Switch to Custom if you actually want to tune.
  • max_tokens (default 2500, 50–5000) - the VRAM dial. If you OOM, this is the first thing to drop.
  • speed (0.5–2.0, default 1.0) - the resample-based speedup/slowdown.
  • voice (optional) - the MOSS_TTS_VOICE output from MOSSTTSVoiceReference. Leave it disconnected and you get the default voice, which leans Chinese even for English text.
  • seed - 0 means random; any other value makes the run reproducible.

The rest - n_vq, the text_* and audio_* samplers, audio_repetition_penalty - only matter in Custom mode. A couple of sentences of tuning for a two-slider workflow is fine, but for most people the preset is all you need.

Speed expectations

On a T4-class card, the README quotes roughly: ~12 min for 8 RVQ, ~8 min for Balanced, ~5 min for High, ~4 min for Maximum. Counterintuitive that fewer layers is slower, but that's what the author measured - the generation length varies with token budget. Defaults target ~16 GB VRAM in fp16.

Troubleshooting

  • OOM - the node's own error message is the cheat sheet: on a T4, roughly 8 RVQ ≈ 7200 tokens, 16 RVQ ≈ 4800, 24 RVQ ≈ 3000, 32 RVQ ≈ 2400. Reduce max_tokens or drop RVQ. On OOM the node frees intermediate tensors, so the GPU isn't left wedged.
  • English comes out Chinese-accented - you skipped the voice reference. Feed a clean 5–15 s English clip via MOSSTTSVoiceReference.
  • Noise instead of speech - not this node's fault; it's the transformers version issue covered in the Loader article. Pin transformers>=4.50,<4.58.
  • Speech at wrong speed - you probably set speed higher than 1.0 expecting pitch-shifting; it's resampling, so it changes tempo.
CategoryMOSS-TTS/generation

Inputs (15)

NameTypeDefaultDescription
modelMOSS_TTS_MODEL
textSTRING
presetCOMBOBalanced (16 RVQ)5 options: Custom, Fast (8 RVQ), Balanced (16 RVQ), High Quality (24 RVQ), Maximum (32 RVQ)
max_tokensINT250050–5000
speedFLOAT1.000.5–2
seedINT00–2147483647
n_vqINT168–32
text_temperatureFLOAT1.500.1–2
text_top_pFLOAT1.000.1–1
text_top_kINT501–100
audio_temperatureFLOAT0.950.1–2
audio_top_pFLOAT0.950.1–1
audio_top_kINT501–100
audio_repetition_penaltyFLOAT1.101–1.5
voiceoptMOSS_TTS_VOICE

Outputs (2)

NameTypeDescription
audioAUDIO
statusSTRING