F5-TTS Audio from model and sample
Clone a voice in ComfyUI from a 10-second sample — F5-TTS Audio from model
- model
- f5ttsmodelinfo
- sample_audio
- AUDIO
This is the node that actually talks. Give it a short recording of a voice and a line of text, and it hands you back a WAV of that voice saying your line - no training, no cloud API, no key. It's zero-shot voice cloning running fully on your GPU, and it's the reason most people install the niknah/ComfyUI-F5-TTS pack in the first place.
F5-TTS (from SWivid) is one of the better open-source zero-shot TTS models out there, and this is the ComfyUI-friendly wrapper. People use it for character voiceovers, dubbing video, or just making a TTS that sounds like them instead of a robot. It's local, free, and the reference clip can be five seconds long.
How it works
F5-TTS is a flow-matching model, not an autoregressive chatbot. You feed it two things: a reference clip of the voice you want to clone plus a transcript of what's said in that clip, and the text you want spoken. The model generates a mel-spectrogram conditioned on the reference voice, then a vocoder renders it to audio. The default vocoder is vocos - it's fast and clean. The pack up-samples everything to ComfyUI's standard AUDIO format at 44.1kHz, so it plugs straight into SaveAudio or any audio preview node.
This node is the second half of a two-node pipeline. You're supposed to wire in a model and f5ttsmodelinfo from the F5-TTS Load model node, which downloads the checkpoint and builds the vocoder. The split was added in pack v1.0.27 so ComfyUI manages the model's memory and you can swap models without rebuilding the whole graph.
The inputs that matter
Beyond the two wires from Load model, the essentials are:
- speech - the text to synthesize. Multiline, so paste a whole paragraph. This is where multi-voice happens: drop a
{tagname}before a sentence and the node switches to the matching reference voice for that chunk. - sample - a dropdown of the reference clips it found in your
inputfolder. It only lists clips that have a matching.txttranscript, so if your audio is missing from the list, that's why. - seed -
-1is random; set a fixed number for reproducible takes. - speed - and this one is backwards from intuition:
>1.0is slower,<1.0is faster.
Two ways to supply the reference voice: pick a sample from the dropdown, or connect any audio node to sample_audio (say, a recorder node). When sample_audio is connected, sample is ignored - and you must edit sample_text to say what's in that clip. Leave the default and the node refuses to run.
The rest are quality knobs you can mostly ignore at first: nfe_step (32 denoising steps - fewer is faster but rougher), cfg_strength (2), sway_sampling_coef (default -1, off), target_rms (0.1, output loudness), cross_fade_duration, fix_duration (force total length in seconds, -1 to disable), and speed_type (how speed is applied - the default torch-time-stretch is the safe one).
Install
ComfyUI Manager is the reliable path - search "ComfyUI F5-TTS" and install. The author recommends it over git because Manager handles updates. If you're doing it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/niknah/ComfyUI-F5-TTS
cd ComfyUI-F5-TTS
git submodule update --init --recursive
pip install -r requirements.txt
Then restart ComfyUI. On Windows you also need the ffmpeg shared library build (winget "ffmpeg (Shared)"). The checkpoint downloads automatically from HuggingFace on first run - a few hundred MB, one time. Drop your voice samples in ComfyUI/input as voice.wav plus voice.txt containing the words, click refresh on the node, and it shows up in the sample dropdown.
Common gotchas
- Reference clips get cut at 15 seconds. That's upstream in F5-TTS, not the node. Keep samples under 15s, and strip out background music and noise - quality in, quality out.
- "Must change sample_text" error. You connected
sample_audioand left the default text. Put the actual words in. - "No module named f5_tts". The bundled submodule failed to check out - some git installs are bad at submodules. Remove the folder and clone it directly:
rm -rf custom_nodes/ComfyUI-F5-TTS/F5-TTS
git clone https://github.com/SWivid/F5-TTS.git F5-TTS
- Windows crashes on TDHS. The
TDHSspeed option shells out to torchcodec, which has known Windows problems (there are literal "fatal exception here" comments in the source). Stick with the default speed type unless you know you need it.
The pack's been around long enough to be battle-tested, and the README links a step-by-step voice-clone tutorial that drew close to a thousand upvotes on r/StableDiffusion. Start with a clean 10-second clip of yourself, run the example workflow, and you'll have a cloned voice in the time it takes to boil a kettle.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| f5ttsmodelinfo | F5TTSMODELINFO | — | |
| speech | STRING | This is what I want to say | — |
| seed | INT | 1 | Seed. -1 = random |
| speed | FLOAT | 1.00 | Speed. >1.0 slower. <1.0 faster |
| sampleopt | COMBO | 5-15 seconds of audio | |
| sample_audioopt | AUDIO | When this is connected, sample is ignored. Also put the words into sample_text | |
| sample_textopt | STRING | Text of sample_audio | — |
| target_rmsopt | FLOAT | 0.10 | Target output speech loudness normalization value |
| cross_fade_durationopt | FLOAT | 0.15 | Duration of cross-fade between audio segments in seconds |
| nfe_stepopt | INT | 32 | The number of function evaluation (denoising steps) |
| cfg_strengthopt | FLOAT | 2.00 | Classifier-free guidance strength |
| sway_sampling_coefopt | FLOAT | -1.000 | Sway Sampling coefficient |
| speed_typeopt | COMBO | torch-time-stretch | TDHS - Time-domain harmonic scaling. torch-time-stretch - torchaudio.transforms.TimeStretch. F5TTS's default time stretch(inserts extra words some times). |
| fix_durationopt | FLOAT | -1.00 | Fix the total duration (ref and gen audios) in second. -1 = disable |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |