TTS WebUI MegaTTS3
Alibaba's LLM-in-the-loop voice clone
- audio
- wav_path
- metadata_json
MegaTTS3 is Alibaba's entry in the 2025 wave of "a large language model does TTS" models. Instead of the older encoder-decoder pipelines, it leans on a language model generating audio codec tokens - the same trick that powers a lot of the newer generation of speech models - and it clones a voice from a short reference clip. This node is the pack's thin client for running it through the TTS WebUI server. It's one of the heavier nodes here; the model is not small and the first load will test your patience.
How it works
Standard pack plumbing: the node POSTs an OpenAI-style body to http://127.0.0.1:7778/v1/audio/speech with model: "megatts3", and the server does the synthesis. You give it a reference audio clip, it extracts the voice, and generates speech conditioned on it. The latent_npy_path input hints at the mechanism - the server can cache voice latents (the extracted voice representation) as .npy files so you don't re-extract them every time.
The inputs that matter
- reference_audio_path - the reference clip whose voice you're cloning. This is the one to actually set. Leave it empty and you're relying on the server's default setup.
- latent_npy_path - a pre-extracted voice latent file. Populate this to skip re-extraction on repeat runs - worth it once you've settled on a reference.
- inference_steps (default 32) - the generation step count. The speed/quality trade-off, as usual.
- intelligibility_weight (default 0.8) - how much the model prioritizes clear, correct pronunciation over style. If words come out mushy, raise it.
- similarity_weight (default 0.8) - how closely the output matches the reference voice. Raise it for a tighter clone, lower it to let the model drift.
Outputs
audio (AUDIO) into a preview/save node, wav_path (STRING) when also_save_wav is on, and metadata_json (STRING) with the request details.
Installing it
ComfyUI Manager → search "TTS WebUI API nodes for ComfyUI", or:
cd ComfyUI/custom_nodes
git clone https://github.com/rsxdalv/ComfyUI-TTS-Webui
then restart. The pack itself only needs requests, numpy, torch - but the MegaTTS3 model on the server side is a heavyweight, so this is not the node to try on a low-RAM box.
When it breaks
- First load is slow or OOMs: the model is big and downloads/loads into the server on first use. Raise
timeout_sec(max 600) and consider whether the server machine has the RAM for it. - Reference file not found: paths are resolved by the server, not your ComfyUI box. If the server runs elsewhere or in Docker,
C:\voices\ref.wavmeans nothing to it. - Clone too loose or too stiff: that's the
similarity_weight/intelligibility_weightbalance. A clone that slurs its words is crying for more intelligibility weight. - Connection refused: server not on
127.0.0.1:7778, orapi_basepoints at the wrong host.
Honest take: MegaTTS3 is a capable, modern clone with solid quality, but it's the model you reach for when Chatterbox-style quality and reference cloning matter and you have the hardware. On a consumer card it's workable; on anything modest, F5-TTS or Kokoro will get you to a finished job with far less pain.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Hello | — |
| api_base | STRING | http://127.0.0.1:7778 | — |
| api_keyopt | STRING | — | |
| reference_audio_pathopt | STRING | — | |
| latent_npy_pathopt | STRING | — | |
| inference_stepsopt | INT | 321–200 | — |
| intelligibility_weightopt | FLOAT | 0.800–1 | — |
| similarity_weightopt | FLOAT | 0.800–1 | — |
| timeout_secopt | INT | 1201–600 | — |
| channels_firstopt | BOOLEAN | true | — |
| also_save_wavopt | BOOLEAN | false | — |
| save_prefixopt | STRING | tts | — |
| return_metadataopt | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| wav_path | STRING | — |
| metadata_json | STRING | — |