Nodes/ComfyUI-MARS5-TTS/MARS5-TTS Node
ComfyUI Node

MARS5-TTS Node

Voice cloning that actually runs on your machine — if you're okay living in 2024

By AIFSH·Created 2 years ago·Updated 2 years ago· 28
MARS5-TTS Node
  • text
  • ref_voice
  • ref_transcript
  • AUDIOPATH
if_deep_clonetrue
rep_penalty_window100
top_k100
temperature0.70
freq_penalty3

Feed this node a couple of seconds of someone talking plus the words you want them to say, and it writes you a WAV of that voice saying those words. That's the whole pitch, and the notable part is that it's all local - the pack's demo literally clones Trump from a bundled MP3, no API, no key, no cloud. MARS5-TTS_Node wraps CAMB.AI's MARS5-TTS, a mid-2024 open-source English voice cloner, so if you've tried F5-TTS or CosyVoice you already know the era this is from. It was one of the first genuinely good open English cloners back then; today it's a decent, free, offline option that time has mostly passed by.

How it works

MARS5 is a two-stage AR-NAR pipeline, and the wrapper hands you both stages without asking. First, an autoregressive transformer reads your text and the reference audio's Encodec codes and predicts the coarse speech tokens. Then a multinomial diffusion (DDPM) model refines those coarse codes into the full codebook stack, and a Vocos vocoder turns the result into 24 kHz audio. You don't touch any of that machinery - but it explains the behavior you'll notice: output is 24 kHz WAV (fine for speech, don't expect a studio master), and the node prints "may take a while, wait ..." while the AR pass grinds through on your GPU.

Two other things the model does that you'll feel: it treats your reference clip as the speaker identity, and prosody is steered by your text formatting - punctuation adds pauses, capitalized words get emphasis. Want a dramatic pause before a name? Add a comma.

The inputs that matter

Most of these have sane defaults. The ones a beginner actually touches:

  • text (TEXT) - what you want spoken. Note it's a socket, not a widget: you have to wire it from a TEXT-typed node like the pack's TTSTextEncode. There's no text box on the node itself.
  • ref_voice (AUDIOPATH) - your reference clip, typically from the pack's LoadAudioPath. MARS5 wants 2–12 seconds and ~6s is the sweet spot; longer references degrade (the code warns past 12s).
  • if_deep_clone (BOOLEAN, default true) - deep cloning compares your reference audio against its transcript to pull much better speaker identity and intelligibility, at the cost of slower inference. If you leave it on, you must provide ref_transcript or the node hard-asserts and dies.
  • ref_transcript (TEXT, optional) - the exact words in your reference clip. Only optional in name: with deep clone on it's mandatory.

temperature, top_k, freq_penalty, and rep_penalty_window are sampling knobs that ship at 0.7 / 100 / 3 / 100. Leave them alone until you hear repeats or robotic output; freq_penalty is the one worth nudging if the model starts looping on a phrase.

Output: a single AUDIOPATH - a 24 kHz WAV written to ComfyUI's output folder. Wire it into the pack's PreViewAudio node (or any audio preview) to actually hear it.

Install

ComfyUI Manager has it as "ComfyUI-MARS5-TTS", or do it by hand:

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

Restart ComfyUI. Weights download automatically from HuggingFace on first run into the pack's checkpoints/ folder - that's ~2.4 GB (a 1.5 GB AR model plus a 0.9 GB NAR model), plus a ~40 MB Vocos vocoder. The requirements pin numpy==1.26.4, which is worth knowing: if another node already upgraded numpy, you may get an import fight.

Gotchas worth the trouble

  • English only. MARS5 is an English model, no exceptions. Non-English input comes out as gibberish.
  • It's AGPL-3.0 licensed. Fine for personal stuff; if you're building a product, check with someone who cares about copyleft before you ship.
  • CPU fallback exists but is brutal - the device check drops to CPU when ComfyUI's CUDA malloc isn't available, and the AR pass on CPU is minutes per sentence.
  • The demo workflow in the repo references a UVR5_Node (vocal separation) from a different AIFSH pack, so it's not self-contained. You don't need it - just feed any clean WAV/MP3 reference.

Honest take: this is the simplest local voice-clone node you'll find, and it's a great first graph - text node in, WAV out. If the voice quality isn't quite there for you, that's not you doing it wrong; F5-TTS and CosyVoice (same author has wrappers for both) genuinely sound better in 2026. For a quick, free, offline clone, MARS5 still does the job.

CategoryAIFSH_MARS5_TTS

Inputs (8)

NameTypeDefaultDescription
textTEXT
ref_voiceAUDIOPATH
if_deep_cloneBOOLEANtrue
rep_penalty_windowINT100
top_kINT100
temperatureFLOAT0.700–1
freq_penaltyINT3
ref_transcriptoptTEXT

Outputs (1)

NameTypeDescription
AUDIOPATHAUDIOPATH