Nodes/comfyui-lopi999-nodes/Model Parameters
ComfyUI Node

Model Parameters

Tell a loader what to load, and save the same names to metadata

By LaVie024·Created about a year ago·Updated 8 months ago· 8
Model Parameters
    • ckpt_name_sans_none
    • ckpt_name
    • vae_name_sans_baked
    • vae_name
    ckpt_name
    vae_name

    ModelParameters is the node whose README section starts with a confession: "this does require a bit of explaining." It exists to solve a genuinely weird ComfyUI limitation - a loader can't accept a model-tuple from another node unless every element of the tuple matches exactly, which breaks when one loader expects "None" for its model and another expects "Baked VAE." This node works around it by exposing four outputs, each tuned for a different consumer. It's fiddly, and knowing when to use it is half the battle.

    Why you'd reach for it

    The use case is a workflow that both (a) decides which checkpoint and VAE to load, and (b) records those names into saved metadata. Loaders in ComfyUI accept ckpt_name and vae_name as string inputs, but different loaders and utility nodes want subtly different values. rgthree-style context nodes and SD Prompt Saver don't want the "None"/"Baked VAE" sentinels that other loaders require. Because ComfyUI refuses to connect a tuple unless the types line up 1:1, the author's solution is four outputs covering both worlds.

    How it works

    Mechanically the node is almost insultingly simple - its get_names function just echoes the chosen checkpoint and VAE names out all four ports. The complexity is in the typing. The four outputs are:

    • ckpt_name_sans_none - checkpoint name typed to accept no "None" sentinel. For consumers that want a plain name.
    • ckpt_name - checkpoint name typed to allow "None" (e.g. "None" when you want the loader to use its default).
    • vae_name_sans_baked - VAE name typed without the "Baked VAE" option.
    • vae_name - VAE name typed to allow "Baked VAE" or "pixel_space".

    Because ComfyUI matches tuple element types exactly, a loader wired to the right port connects cleanly and a loader wired to the wrong one simply refuses - which is the "works or doesn't, no partial credit" nature of the fix. You feed ckpt_name/vae_name at the top (dropdowns populated from your models/checkpoints and models/vae folders) and the metadata node reads whichever output fits its schema.

    The inputs and outputs

    • ckpt_name (enum) - which checkpoint. Tooltip: "Which checkpoint to use."
    • vae_name (enum) - which VAE. Tooltip: "Which VAE to use."
    • Four outputs, as above. Wire each to a consumer that accepts its type; the node is designed so that one will match.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/LaVie024/comfyui-lopi999-nodes
    

    Restart ComfyUI, or search "comfyui-lopi999-nodes" in ComfyUI Manager. No models, no dependencies beyond the pack.

    Common issues

    This is the pack's most error-prone node, and the errors are ComfyUI's type system at work: if a wire refuses to connect, you've picked the wrong output for that consumer. Try the _sans_none/_sans_baked ports for metadata and context nodes, and the plain ports for loaders. Also note the dropdown lists are captured from your folders when the node first loads - if you add a checkpoint to models/checkpoints after ComfyUI starts, refresh the node or restart to see it. And honestly: if you just need a checkpoint name in metadata and don't have multiple picky consumers, a plain string node is simpler. Reach for this when the tuple mismatch is actually biting you.

    Categorylopi999/utils

    Inputs (2)

    NameTypeDefaultDescription
    ckpt_nameCOMBOWhich checkpoint to use
    vae_nameCOMBOWhich VAE to use

    Outputs (4)

    NameTypeDescription
    ckpt_name_sans_none
    ckpt_nameNone
    vae_name_sans_baked
    vae_nameBaked VAE,pixel_space