Nodes/HunyuanVideo-1.5 nodes/HunyuanVideo 1.5 Leo Transformer Model Loader
ComfyUI Node

HunyuanVideo 1.5 Leo Transformer Model Loader

Loading the 8.3B core of HunyuanVideo 1.5 on its own

By yuanyuan-spec·Created 10 months ago·Updated 10 months ago· 28
HunyuanVideo 1.5 Leo Transformer Model Loader
    • HYVID15TRANSFORMER
    • HYVID15TRANSFORMERCONFIG
    path
    resolution480p
    task_typei2v
    transformer_dtypebfloat16
    attn_modeflash
    force_sparse_attnfalse

    The diffusion transformer is the model inside the model - the 8.3B network that actually does the denoising, the part that made HunyuanVideo 1.5 smaller and better than the original 13B. HyVideo15TransformerLoader loads just that piece, on its own, for the complete workflow. Where the simplified HyVideo15ModelLoader grabs the whole stack at once, this node lets you load the transformer independently, which is the whole point of the split: offload or swap it without dragging the 7B text encoder and VAE along.

    What it loads

    • path - folders under ComfyUI/models/diffusion_models. None auto-downloads from tencent/HunyuanVideo-1.5, grabbing the specific transformer/<version> subfolder on demand.
    • resolution (480p) / task_type (i2v) - together they pick the version, e.g. 480p_i2v or 720p_t2v. Match these to the model you downloaded; the distilled variants (480p_i2v_distilled, 720p_i2v_distilled_sparse, etc.) live in the same folder structure and are where the speed is.
    • transformer_dtype (bfloat16) - keep bfloat16; it's the supported default and the model card's own precision.
    • attn_mode (flash) - flash, flex-block-attn, ptm_sparse_attn (1.5's SSTA sparse attention), or flash3. Flash is the safe default. ptm_sparse_attn is the interesting one - sparse attention prunes redundant spatiotemporal attention blocks, which is a big part of how 1.5 got fast - but it needs a supporting GPU, and you want a model trained for it.
    • force_sparse_attn (false) - forcing sparse attention onto a model that wasn't trained sparse produces artifacts, and the node warns exactly about that. The tooltip and source both recommend loading a _distilled_sparse variant instead. It'll also refuse outright if your GPU doesn't support sparse attention.

    Outputs: the HYVID15TRANSFORMER (feeds HyVideo15Transformer) and the HYVID15TRANSFORMERCONFIG (feeds HyVideo15CFG's transformer_config input, which is how the CFG node learns the ideal resolution and auto-sets flow_shift).

    Where it sits

    HyVideo15TransformerLoaderHyVideo15Transformer (and → HyVideo15CFG). In the SR branch, HyVidelSrTransformerUpsamplerLoader plays the same role for the distilled SR transformer. Simplified users never see this node - HyVideo15ModelLoader loads the transformer internally.

    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. The first download is a multi-gigabyte pull per variant; since each resolution/task combo is a separate subfolder, you only fetch what you actually run.

    Common issues

    The classic trap is mismatching resolution/task_type with the weights on disk - a 720p_t2v selection pointing at a folder that only holds 480p_t2v fails on load. And the force_sparse_attn temptation: don't. If you want sparse-attention speed, download the _distilled_sparse variant and select it - the force flag exists for testing and the warnings are accurate. Finally, the license reality check: these weights are under the Tencent Hunyuan Community License (no EU, UK, or South Korea, no training another AI on outputs), which matters more than the loader if you're planning distribution.

    CategoryHunyuanVideoWrapper1.5

    Inputs (6)

    NameTypeDefaultDescription
    pathCOMBO1 options: None
    resolutionCOMBO480p2 options: 480p, 720p
    task_typeCOMBOi2v2 options: t2v, i2v
    transformer_dtypeCOMBObfloat169 options: float32, float64, float16, bfloat16, uint8, int8, +3
    attn_modeoptCOMBOflash4 options: flash, flex-block-attn, ptm_sparse_attn, flash3
    force_sparse_attnoptBOOLEANfalseForce to use sparse attention even if the model is not trained with sparse attention.

    Outputs (2)

    NameTypeDescription
    HYVID15TRANSFORMERHYVID15TRANSFORMER
    HYVID15TRANSFORMERCONFIGHYVID15TRANSFORMERCONFIG