KokoroModelLoader
The loader that brings Chinese Kokoro TTS into ComfyUI — mixed English included
- KOKORO_MODEL
- KOKORO_PIPELINE
Every Kokoro workflow in this pack starts here. KokoroModelLoader is the node that pulls the weights off HuggingFace and hands you the two objects everything else depends on. If you've loaded a checkpoint before, this feels familiar - a repo id in, a model out - except the model is a text-to-speech engine, and there's a second output that's easy to miss.
What it is
You're loading the Chinese variant of Kokoro: hexgrad's Kokoro-82M-v1.1-zh. If you haven't met Kokoro, the short version is that it's the community's lightweight TTS corner - 82M parameters, StyleTTS2 architecture with an ISTFTNet vocoder instead of a diffusion loop, real-time and comfortable on CPU, Apache 2.0. It's not the best voice money can buy; it's the best voice per unit of compute, which is exactly what you want when the voice is one stage in a bigger ComfyUI workflow and you need it cheap. Reach for this when you're adding Chinese narration or voiceover to a video pipeline and don't want to spend GPU time or money on the voice itself.
How it works
The interesting part is what the source actually does - loading isn't just "load the model." The node builds an English phonemizer pipeline first (with model=False, so no weights - it only exists to spell words), then loads the real model onto CUDA if it's available, otherwise CPU, and finally constructs the Chinese pipeline that shares that model. That English phonemizer is the trick that lets mixed sentences like "hello my name is lisa 嘿,大家好!" come out right: English words get their phonemes from the English side, Chinese from the Chinese side, and a callback stitches them together. Neat.
The input and outputs
The only input is repo_id, a string defaulting to hexgrad/Kokoro-82M-v1.1-zh. You can point it at another Kokoro repo, but the pipeline here is wired Chinese-first, and this default is the model the 100-voice list was built around. Keep it unless you know why you're changing it.
The two outputs are KOKORO_MODEL and KOKORO_PIPELINE, and you need both: wire them into KokoroTTSGenerator's model and pipeline inputs. Miss one and the generator won't even connect.
First run downloads the weights from HuggingFace into your HF cache (on Linux, ~/.cache/huggingface) - not into ComfyUI/models. People go looking in the models folder and panic; it's not there. The download is a couple hundred megabytes, happens once, and after that ComfyUI caches the node's output for the session, so it reloads from the cache rather than the network.
Installing the pack
This node ships with three siblings - KokoroTextInput, KokoroVoiceSelector, KokoroTTSGenerator - all under the KokoroTTS category. You install the pack once:
- ComfyUI Manager: open Manager → Install Custom Nodes, search "ComfyUI-KokoroTTS-Zh", install, restart.
- Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/ruanjianlun/ComfyUI-KokoroTTS-Zh
cd ComfyUI-KokoroTTS-Zh
pip install -r requirements.txt
Then restart ComfyUI. On the Windows portable build, install into python_embeded's python rather than your system pip - the README spells that out.
Troubleshooting
The one dependency gotcha worth knowing up front: requirements.txt lists plain misaki, but the README's own install command uses misaki[zh], and the Chinese pipeline needs the zh grapheme-to-phoneme data. If the loader dies with a G2P or missing-data error while building the Chinese pipeline, fix it with:
pip install "misaki[zh]>=0.8.1"
then restart. That usually resolves it. After that, if the loader runs at all, the hard part is behind you - everything downstream is text and voice selection.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| repo_id | STRING | hexgrad/Kokoro-82M-v1.1-zh | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| KOKORO_MODEL | KOKORO_MODEL | — |
| KOKORO_PIPELINE | KOKORO_PIPELINE | — |