Hunyuan DiT Text Encode
Hunyuan DiT Text Encode
- CLIP
- T5
- CONDITIONING
Two text boxes instead of one is the tell here - this node exists because Hunyuan DiT reads its prompt through two encoders at once (a Chinese RoBERTa model and mT5), and this is the "full control" node that lets you feed each one separately rather than duplicating the same text automatically. The README describes the choice plainly: "You can use the 'simple' text encode node to only use one prompt, or you can use the regular one to pass different text to CLIP/T5." This is the regular one.
For most people, most of the time, typing the same prompt into both fields is the sane default - you're not required to write two different prompts. But the option to diverge is genuinely there, and it maps onto something real about the model: one encoder was trained on Chinese-language data, the other (mT5) is multilingual. If you're prompting in Chinese and want the CLIP-side encoder doing the heavy lifting on that while T5 gets an English gloss, or you want to experiment with feeding tag-style keywords to one and a natural-language sentence to the other - a trick that became genuinely common practice on Flux's own dual-encoder setup - this node is where that happens.
Inputs. Four, all required. text is a multiline field feeding the CLIP-side (Chinese RoBERTa) encoder. text_t5 is a second, separate multiline field feeding the mT5 encoder. CLIP and T5 are the two encoder objects, both coming from Hunyuan DiT Text Encoder Loader - this node needs both loaded before it can do anything.
Output. CONDITIONING, into your KSampler's positive or negative slot the normal way.
Where it fits. Hunyuan DiT Text Encoder Loader → this node → Hunyuan DiT Size Conditioning (advanced) (optional, for resolution info) → KSampler, alongside Hunyuan DiT Checkpoint Loader's model output and an SDXL-shaped VAE and latent (Hunyuan DiT pairs with a standard SDXL VAE, per the README).
Installing the pack. ComfyUI Manager: search "Extra Models for ComfyUI." Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI_ExtraModels
then pip install -r requirements.txt and restart.
Practical starting point. If you're not sure whether diverging the two text fields helps, don't overthink it on your first attempt - write the same prompt in both text and text_t5 and get a working baseline before experimenting with splitting them. This corner of the pack is marked WIP by its own author, and Hunyuan DiT itself never built the wide user base PixArt did (it launched into a crowded field right before Flux arrived and pulled community attention away), so there's less accumulated folk wisdom out there about which text-splitting strategies actually pay off. Treat any specific claim about "put tags here, sentences there" for this particular model with more skepticism than you would for a heavily-used setup like Flux's CLIP+T5 split - it's a reasonable thing to try, not an established best practice here yet.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| text_t5 | STRING | — | |
| CLIP | CLIP | — | |
| T5 | T5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |