Nodes/Diffusion_pipe_in_ComfyUI/Wan2.1模型配置器
ComfyUI Node

Wan2.1模型配置器

One checkpoint dir is enough

By TianDongL·Created 11 months ago·Updated 7 months ago· 69
Wan2.1模型配置器
    • model_path
    ckpt_path
    transformer_path
    llm_path

    Wan 2.1 is the video model with the biggest training community around it, and Wan21ModelNode is the pack's way of pointing a training run at it. It's also the least fussy model node here: one required field, a checkpoint directory, and you're basically done. The tooltip for ckpt_path says it plainly - "必填" (required), and the directory at minimum needs to contain the model's config files.

    The pack's support table gives Wan2.1 the full treatment: LoRA and full fine-tune, with fp8/quantization support on top. That makes it one of the most flexible options in this pack, and the community uses it that way - diffusion-pipe is a documented path for Wan LoRA training (the KB's Wan video notes report a 4090 run on ~25 images, trigger word, 150–250 epochs, finishing in 2–3 hours).

    How it works

    Standard model-picker behavior: it builds a model_path dict - {"type": "wan", "ckpt_path": ...} - that flows into ModelConfig, gets merged with dtype/timestep settings, and ends up in the TOML that Train runs through deepspeed. No weights are touched at this stage.

    The flexible part is that you can override where the big pieces come from. Wan2.1 models are normally folders containing transformer + text encoder (UMT5-XXL) + VAE, but the optional fields let you substitute ComfyUI-format single files:

    • transformer_path - a safetensors transformer, e.g. wan2.1_t2v_1.3B_bf16.safetensors, instead of whatever's inside the checkpoint dir.
    • llm_path - a text-encoder file, e.g. umt5-xxl-enc-bf16.safetensors, for ComfyUI-format checkpoints.

    This is the node's real value: it lets you mix the "official" checkpoint directory with the ComfyUI-format files you probably already have downloaded.

    The inputs that matter

    • ckpt_path - required, the checkpoint directory.
    • transformer_path / llm_path - optional overrides for ComfyUI-format model files.

    Output: model_pathModelConfig.

    Install

    Same pack-wide story - ComfyUI Manager, search "Diffusion_pipe_in_ComfyUI", or:

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

    Linux/WSL2 only. DeepSpeed and the diffusers stack come with the requirements.

    Where people get burned

    The "config files at minimum" phrasing is doing real work: the checkpoint folder must be a complete Wan2.1 model structure or the training subprocess will fail when it tries to load. People often point this at a partial download and get a confusing deepspeed error. Also remember Wan2.1 LoRAs carry forward to Wan2.2 - the community confirms training on 2.1 produces LoRAs that run on the 2.2 T2I model. If you're not sure which Wan to train, that compatibility is a strong argument for the 2.1 node over the 2.2 one, since 2.2 adds the low/high-noise complexity (see Wan22ModelNode).

    CategoryDiffusion-Pipe/Model

    Inputs (3)

    NameTypeDefaultDescription
    ckpt_pathSTRINGWan2.1模型checkpoint目录的完整路径,必填,至少需要包含模型所需的config文件(/data2/imagegen_models/Wan2.1-T2V-1.3B)
    transformer_pathoptSTRING你也可以选用safetensors格式的Transformer的模型文件(如:/data2/imagegen_models/wan_comfyui/wan2.1_t2v_1.3B_bf16.safetensors)
    llm_pathoptSTRING可选:LLM文件路径(如:/data2/imagegen_models/wan_comfyui/wrapper/umt5-xxl-enc-bf16.safetensors)

    Outputs (1)

    NameTypeDescription
    model_pathmodel_path