FL CosyVoice3 Save Speaker
Save a Voice Once, Clone It Forever
- model
- reference_audio
- saved_path
Here's the workflow problem this node solves: every time you want to clone a voice, every other node in this pack makes you drag in the reference audio again, and the zero-shot features get re-extracted from scratch. Save Speaker fixes that by extracting the speaker features once, writing them to a .pt file on disk, and letting every future generation reuse them - no audio file, no re-processing, no keeping the original clip around.
Think of it as a contacts list for voices. You crop a good 5-second sample of someone, save it as a named preset, and from then on the pack's Speaker Clone and Speaker Instruct2 nodes just list your presets in a dropdown. Same voice, same result, minus the ceremony. If you're building a character pipeline or returning to the same voices across many workflows, this is the node that makes the pack feel like a proper tool instead of a demo.
How it works
It runs the reference audio through CosyVoice's frontend_zero_shot - the same feature-extraction path the official add_zero_shot_spk method uses - and saves the resulting embedding dict as a spk2info-style file. CosyVoice3 prompts need a system-prompt prefix on the reference text, so the node handles that automatically when it detects a v3 model. You save to ComfyUI/models/cosyvoice/speaker/<name>.pt, and the node returns the full path as its output.
Two details are easy to miss and worth knowing. First, the reference text drives the extraction: if you leave reference_text empty it auto-transcribes the clip with Whisper, which works but can misfire on noisy audio - spelling out the transcript yourself is more reliable. Second, and this is the big one: presets are locked to the model version that created them. A preset saved with the CosyVoice3 model won't work with CosyVoice2 and vice versa, because the feature layouts differ. Pick your model and stick with it.
The inputs that matter
model- the COSYVOICE_MODEL output of the Model Loader. The preset inherits this model's format, see above.reference_audio- the voice to save; 3–10 seconds is best, no more than 30.reference_text- the transcript. Leave empty to let Whisper transcribe it for you.speaker_name- the preset's name, no file extension. This becomes both the filename and the key inside the.ptfile.
The single output is saved_path (a STRING). This is an output node - its job is the side effect of writing the file.
Installing it
It ships in the FL CosyVoice3 pack. ComfyUI Manager: search "FL CosyVoice3", or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_FL-CosyVoice3.git
cd ComfyUI_FL-CosyVoice3
pip install -r requirements.txt
Restart ComfyUI. The install pulls heavy dependencies (transformers, onnxruntime, openai-whisper), and the ~2GB model downloads to ComfyUI/models/cosyvoice/ on first load. Save Speaker itself only needs the loaded model and a bit of CPU.
Common gotchas
- Preset won't load in Speaker Clone? - model-version mismatch. You can't share presets between CosyVoice3 and CosyVoice2. Re-save with the model you're generating with.
- Official
spk2info.ptpresets from CosyVoice-300M-SFT aren't supported - the pack won't read those. The README's workaround is honest: grab the sample audios from FunAudioLLM's site and save them as presets through this node. - Whisper misfires on noisy references - if the auto-transcript is wrong, the saved preset inherits the mistake. Provide
reference_textyourself for anything you care about. - Don't use CosyVoice-300M for this - the README is blunt that 300M "won't work well." Stick to CosyVoice3 or CosyVoice2.
Save Speaker is one of those nodes that feels optional until you've used it once - then it's the only way you want to work. Save the voice, never hunt for the audio file again.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COSYVOICE_MODEL | — | |
| reference_audio | AUDIO | — | |
| reference_text | STRING | — | |
| speaker_name | STRING | my_speaker | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_path | STRING | — |