HunyuanVideo text encode
Turning your prompt into the embeddings the transformer reads
- text_encoder
- text_encoder_2
- hyvid_cfg
- hyvid_embeds
The big Qwen2.5-VL text encoder doesn't understand words, it produces tensors - and HyVideo15TextEncode is the node that does the producing. In the complete HunyuanVideo 1.5 workflow it takes your prompt (read from hyvid_cfg), runs it through the loaded text encoder, and hands the transformer a hyvid_embeds dict of prompt and negative embeddings. It's the complete-workflow equivalent of the "CLIP Text Encode" you're used to from SD, just built for a 7B MLLM and a video model.
What it does
It reads hyvid_cfg["prompt"] and hyvid_cfg["negative_prompt"], encodes both with the text encoder, and - when classifier-free guidance is active (guidance_scale > 1) - concatenates the negative and positive embeddings into a single batch, which is how the transformer gets both the "what to avoid" and "what to make" signals in one pass. Output hyvid_embeds feeds directly into HyVideo15Transformer.
The inputs:
- text_encoder / text_encoder_2 - both from
HyVideo15TextEncoderLoader. Here's the thing to know: the loader always returnsNonefortext_encoder_2in this pack. It's a compatibility slot from the wrapper lineage - the original Hunyuan pipeline had a second encoder concept - and the node gracefully skips it. Wire both ports anyway to keep the graph tidy; just don't expect a second encoder to appear. - hyvid_cfg - from
HyVideo15CFG. Supplies prompt, negative prompt, guidance flag, and batch size. - enable_offloading (true) - shuttles the 7B encoder to the offload device while encoding. Keep it on; this encoder is a memory hog and offloading is nearly free here.
- clip_skip (0) - skip the last N layers of the encoder. 0 = use the final layer. This is a real dial for prompt adherence vs. creativity, but for a video model the default is almost always right.
Where it sits
Complete workflow order: HyVideo15TextEncoderLoader → HyVideo15TextEncode → HyVideo15Transformer. Note it shares the stage with HyVideo15GlyphByT5: that node handles the quoted text for glyph rendering, this one handles everything else. The simplified samplers run this same encoding internally, so again - you only see this node when assembling the graph by hand.
Installing it
Part of comfyui_hunyuanvideo_1.5_plugin. ComfyUI Manager → "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. Needs the text encoder downloaded (the loader auto-fetches Qwen2.5-VL-7B when path is "None").
Common issues
Most failures here trace back to the encoder, not the node. If the Qwen2.5-VL download is incomplete you'll get a cryptic transformers error at this node rather than at the loader - delete models/text_encoders/hyvideo15 and let it re-download. And if you've set enable_offloading off but your GPU is tight, this is the node that OOMs first, since the 7B encoder goes to full precision on the main device. It's also worth knowing that the prompt here is not the same thing as the glyph text: quoted strings get pulled out and handled by the byT5 path, so "text" you want rendered in-frame should be quoted, while everything else is normal prompt language.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text_encoder | HYVID15TEXTENCODER | — | |
| text_encoder_2 | HYVID15TEXTENCODER | — | |
| hyvid_cfg | HYVID15CFG | — | |
| enable_offloadingopt | BOOLEAN | true | — |
| clip_skipopt | INT | 0 | Number of layers to be skipped from CLIP while computing the prompt embeddings. A value of 1 means that the output of the pre-final layer will be used for computing the prompt embeddings. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| hyvid_embeds | HYVIDEMBEDS | — |