Nodes/comfyui-tts-pack/CosyVoiceModelLoader
ComfyUI Node

CosyVoiceModelLoader

Point It at the Weights and Move On

By Dlight160·Created 3 months ago·Updated 22 days ago· 0
CosyVoiceModelLoader
    • model
    model_pathCosyVoice2-0.5B
    vllmfalse

    CosyVoice is Alibaba's (FunAudioLLM) text-to-speech line, and the reason anyone reaches for it is speaker similarity: it zero-shot clones a voice from a few seconds of reference audio and handles Chinese plus cross-lingual output far better than most of the English-first TTS that dominate the ComfyUI threads. This node is the front door - it loads the CosyVoice2-0.5B checkpoint into the pack's TTS_MODEL type and hands it to CosyVoiceInference, which does the actual talking.

    The loader itself is genuinely thin, and that's fine. Two optional inputs, one output:

    • model_path - STRING, default CosyVoice2-0.5B. Relative paths are resolved against ComfyUI/models/tts/ first, then any tts path registered in extra_model_paths.yaml; an absolute path is used as-is. So drop the checkpoint folder into models/tts/ and the default just works.
    • vllm - BOOLEAN, default off. Leave it off.
    • model - TTS_MODEL, into CosyVoiceInference.

    About that vllm toggle

    Off (the default) is a plain CosyVoice2(model_path) - the sensible path for a 0.5B model. Flip it on and the loader also turns on JIT, TensorRT, and vLLM acceleration, and monkey-patches vLLM's engine arguments to cap gpu_memory_utilization at 0.05. That 5% cap reads like the author saying "vLLM is a side-quest here." A 0.5B model clones a voice in a couple of seconds on a consumer card with none of it. Reach for the toggle only if you're serving many concurrent requests and you already have vLLM and TensorRT installed - and note the pack's requirements list tensorrt-cu12 as a Linux-only extra with a "may need manual install" comment. If vLLM isn't installed, the acceleration silently doesn't happen rather than crashing.

    Getting the model

    Grab CosyVoice2-0.5B from HuggingFace (FunAudioLLM/CosyVoice2-0.5B) or ModelScope - the pack's requirements pull in modelscope, so that's an intended route - and put the whole folder under ComfyUI/models/tts/. Empty model_path falls back to the code's default, so the field is mostly there for people with models on a different drive.

    Installing the pack

    The README is specific about this, and it matters more than for most packs because you're not just installing nodes - you're installing two TTS engines plus their runtimes:

    cd ComfyUI/custom_nodes
    git clone --recursive https://github.com/Dlight160/comfyui-tts-pack.git
    

    The --recursive is not optional: the engines ship as git submodules (a CosyVoice fork, fish-speech, and a vLLM plugin). If you forgot it, git submodule update --init --recursive inside the pack fixes it. Then the README wants a Python 3.12 conda env and a single pip resolution that applies the pack's CUDA 12.8 constraints alongside ComfyUI's own requirements:

    conda create -n comfy-tts-pack python=3.12
    conda activate comfy-tts-pack
    python -m pip install -c custom_nodes/comfyui-tts-pack/constraints-tts-cu128.txt \
      -r requirements.txt -r custom_nodes/comfyui-tts-pack/requirements.txt
    

    ComfyUI Manager can find the pack if you search comfyui-tts-pack, but a bare Manager click is only the start - the dependencies (deepspeed, onnxruntime-gpu, x-transformers, tensorrt, whisper, torch==2.8.0 pinned) are the real install, and they'll fight other custom nodes over transformers and torch versions. The KB's ecosystem doc calls this the default failure mode for audio packs, and this one leans into it: the README's whole point is merging everything into one pip resolution so the CUDA stack stays consistent. If you have a working ComfyUI env you don't want to disturb, run this in its own conda env - that's exactly what the author set it up for.

    CategoryTTS/CosyVoice

    Inputs (2)

    NameTypeDefaultDescription
    model_pathoptSTRINGCosyVoice2-0.5Brelative path to models/tts, or absolute path
    vllmoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    modelTTS_MODEL