Nodes/petty-paint-comfyui-node/PettyPaint Modal Loader
ComfyUI Node

PettyPaint Modal Loader

The checkpoint loader that lets another node pick the model

By mephisto83·Created 2 years ago·Updated 2 years ago· 3
PettyPaint Modal Loader
    • MODEL
    • CLIP
    • VAE
    ckpt_name_override
    ckpt_name

    The display name on this one is "PettyPaint Modal Loader" - yes, modal, an honest typo for "model" that's been shipped for a while. Under the typo is a checkpoint loader that behaves almost exactly like ComfyUI's core "Load Checkpoint": it loads a checkpoint and hands out MODEL, CLIP and VAE. The one real difference is the extra ckpt_name_override text input, which lets another node pick the checkpoint for you instead of you choosing from the dropdown.

    That single difference is what makes it worth knowing. ComfyUI's stock loader has a hardcoded dropdown; you can't wire a model name into it from elsewhere in the graph. If you want a workflow where the model choice lives in one place - say, the pack's PettyPaintComponent hub, which loads whatever model the Petty Paint web app selected, or a text node feeding a filename - this loader lets you do that. When ckpt_name_override is non-empty, it wins over the dropdown; leave it empty and it's just a normal loader with extra steps. For everyone not driving models dynamically, the core node is simpler and you should use it - this one is a niche convenience, not an upgrade.

    How it works

    Same code path as the core loader: it resolves the checkpoint file in ComfyUI/models/checkpoints, calls load_checkpoint_guess_config (so it works across SD 1.5, SDXL, and friends), and returns the model, CLIP and VAE trio. The override is a plain string that's compared for length - empty string means "use the dropdown", anything else means "load this filename". There's no fallback logic or error handling beyond what ComfyUI gives you, so a typo in the override produces the usual "checkpoint not found" failure.

    The inputs and outputs

    • ckpt_name_override - STRING, forceInput, default empty. Wire the filename in here to take control.
    • ckpt_name - the standard dropdown of checkpoints in your models folder. Ignored when the override is set.
    • Outputs: MODEL, CLIP, VAE - the usual trio for the rest of your graph.

    Installing it

    It ships in the petty-paint pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mephisto83/petty-paint-comfyui-node
    

    Restart ComfyUI, or install via ComfyUI Manager searching "petty-paint-comfyui-node". Declared dependency: Flask==2.1.2, unused here.

    Common issues

    The override input is forceInput, so the loader expects it wired; if you leave it dangling ComfyUI may not even offer the dropdown-only mode. And the dynamic-loading scenario is where people trip: the override must be an exact filename (including extension) matching a file in the checkpoints folder - feed it a bare name like dreamshaper and it fails. If your override string comes from the web-app path, verify the filename on disk first. Honestly, if you're not doing dynamic model selection, skip this node entirely - the core loader does the same job with less ceremony.

    CategoryPettyPaint

    Inputs (2)

    NameTypeDefaultDescription
    ckpt_name_overrideSTRING
    ckpt_nameCOMBO0 options:

    Outputs (3)

    NameTypeDescription
    MODELMODEL
    CLIPCLIP
    VAEVAE