Nodes/😸 YFG Comical Nodes/🐯 YFG Smart Checkpoint Loader
ComfyUI Node

🐯 YFG Smart Checkpoint Loader

The checkpoint loader that flattens your folder chaos

By gonzaluΒ·Created 2 years agoΒ·Updated about 22 hours agoΒ· 29
🐯 YFG Smart Checkpoint Loader
    • MODEL
    • CLIP
    • VAE
    β—„ckpt_nameβ–Ύβ–Ί

    You know how a checkpoint in a subfolder shows up in ComfyUI as artist/model_v2.safetensors, and the moment you share that workflow with someone whose folder structure differs, the loader breaks? The Smart Checkpoint Loader's entire selling point is that it doesn't. It's a drop-in replacement for the built-in Load Checkpoint that flattens your checkpoint directory - every model in every subfolder appears by its filename alone, so model_v2.safetensors is model_v2.safetensors no matter where it lives on either machine.

    It's part of the gonzalu/ComfyUI_YFG_Comical pack, and it's one of the pack's genuinely smart ideas. Sharing workflows is the ComfyUI equivalent of sharing a recipe where the ingredients are stored in "a drawer over there" - the README's "ideal for sharing workflows" line is exactly right, and it's the reason this node exists in a pack of mostly visual-effects utilities.

    How it works

    At init it scans every file under your checkpoints folder (including subdirectories), builds a map from each file's basename to its full path, and lists the basenames in the ckpt_name dropdown. When you pick one, it looks up the real path and loads the checkpoint through ComfyUI's standard loader - so the output is a normal MODEL, CLIP, and VAE, exactly like the core node. Your checkpoints stay physically wherever they are; only the menu gets flattened.

    The catch, and it's a real one: it's the basename that has to be unique. Two model.safetensors files in different folders, and the map can only hold one - the other silently becomes unreachable. If you keep duplicate filenames, you'll hit exactly the ambiguity this node was meant to remove.

    Inputs and outputs

    • ckpt_name - the flattened dropdown, one entry per unique checkpoint filename.
    • Outputs: MODEL, CLIP, VAE - wire them exactly as you would from the built-in loader, into a KSampler's model, the positive/negative encoders' clip, and the VAE decode. Nothing else changes in your graph.

    Installing

    Pack install: ComfyUI Manager β†’ search "YFG Comical", or

    cd ComfyUI/custom_nodes
    git clone https://github.com/gonzalu/ComfyUI_YFG_Comical
    

    Restart ComfyUI. No dependencies beyond the core, no downloads - it reads whatever's already in your models/checkpoints tree. If you want it to see a newly-added checkpoint, restart (or reload) so the scan runs again.

    The honest part

    For a single-machine tinkerer this node is a mild convenience at best - the built-in loader already handles subfolders, just with the full path in the menu. It earns its keep the moment you're sharing workflows, or collaborating, or loading someone's graph that references juggernaut.safetensors when yours is three folders deep. That said, the filename-uniqueness trap is real, and if you've got hundreds of checkpoints with generic names, the flattened menu gets just as unwieldy as the nested one. Reach for it when portability matters more than your personal folder tidy.

    Category🐯 YFG/πŸ”„ Loaders

    Inputs (1)

    NameTypeDefaultDescription
    ckpt_nameCOMBO0 options:

    Outputs (3)

    NameTypeDescription
    MODELMODELβ€”
    CLIPCLIPβ€”
    VAEVAEβ€”