Nodes/ComfyUI-TrainTools-MZ/MinusZone - HYDiTSimpleT2I
ComfyUI Node

MinusZone - HYDiTSimpleT2I

A full Hunyuan DiT sampler as one node, with auto-downloaded weights

By MinusZoneAI·Created 2 years ago·Updated 5 months ago· 67
MinusZone - HYDiTSimpleT2I
    • images
    branch5657364143e44ac90f72aeb47b81bd505a95665d
    sourcegithub
    unet_pathauto
    vae_ema_pathauto
    text_encoder_pathauto
    tokenizer_pathauto
    t5_encoder_pathauto
    lora_pathnone
    seed0
    steps20
    cfg8.0
    schedulerddpm
    prompt
    negative_prompt
    width512
    height512
    keep_deviceenable

    MZ_HYDiTSimpleT2I is the native Hunyuan DiT sampler: text-to-image, one node, IMAGE out. It's the generation half of the pack's native HYDiT path, and unlike the kohya-fork sampler (which limits you to two schedulers and has a version selector), this one exposes the fuller sampling surface of Tencent's own script - five schedulers, default CFG of 8, and keep_device control. Same auto model-path behavior, same ModelScope downloads.

    If you trained a Hunyuan DiT LoRA with MZ_HYDiTTrain, this is the natural check-your-work node. If you haven't trained anything, it's still a way to run Hunyuan DiT in ComfyUI at all - the model never got the first-class ComfyUI support Flux did, so a self-contained sampler like this is genuinely useful for poking at a forgotten model.

    How it works

    Defaults matter here: unet_path, vae_ema_path, text_encoder_path, and tokenizer_path are all auto, meaning the node downloads the Hunyuan DiT components from ModelScope into ComfyUI/models/hunyuan/ on first run and reuses them after. t5_encoder_path is also auto by default on this node (unlike the kohya-fork version, where it's none) - so the native sampler pulls the mT5 encoder too, another chunk of download. lora_path defaults to none and lists your ComfyUI models/loras/, so you can load a trained LoRA straight in.

    The sampling knobs:

    • scheduler - ddpm, ddim, dpmms, uni_pc, or dpmpp_2m_karras. Default ddpm is the conservative choice; dpmpp_2m_karras is usually faster to converge.
    • cfg (8), steps (20), width/height (512, step 16, max 8192), seed - standard. The 512 default is small; Hunyuan DiT is happier around 1024.
    • prompt / negative_prompt - multiline. This is the model known for strong prompt adherence and composition, so write real prompts, not tag soup.
    • keep_device (enable) - keep the model resident on GPU between samples. Disable to free VRAM for other graph stages; you'll pay a reload tax on the next queue.

    Output is images (IMAGE) - preview or save as usual.

    Install & troubleshooting

    cd ComfyUI/custom_nodes
    git clone https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ
    # restart ComfyUI
    

    First run is the download session - several GB from ModelScope, so budget the time and a stable connection. If sampling dies with an OOM, drop resolution or disable keep_device. If it dies at import, the dependency auto-install for the native path did its thing but a mismatch (usually transformers/diffusers versions against the pinned HunyuanDiT repo) is the culprit - the pinned commit is from the author's debug era, and newer libraries can drift. That's the eternal tradeoff of this pack: the pinned toolchains are reproducible but frozen, and you're responsible for making today's Python play nice with them. Also worth remembering, the sampler is Hunyuan DiT's image model - if you came here expecting the video model, that's the other Tencent repo entirely.

    CategoryMinusZone - TrainTools/HYDiT_native

    Inputs (17)

    NameTypeDefaultDescription
    branchSTRING5657364143e44ac90f72aeb47b81bd505a95665d
    sourceCOMBOgithub4 options: github, githubfast, 521github, kkgithub
    unet_pathCOMBOauto1 options: auto
    vae_ema_pathCOMBOauto1 options: auto
    text_encoder_pathCOMBOauto1 options: auto
    tokenizer_pathCOMBOauto1 options: auto
    t5_encoder_pathCOMBOauto2 options: none, auto
    lora_pathCOMBOnone1 options: none
    seedINT0
    stepsINT20
    cfgFLOAT8.00–100
    schedulerCOMBOddpm5 options: ddpm, ddim, dpmms, uni_pc, dpmpp_2m_karras
    promptSTRING
    negative_promptSTRING
    widthINT512
    heightINT512
    keep_deviceCOMBOenable2 options: enable, disable

    Outputs (1)

    NameTypeDescription
    imagesIMAGE