Nodes/Extra Models for ComfyUI/Hunyuan DiT Text Encoder Loader
ComfyUI Node

Hunyuan DiT Text Encoder Loader

Hunyuan DiT Text Encoder Loader

By city96·Created 3 years ago·Updated 2 years ago· 538
Hunyuan DiT Text Encoder Loader
    • CLIP
    • T5
    clip_name
    mt5_name
    devicecpu
    dtype

    Hunyuan DiT's text understanding comes from two separate encoders working together, not one - which is why this loader hands back two outputs instead of one, and why it's a slightly more involved setup than most CLIP loaders you're used to. One encoder is a Chinese RoBERTa model, the other is Google's mT5 (multilingual T5). Together they're presumably why Tencent's model reads Chinese-language prompts natively, not just English translated on the fly - a genuinely different design choice from the mostly-English-trained models most of this pack otherwise supports.

    Inputs. Four, all required. clip_name and mt5_name are dropdowns populated from your models/clip and models/t5 folders respectively - both empty until you've downloaded and placed the right files. device picks where both load: auto, cpu (the default), or gpu. dtype sets precision: default, auto (comfy), FP32, FP16, or BF16.

    Outputs. Two: CLIP and T5, both feeding into Hunyuan DiT Text Encode, the node in this pack built to consume exactly this pair.

    Getting the actual files. Per the README, download the first text encoder and rename it to chinese-roberta-wwm-ext-large.bin, placing it in ComfyUI/models/clip. Then the second text encoder, renamed to mT5-xl.bin, into ComfyUI/models/t5. Both renames matter - the loader's dropdown is reading filenames from those folders, not inspecting file contents to guess what's what. If loading speed or disk space is a concern, there's a smaller alternative for the second encoder: a converted fp16 safetensors version, renamed mT5-xl-encoder-fp16.safetensors, same models/t5 folder.

    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.

    Where this sits in the wider timeline. Hunyuan DiT arrived in mid-2024 as a genuine SD3-alternative contender - it launched into real community appetite right after SD3's own release disappointed people, and comparison threads against PixArt Sigma and SD3 Medium followed quickly. It didn't stick around as a widely-used base the way PixArt briefly did, partly because an EU data-compliance controversy created hesitation right when the model needed momentum, and partly because Flux landed a few weeks later and absorbed essentially all the community's attention. None of that makes the model broken - it's just a less-trodden path than PixArt within this same pack, so expect fewer people to have already hit and solved whatever error you run into.

    Troubleshooting. If either dropdown shows up empty, double-check both the folder (models/clip vs models/t5 - it's easy to drop both files in the same place) and the exact filename the README specifies; this loader doesn't auto-download anything, unlike Gemma Loader elsewhere in this pack. If text output seems off for non-English prompts specifically, remember both encoders need to actually be present and correctly loaded - a missing or misnamed mT5 file is a common way to end up effectively running English-only despite the model's bilingual design.

    CategoryExtraModels/HunyuanDiT

    Inputs (4)

    NameTypeDefaultDescription
    clip_nameCOMBO0 options:
    mt5_nameCOMBO0 options:
    deviceCOMBOcpu3 options: auto, cpu, gpu
    dtypeCOMBO5 options: default, auto (comfy), FP32, FP16, BF16

    Outputs (2)

    NameTypeDescription
    CLIPCLIP
    T5T5