Nodes/comfyui_gvf/Load checkpoint and provide its name as a string
ComfyUI Node

Load checkpoint and provide its name as a string

The loader that tells you what it loaded

By gvfarns·Created about a year ago·Updated 9 months ago· 0
Load checkpoint and provide its name as a string
    • MODEL
    • CLIP
    • VAE
    • checkpoint name
    ckpt_name

    ComfyUI's built-in Load Checkpoint is a black box in a bad way: it hands you MODEL, CLIP, and VAE, but the name of the model you just picked vanishes into the dropdown. If you want to record which checkpoint produced an image, display it in a title, or feed the filename into a workflow that switches behavior per model, you're stuck - the dropdown selection isn't a string you can wire anywhere. CheckpointLoaderWithName (pack comfyui_gvf, category "loaders") is a drop-in replacement that fixes exactly that one annoyance.

    Don't let the "loader" category scare you off. It's not doing anything clever or risky. Under the hood it calls the same comfy.sd.load_checkpoint_guess_config() function the core node uses, with the same settings (output_vae=True, output_clip=True, embeddings folder included). The only difference is the final line: instead of returning three outputs, it tacks on the checkpoint name as a fourth.

    The single input is ckpt_name, an enum populated from the checkpoints folder - the same dropdown you'd see on the core loader. The outputs are the usual three, plus one extra:

    • MODEL - the denoising model.
    • CLIP - for encoding text prompts.
    • VAE - for encoding/decoding between images and latent space.
    • checkpoint name - the filename as a STRING, ready to wire anywhere a string is accepted.

    That last one is the entire point. Two things make it genuinely useful rather than a gimmick. First, you can drop the name into a text node or a save-with-metadata setup so every output records which model made it - the community norm of embedding full workflow metadata in PNGs doesn't capture the model name unless you add it yourself, since the loader's internal choice isn't part of the graph data. Second, you can branch on it: if the name contains a substring, swap your sampler settings or CFG, no manual reconfiguring when you swap models.

    Installing it is trivial and shared across the whole comfyui_gvf pack - Manager, search "comfyui_gvf", install, restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/gvfarns/comfyui_gvf
    

    No dependencies, no model downloads; the pack's pyproject.toml lists zero packages. One thing to know before you swap: it's exactly the core loader, so anything that fails to load in Load Checkpoint will fail here too, and the error is the same one you already know. The string output is just the filename from the dropdown, no path - so if you expected a full path, that's not what you get. Other than that, it's a straight one-for-one swap that costs you nothing and gives you a wireable model name.

    Categoryloaders

    Inputs (1)

    NameTypeDefaultDescription
    ckpt_nameCOMBOThe name of the checkpoint (model) to load.

    Outputs (4)

    NameTypeDescription
    MODELMODELThe model used for denoising latents.
    CLIPCLIPThe CLIP model used for encoding text prompts.
    VAEVAEThe VAE model used for encoding and decoding images to and from latent space.
    checkpoint nameSTRINGName of the model, as a string