ComfyUI Node

TTS WebUI MegaTTS3

Alibaba's LLM-in-the-loop voice clone

By rsxdalv·Created 10 months ago·Updated 10 months ago· 5
TTS WebUI MegaTTS3
    • audio
    • wav_path
    • metadata_json
    textHello
    api_basehttp://127.0.0.1:7778
    api_key
    reference_audio_path
    latent_npy_path
    inference_steps32
    intelligibility_weight0.80
    similarity_weight0.80
    timeout_sec120
    channels_firsttrue
    also_save_wavfalse
    save_prefixtts
    return_metadatatrue

    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.wav means nothing to it.
    • Clone too loose or too stiff: that's the similarity_weight / intelligibility_weight balance. A clone that slurs its words is crying for more intelligibility weight.
    • Connection refused: server not on 127.0.0.1:7778, or api_base points 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.

    CategoryAudio/TTS

    Inputs (13)

    NameTypeDefaultDescription
    textSTRINGHello
    api_baseSTRINGhttp://127.0.0.1:7778
    api_keyoptSTRING
    reference_audio_pathoptSTRING
    latent_npy_pathoptSTRING
    inference_stepsoptINT321–200
    intelligibility_weightoptFLOAT0.800–1
    similarity_weightoptFLOAT0.800–1
    timeout_secoptINT1201–600
    channels_firstoptBOOLEANtrue
    also_save_wavoptBOOLEANfalse
    save_prefixoptSTRINGtts
    return_metadataoptBOOLEANtrue

    Outputs (3)

    NameTypeDescription
    audioAUDIO
    wav_pathSTRING
    metadata_jsonSTRING