Nodes/Diffusion_pipe_in_ComfyUI/HunyuanVideo模型配置器
ComfyUI Node

HunyuanVideo模型配置器

The original HunyuanVideo config node — official ckpt or ComfyUI files, your choice

By TianDongL·Created 11 months ago·Updated 7 months ago· 69
HunyuanVideo模型配置器
    • model_path
    ckpt_path
    transformer_path
    vae_path
    llm_path
    clip_path

    HunyuanVideo was the December 2024 first mover in open video - the model that proved big labs would ship video weights - and it's been overtaken since by Wan, but it's still a living training target for a lot of people. HunyuanVideoModelNode is the pack's config node for the original HunyuanVideo, and it has one genuinely distinctive feature: it accepts the model either the official way or the ComfyUI way, and you pick by which paths you fill.

    What it does

    Everything here is optional - there are no required inputs, and the node's behavior changes with what you fill in:

    • ckpt_path - a path to the official HunyuanVideo inference script's checkpoint directory, e.g. /home/anon/HunyuanVideo/ckpts. This is the "I cloned Tencent's repo and have its native layout" route. The tooltip for every other input says the same thing: leave them empty and it loads from this ckpt.
    • transformer_path - the transformer as a ComfyUI-style single file, e.g. hunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensors. Fill this (instead of or alongside the ckpt) and the pack uses your explicit files.
    • vae_path, llm_path, clip_path - the other three components as files or folders, again ComfyUI-style. llm_path is a folder (the LLM text encoder), while VAE and CLIP can be files or folders.

    So you have two coherent configurations: fill only ckpt_path to load Tencent's official layout, or fill the four component paths to load ComfyUI-format files (which is what the tooltip examples show - fp8 quantized transformer, separate VAE, LLM, and CLIP). Mixing a bit of both is possible but not a great idea; pick a route and stick to it.

    The output is the standard model_path config (type: "hunyuan-video"), into GeneralConfig.model_config. The README table for original HunyuanVideo is the restrained one: LoRA ✅, full fine-tune ❌, fp8 ✅ - so plan for LoRA work here.

    Fitting it in

    Video training wiring, as always: FrameBucketsNodeGeneralDatasetConfig, video_clip_mode on GeneralConfig, and an eval set if you want curves. Model node → GeneralConfigTrain. If you're already a HunyuanVideo ComfyUI user, the ComfyUI-format route means you point this at files you already have.

    Installing the pack

    Shared install - Linux/WSL2 only, submodules mandatory:

    cd ComfyUI/custom_nodes/
    git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
    git submodule update
    pip install -r Diffusion_pipe_in_ComfyUI/requirements.txt
    

    Restart, load the example workflow, and read its notes before training.

    Common issues

    The main trap is configuration ambiguity: since nothing is required, an empty node silently produces a bare config and training may fall back to defaults you didn't intend. Decide which route you're taking and fill it completely. The other usual suspects hold: full absolute paths, the pack's WSL2 drive-letter convention (Z:/..., not /mnt/z/...), and - with an fp8 transformer in the mix - making sure your blocks_to_swap and activation checkpointing on GeneralConfig are set for your VRAM before you hit "train."

    CategoryDiffusion-Pipe/Model

    Inputs (5)

    NameTypeDefaultDescription
    ckpt_pathoptSTRINGHunyuanVideo官方推理脚本的ckpt路径(如:/home/anon/HunyuanVideo/ckpts)
    transformer_pathoptSTRINGTransformer模型文件的完整路径(如:/data2/imagegen_models/hunyuan_video_comfyui/hunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensors),不填则加载官方推理脚本ckpt
    vae_pathoptSTRINGVAE文件或文件夹的完整路径,不填则加载官方推理脚本ckpt
    llm_pathoptSTRINGLLM文件夹的完整路径,不填则加载官方推理脚本ckpt
    clip_pathoptSTRINGCLIP文件或文件夹的完整路径,不填则加载官方推理脚本ckpt

    Outputs (1)

    NameTypeDescription
    model_pathmodel_path