NTCosyVoiceInstruct2Sampler
Tell CosyVoice2 How to Say It — the Instruct2 Sampler
- audio
- tts_speech
If you're here, you probably googled "CosyVoice instruction" or "CosyVoice emotion" and this is where the trail led. NTCosyVoiceInstruct2Sampler is the emotion-and-delivery node of the ComfyUI_NTCosyVoice pack, and it's the one most people actually want once they've heard what TTS can do beyond a flat newsreader voice. It keeps a cloned voice and changes how it speaks - happy, urgent, gentle, whispery - without retraining and without a new reference clip. That's a genuinely hard thing to do in ComfyUI, where most text-to-speech comes out one-note.
The "2" in the name isn't marketing. It exists because CosyVoice2 dropped the old instruction API entirely - the upstream inference_instruct literally raises NotImplementedError in the CosyVoice2 code. The pack author wrapped the replacement path (inference_instruct2) instead, so the node name is a breadcrumb telling you which generation of the model this actually drives.
How it works
Same shape as the pack's other samplers: reference audio for the timbre, text for the content, then an extra instruct line that steers the delivery. That instruction is baked into the model's LLM prompt at inference time, so iterating is cheap - change one sentence, re-run, hear the difference. The reference audio still gets squashed to mono and resampled to 16 kHz, the model runs with JIT acceleration on, and the output is a 22.05 kHz AUDIO value.
One mental shift if you came from the zero-shot node: there's no transcript here. prompt_text isn't a thing - the "prompt" is the instruction, not a transcription of the reference.
The inputs
- audio - the reference clip providing the voice. Same rules as the pack's other nodes: clean, single-speaker, a few seconds.
- text - the line to be spoken.
- instruct - how to deliver it. This is the field that makes the node worth having.
- speed - 0.5–1.5, default 1.0. Pacing knob, nothing more.
Output is tts_speech (AUDIO), wired into PreviewAudio or a SaveAudio/VideoHelperSuite node.
On the instruct field itself: CosyVoice2's own docs work in short Chinese-style instructions - something like "用高兴的语气说" (say it in a happy tone) - and the model is strongest there, so expect to experiment rather than type English sentences. The content text can be in whatever language you need.
Installing it
It's the same pack as the other two samplers, so one install gets you all three:
cd ComfyUI/custom_nodes
git clone https://github.com/muxueChen/ComfyUI_NTCosyVoice
cd ComfyUI_NTCosyVoice
pip install -r requirements.txt
python downloadmodel.py
Search "CosyVoice" in ComfyUI Manager to do the clone for you. Then restart. The usual pack warnings apply: the requirements are heavy (deepspeed, TensorRT, onnxruntime-gpu, lightning), and the CosyVoice2-0.5B model is a separate ModelScope download via downloadmodel.py that you must let complete.
Troubleshooting
- Instructions seem to have no effect. Check that the instruction is being treated as an instruction, not as extra text - the node feeds it through the
instructinput, and if you accidentally put it intextyou're just making it say more words. Also, short instructions beat long ones; the model tunes tone, not a paragraph. - Red nodes after install. Same as the rest of the pack: a dependency in that heavy requirements file didn't land. Manager's "Try to Fix" can fail on these; check the install log.
- Model path errors. Run
downloadmodel.pyinside the pack folder and let the CosyVoice2-0.5B download finish. This pack is pinned to CosyVoice2 - if you swap in CosyVoice3 weights, nothing here will follow, because the node and the model are matched to each other. - First run is slow - JIT compile plus a one-time model load. Budget ~1.2–1.4× realtime after that, on roughly 4–6 GB VRAM.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| speed | FLOAT | 1.00.5–1.5 | — |
| text | STRING | — | |
| instruct | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tts_speech | AUDIO | — |