HunyuanVideo TextEncode
The CLIPTextEncode of kijai's Hunyuan wrapper
- text_encoders
- custom_prompt_template
- clip_l
- hyvid_cfg
- model_to_offload
- hyvid_embeds
If you're building a Hunyuan Video workflow around kijai's wrapper, this is the node your prompt actually flows through. Think of it as this ecosystem's version of CLIPTextEncode - except instead of a plain CLIP model, Hunyuan Video's text understanding comes from an LLM (a Llava-Llama-3 variant), and this node is what turns your words into the embeddings the sampler nodes consume.
That's the first thing worth knowing: Hunyuan doesn't caption-match the way SD1.5 or SDXL do. It's instruction-tuned around a structured description, and that's exactly what prompt_template gives you. Leave it on the default video setting and the node wraps your prompt in a system message asking the model to describe content and theme, color/shape/texture/spatial relationships, actions and temporal behavior, environment and lighting, and camera movement - five buckets, in that order. You can see the literal template text in the custom_prompt_template field if you're curious. Switch to image for single-frame framing, write your own via custom, or set disabled if you want the model to see your raw prompt with no scaffolding. For most people, video is the one to leave alone - it's tuned to how the model was trained, and skipping it usually just makes prompts vaguer to the model, not better.
The two required inputs are text_encoders (wired from the wrapper's text encoder loader node, not from ComfyUI's own CLIP loader) and prompt, a plain multiline string. Everything else is optional and mostly there for VRAM management: force_offload (on by default) evicts the text encoder from VRAM once it's done, which you want unless you're re-encoding constantly and have room to spare. model_to_offload is a convenience wire - if you connect the big diffusion model here, the node will push it off the GPU before it runs the encoder, useful when your text encoder and diffusion model together don't fit in VRAM at the same time. clip_l lets you swap in ComfyUI's native CLIP loader for the CLIP-L half of the encoding instead of letting the wrapper handle it - you'd disable clip_l in the text-encoder-loader node upstream if you go this route. hyvid_cfg is a side-channel for CFG-related settings from elsewhere in the wrapper.
The single output, hyvid_embeds, is what every Hunyuan wrapper sampler node wants as input. It's also exactly what HyVideoTextEmbedsSave writes to disk and HyVideoTextEmbedsLoad reads back - worth knowing if you're iterating on sampler settings and don't want to re-run the (slow) LLM encode every single time.
Installing it. Easiest path is ComfyUI Manager - search "HunyuanVideoWrapper" and install. By hand: cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-HunyuanVideoWrapper, then pip install -r requirements.txt inside that folder before you restart. That pip step matters - the ComfyUI subreddit has a running trickle of "installed via Manager but nodes are missing" posts, and the fix is almost always running requirements.txt by hand.
You'll also need the actual weights this node runs: an LLM-based text encoder (Llava-Llama-3-8B) plus a CLIP-L, both separate from the diffusion checkpoint and VAE. These are multi-gigabyte downloads, and the wrapper will try to auto-fetch them on first run if it can't find them - which has burned people running ComfyUI in Docker or through extra_model_paths.yaml, since the wrapper nodes don't always respect a symlinked or remapped model path and can quietly start downloading a second copy into the default folder instead of using the one you already have. If you see a fresh multi-gigabyte download start on a machine that should already have the model, that's almost certainly what's happening - check your actual model folders before assuming something's broken.
One more honest note on where this sits in 2026: Hunyuan Video itself isn't the model people reach for first anymore - Wan and LTX have pulled ahead on motion quality and the LoRA ecosystem. But the wrapper hasn't disappeared; people running video-to-video edits, prompt mixing, or block-level LoRA control still keep it installed specifically because ComfyUI's native Hunyuan nodes don't expose that level of control. If that's why you're here, you're in the right place - just don't expect this to be your daily-driver video model the way it might've been in early 2025.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| text_encoders | HYVIDTEXTENCODER | — | |
| prompt | STRING | — | |
| force_offloadopt | BOOLEAN | true | — |
| prompt_templateopt | COMBO | video | Use the default prompt templates for the llm text encoder |
| custom_prompt_templateopt | PROMPT_TEMPLATE | [object Object] | — |
| clip_lopt | CLIP | Use comfy clip model instead, in this case the text encoder loader's clip_l should be disabled | |
| hyvid_cfgopt | HYVID_CFG | — | |
| model_to_offloadopt | HYVIDEOMODEL | If connected, moves the video model to the offload device |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| hyvid_embeds | HYVIDEMBEDS | — |