HunyuanVideo byt5 loader
Feeding HunyuanVideo 1.5's text-rendering brain
- byt5_kwargs
- prompt_format
HunyuanVideo 1.5 has two text encoders. The obvious one is the big Qwen2.5-VL model that understands your prompt; the less obvious one is a byT5 model paired with the Glyph-SDXL-v2 checkpoint, and it exists to make on-screen text legible. HyVideo15Byt5Loader is the node that loads that second pair. On its own it does nothing - it just prepares the machinery - but it's the prerequisite for HyVideo15GlyphByT5, which is the node that actually renders quoted text in your video.
What it loads
Two things, into two outputs:
- byt5_kwargs - the byT5 model and tokenizer, loaded from
google/byt5-small, plus a max sequence length.byt5_max_lengthdefaults to 256, which is plenty for the short quoted strings this path is meant for. - prompt_format - the
MultilingualPromptFormatbuilt from Glyph-SDXL-v2'sassets/color_idx.jsonandmultilingual_10-lang_idx.json, which describes how glyph text gets rendered in different languages.
The three required inputs are byt5_path, glyph_path, and load_device. Both paths are dropdowns of folders under ComfyUI/models/text_encoders; set either to None and the loader auto-downloads the missing piece - google/byt5-small from HuggingFace, Glyph-SDXL-v2 from ModelScope. load_device picks between the main compute device and the offload device; the default main_device is fine, but if VRAM is tight, offload_device keeps the little model out of the way.
Both outputs feed HyVideo15GlyphByT5. Note that the simplified HyVideo15ModelLoader loads this exact byT5+glyph pair internally, so if you're using the one-click sampler you never see this node.
How it fits
In the complete workflow the path is: HyVideo15Byt5Loader → HyVideo15GlyphByT5 → HyVideo15Transformer (via extra_kwargs). The byT5 encoder is the "byte-level" T5, meaning it tokenizes at the character level rather than word level - which is exactly what you want when the thing you're encoding is a string of text to be drawn, not understood. That's also why it renders multilingual text reasonably well: the character-level tokenizer plus Glyph-SDXL-v2's format data handles scripts word-level tokenizers mangle.
Installing it
Same pack as everything else - ComfyUI Manager, search "HunyuanVideo-1.5 nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/yuanyuan-spec/comfyui_hunyuanvideo_1.5_plugin
cd comfyui_hunyuanvideo_1.5_plugin
pip install -r requirements.txt
Restart ComfyUI. The ModelScope download for Glyph-SDXL-v2 is the one that tends to stall or fail on flaky connections; if you ever see a Glyph-SDXL-v2/checkpoints/byt5_model.pt error, that's the culprit and the fix is to grab that checkpoint by hand from the ModelScope page into models/text_encoders/Glyph-SDXL-v2/checkpoints/.
A note on the model's place in the world
Worth knowing before you invest in this whole stack: HunyuanVideo 1.5 is a good I2V model that the community has quietly moved past in favor of Wan and LTX, and the license restricts use outside the EU, UK, and South Korea (and forbids training another AI on its outputs). The glyph path is one of 1.5's genuine differentiators, though - legible baked-in text in a video model is rare enough that it's a real reason to stay.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| byt5_path | COMBO | 1 options: None | |
| glyph_path | COMBO | 1 options: None | |
| load_device | COMBO | main_device | 2 options: main_device, offload_device |
| byt5_max_lengthopt | INT | 256 | Maximum length for byT5 tokenization. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| byt5_kwargs | HYVID15BYT5KWARGS | — |
| prompt_format | HYVID15MULTILINGUALPROMPTFORMAT | — |