Nodes/ComfyUI-FishSpeech/FishSpeech Inference
ComfyUI Node

FishSpeech Inference

The one-shot FishSpeech voice clone — no subtitles required

By AIFSH·Created 2 years ago·Updated 2 years ago· 51
FishSpeech Inference
  • prompt_audio
  • prompt_text_by_srt
  • AUDIO
text你好啊,世界!
text2semantic_typemedium
hf_tokenyour token
num_samples1
max_new_tokens0
top_p0.70
repetition_penalty1.50
temperature0.70
compilefalse
seed42
halffalse
iterative_prompttrue
max_length2048
chunk_length30

If you just want someone's voice saying a line, this is the node to start with. FishSpeech Inference is the simpler sibling of the pack's Voice Clone node: you give it a short reference clip, a transcript of that clip, and your text - it returns a wav in the same voice, no subtitle timing gymnastics. It's the zero-shot voice cloning path of the open-weight fish-speech model, wrapped into a single ComfyUI node.

Where the SRT version exists to keep the reference clip's pacing, this one doesn't care about pacing at all. You type whatever you want said and it says it. That makes it the right tool for one-off lines, narration you're going to edit anyway, or testing whether a voice will clone well before you commit to a full dubbing workflow.

How it works

Same pipeline as the SRT node, minus the timing layer. On run it shells out to the vendored fish-speech v1.4 tools in three steps: the VQGAN codec (vq-gan-group-fsq-2x1024.pth) encodes your reference audio into semantic tokens, a text2semantic transformer - a dual autoregressive LLaMA-style model, medium or large - generates new tokens from your text conditioned on the reference's tokens, and the codec decodes them back into a waveform. One pass, one wav, done. It even runs on CPU if you have no CUDA, though you won't enjoy it.

The inputs that matter

  • prompt_audio (AUDIO) - 5–15 seconds of the voice you want to clone, ideally clean and with no music. Comes from a LoadAudio node.
  • text - a multiline string with what you want spoken. The default is 你好啊,世界! - Fish Speech is genuinely multilingual and handles Chinese and English comfortably, but change it anyway.
  • prompt_text_by_srt - here's the trap: despite the default value "a man voice", this is not a free-text field. The code opens it as a file path, so it expects the output of a LoadSRT node containing a transcript of what's actually said in your reference clip. Type words into it directly and the node errors out on a bogus filename. Wire a real SRT in.
  • text2semantic_type - medium or large; medium is the default and plenty for most uses.
  • hf_token - a Hugging Face token with access to the gated fishaudio/fish-speech-1 repo. You have to accept the repo's conditions on the HF website first, then paste the token here; without it the weights (auto-downloaded on first run) won't come down.

The remaining knobs are standard decoding controls: num_samples (how many candidate takes per run), top_p, repetition_penalty, temperature, seed. half runs fp16, compile enables torch.compile, and max_length/chunk_length bound generation length. The single output is AUDIO - a wav written to ComfyUI/output/ - which you can hear through the pack's PreViewAudio node.

Installing it

Search "ComfyUI-FishSpeech" in ComfyUI Manager, or clone it manually:

cd ComfyUI/custom_nodes
git clone https://github.com/AIFSH/ComfyUI-FishSpeech
cd ComfyUI-FishSpeech
pip install -r requirements.txt

Restart ComfyUI after. The README also requires ffmpeg on your PATH - every node in this pack shells out to it via pydub. The requirements list is long (transformers, lightning, hydra-core, librosa, and friends), so give pip a minute.

Where people get burned

  • The "a man voice" default is a lie. It looks like a prompt box; it's a file path. Always feed it a LoadSRT output.
  • Gated weights + wrong token = a 401 on first run. Get the token right before you start.
  • samplerate cmake failure during install - the README's fix is pip -q install git+https://github.com/tuxu/python-samplerate.git@fix_cmake_dep.
  • Old torch breaks it: cannot import name 'weight_norm' from 'torch.nn.utils.parametrizations' means update torch.

Worth knowing: this pack tracks Fish Speech 1.4, not the newer 1.5 or S2. For a quick cloned-voice line it still works great - just don't expect the newest model or the best long-form consistency.

CategoryAIFSH_FishSpeech

Inputs (16)

NameTypeDefaultDescription
prompt_audioAUDIO
textSTRING你好啊,世界!
prompt_text_by_srtSRTa man voice
text2semantic_typeCOMBOmedium2 options: medium, large
hf_tokenSTRINGyour token
num_samplesINT1
max_new_tokensINT0
top_pFLOAT0.70
repetition_penaltyFLOAT1.50
temperatureFLOAT0.70
compileBOOLEANfalse
seedINT42
halfBOOLEANfalse
iterative_promptBOOLEANtrue
max_lengthINT2048
chunk_lengthINT30

Outputs (1)

NameTypeDescription
AUDIOAUDIO