ComfyUI Node

TTS WebUI StyleTTS2

The style-transfer TTS with the four dials

By rsxdalv·Created 10 months ago·Updated 10 months ago· 5
TTS WebUI StyleTTS2
    • audio
    • wav_path
    • metadata_json
    textHello
    api_basehttp://127.0.0.1:7778
    api_key
    alpha0.30
    beta0.70
    diffusion_steps5
    embedding_scale1.00
    timeout_sec120
    channels_firsttrue
    also_save_wavfalse
    save_prefixtts
    return_metadatatrue

    StyleTTS2 sits in a slightly different lane than the cloning models in this pack. It's built around style transfer: it learns the speaking style - rhythm, intonation, prosody - from a reference speaker and applies it to new text. That makes it a favorite for narration where you want consistent, characterful delivery rather than a strict voice clone. It's an older model than Chatterbox or F5-TTS, but it's still around because its style control is genuinely good and it's cheap to run.

    How it works

    Same client-server shape as every node in this pack: the node POSTs an OpenAI-style body to your TTS WebUI server at http://127.0.0.1:7778/v1/audio/speech with model: "styletts2", and the server does the synthesis. StyleTTS2 blends a reference speaker's style with diffusion-based prosody generation, and this node exposes exactly the four controls that matter for that blend.

    The inputs that matter

    • alpha (0–1, default 0.3) - how much the reference speaker's style diffuses into the output. Low = neutral delivery, higher = the reference's character comes through.
    • beta (0–1, default 0.7) - the overall style transfer strength. Where alpha shapes which style, beta decides how much it's applied at all.
    • diffusion_steps (default 5) - the number of diffusion refinement steps on the prosody. More steps = smoother, more natural prosody, slower. 5 is a good default; drop it if you're iterating fast.
    • embedding_scale (0–5, default 1.0) - how strongly the reference's embedding influences generation. Crank it to exaggerate the reference's identity.

    Outputs

    audio (AUDIO) into a preview or save node, wav_path (STRING) when also_save_wav is on, and metadata_json (STRING) with the request details and WAV stats.

    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's only dependencies are requests, numpy, torch - already in your ComfyUI. StyleTTS2's model files download into the TTS WebUI server, not this node.

    When it breaks

    • Connection refused: the server isn't up on 127.0.0.1:7778. Start TTS WebUI and load StyleTTS2 there; if it's remote, fix api_base (the node appends /v1/audio/speech itself).
    • First request times out: model load or download on the server. Raise timeout_sec (max 600).
    • Output sounds flat or too "robotic": that's alpha/beta too low or diffusion_steps too low - this model rewards a few more diffusion steps more than most.

    One honest note: this node's inputs assume the server has a reference speaker/voice configured - there's no audio_prompt_path field here like the cloning nodes have. The style comes from whatever voice the server is set up with. If your TTS WebUI server's StyleTTS2 has no reference loaded, you'll get the model's default voice, which defeats the point.

    CategoryAudio/TTS

    Inputs (12)

    NameTypeDefaultDescription
    textSTRINGHello
    api_baseSTRINGhttp://127.0.0.1:7778
    api_keyoptSTRING
    alphaoptFLOAT0.300–1
    betaoptFLOAT0.700–1
    diffusion_stepsoptINT51–200
    embedding_scaleoptFLOAT1.000–5
    timeout_secoptINT1201–600
    channels_firstoptBOOLEANtrue
    also_save_wavoptBOOLEANfalse
    save_prefixoptSTRINGtts
    return_metadataoptBOOLEANtrue

    Outputs (3)

    NameTypeDescription
    audioAUDIO
    wav_pathSTRING
    metadata_jsonSTRING