Nodes/Diffusion_pipe_in_ComfyUI/Cosmos Predict2模型配置器
ComfyUI Node

Cosmos Predict2模型配置器

Cosmos-Predict2 training config, with the old-T5 and Wan-VAE gotchas spelled out

By TianDongL·Created 11 months ago·Updated 7 months ago· 69
Cosmos Predict2模型配置器
    • model_path
    transformer_path
    vae_path
    t5_path

    Cosmos-Predict2 is NVIDIA's world model that this community mostly ignored - until Circlestone Labs quietly used its 2B Text2Image variant as the backbone for Anima, the anime base that displaced Illustrious. The KB tells the story: a robotics model nobody wanted, repurposed into the most important anime base of the era. If you're training on a Cosmos-Predict2 checkpoint - Anima-based or otherwise - CosmosPredict2ModelNode is how this pack wires it into a training run.

    What it does

    Same model-config-node pattern: paths in, a model_path config out, wired to GeneralConfig.model_config. The twist is that this model has odd component choices, and the tooltips are unusually explicit about them. All three inputs are required:

    • transformer_path - the main weights, e.g. Cosmos-Predict2-2B-Text2Image/model.pt.
    • vae_path - and here's gotcha #1: the author recommends a Wan VAE, e.g. wan_2.1_vae.safetensors. NVIDIA's own VAE apparently isn't the one you want for training; the tooltip says "建议使用万相的vae" (recommended: Wan's VAE). That's a real, model-specific quirk you won't guess on your own.
    • t5_path - and gotcha #2, flagged with "注意!" (attention!): use the old T5 model file, e.g. oldt5_xxl_fp16.safetensors, not the newer one you might have sitting in your Flux folder. The tooltip is warning you before you make the obvious mistake.

    Both warnings live in the tooltips for a reason - this is the author pre-answering the two most common support questions for this model.

    Fitting it in

    Standard pipeline: CosmosPredict2ModelNodeGeneralConfig.model_config, plus adapter, dataset, and optimizer configs, then the Train node. The README table shows Cosmos-Predict2 is one of the flexible ones - LoRA ✅, full fine-tune ✅, fp8 ✅ - so you have more room to maneuver than on the plain Cosmos node.

    Installing the pack

    The shared install applies - this is the Linux/WSL2 branch of TianDongL/Diffusion_pipe_in_ComfyUI:

    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
    

    The requirements pull in deepspeed and a long tail of training deps; the README also tells you to pip install git+https://github.com/huggingface/diffusers (latest dev) for the newest model support. Restart ComfyUI and load the example workflow to see correct wiring.

    Common issues

    The two tooltip warnings are the failure modes: grab the wrong VAE (newer T5, or NVIDIA's own VAE) and training can blow up or silently train badly. If you see a T5-related shape error, you used the new T5 instead of oldt5_xxl_fp16.safetensors. If your latents look wrong, re-check the VAE. Paths must be full and absolute, and remember the pack-wide WSL2 convention - Windows drive letters (Z:/...) rather than /mnt/z/.... And when training doesn't start at all, check the console for the node's error dict, which it returns whenever a required path is empty.

    CategoryDiffusion-Pipe/Model

    Inputs (3)

    NameTypeDefaultDescription
    transformer_pathSTRINGTransformer模型文件路径(如:/data2/imagegen_models/Cosmos-Predict2-2B-Text2Image/model.pt)
    vae_pathSTRINGVAE文件的完整路径(建议使用万相的vae,如:/data/models/wan_2.1_vae.safetensors)
    t5_pathSTRINGT5模型文件的完整路径(注意!使用旧版T5模型文件,如:/data2/imagegen_models/comfyui-models/oldt5_xxl_fp16.safetensors)

    Outputs (1)

    NameTypeDescription
    model_pathmodel_path