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

Cosmos模型配置器

Point this at NVIDIA's Cosmos 1.0 text2world model and it builds the train config

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

    Cosmos is NVIDIA's family of "world foundation models" - built for Physical AI, meaning robotics and simulation - and the original Cosmos 1.0 diffusion model was the first one to hit the open-weights scene. It never got much adoption here as a generation model, but if you're fine-tuning a Cosmos 1.0 text2world checkpoint for your own use, this is the node that wires its files into Diffusion-Pipe.

    What it does

    Exactly what the name says: CosmosModelNode takes full paths to the three model components and hands you a model_path config for GeneralConfig. The inputs are all required:

    • transformer_path - the main transformer weights, e.g. cosmos-1.0-diffusion-7b-text2world.pt. Note it's a .pt (PyTorch) file, not a safetensors - NVIDIA's Cosmos release format.
    • vae_path - the VAE file. Required, full path.
    • text_encoder_path - the text encoder file. Required, full path.

    No optional knobs here. It's the plainest model node in the pack: three paths in, one config out. The output dict carries a type: "cosmos" marker that tells diffusion-pipe which model class to build, plus your three paths.

    Where it sits in the workflow

    The wiring is the standard pack pipeline: CosmosModelNodeGeneralConfig.model_configTrain. You'll pair it with an AdapterConfigNode (set to lora - the README's table shows Cosmos is LoRA-only, no full fine-tune), a dataset config, and an optimizer. NVIDIA's Cosmos checkpoints are big, so don't underestimate the disk and VRAM picture; block swapping (blocks_to_swap on GeneralConfig) is your friend if you're near the edge.

    Installing the pack

    Same pack, same story - Linux/WSL2 only, submodules required:

    cd ComfyUI/custom_nodes/
    git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
    git submodule update    # mandatory - training silently fails without it
    pip install -r Diffusion_pipe_in_ComfyUI/requirements.txt
    

    Restart, import example_workflows/DiffusionPipeInComfyUI.json, and read the notice notes in the workflow before you queue anything - the README is explicit that the workflow's built-in prompts carry important dataset-building instructions.

    Common issues

    The usual suspects apply: missing paths (the node returns an error dict if any of the three is empty, so check the console output when the input turns red), and the pack-wide WSL2 path convention - Windows drive-letter paths (Z:/...) instead of /mnt/z/.... Also, be careful you're grabbing the Cosmos 1.0 diffusion checkpoint and not one of the later predict2 models; this node is specifically for the original 7B text2world. If you have a Cosmos-Predict2 file, use that pack's dedicated CosmosPredict2ModelNode instead - the T5 and VAE requirements are different and mixing them up is a guaranteed bad time.

    CategoryDiffusion-Pipe/Model

    Inputs (3)

    NameTypeDefaultDescription
    transformer_pathSTRINGTransformer模型文件的完整路径(如:/data2/imagegen_models/cosmos/cosmos-1.0-diffusion-7b-text2world.pt)
    vae_pathSTRINGVAE文件的完整路径
    text_encoder_pathSTRINGText Encoder文件的完整路径

    Outputs (1)

    NameTypeDescription
    model_pathmodel_path