Nodes/ComfyUI-lhyNodes/Checkpoint Name
ComfyUI Node

Checkpoint Name

One dropdown controls every checkpoint loader in your graph

By lihaoyun6·Created 12 months ago·Updated 13 days ago· 20
Checkpoint Name
    • ckpt_name
    ckpt_name

    Here's the problem CheckpointName solves: you've got a workflow with three loaders that all need the same model, or you want to stamp the model name into your output filename, and the model name is currently typed in three separate widgets. Change it in one place, forget the other two, and suddenly half your graph is running a different checkpoint. This node gives the name one authoritative source: a dropdown of your checkpoints, and a string out.

    It's a "value node" - the plumbing-layer pattern the KB calls the antidote to repetition. It doesn't load anything. It just turns a widget choice into a wire.

    How it works

    The dropdown is populated live from ComfyUI's checkpoint folder (folder_paths.get_filename_list("checkpoints")), so whatever you've dropped into models/checkpoints shows up, including subfolders. Select one, and the node passes that exact filename string straight through to the output. The output type is the pack's "any" type, which means it'll connect to nearly any socket that accepts a string - a loader's filename input, a text node, a filename-prefix widget.

    That last part is the sleeper use. Because it's text, you can wire the model name into a filename formatter and get render_Anything-v5_a1s.0001.png instead of guessing which checkpoint produced an output. Or feed it into a log/comparison node.

    Inputs and outputs

    • ckpt_name - the dropdown. The author's own tooltip: "The name of the checkpoint (model)." That's the whole input.

    One output: ckpt_name (*), the selected filename as a string.

    The real pattern: convert the loader to an input

    The intended move is to right-click CheckpointLoaderSimpleConvert ckpt_name to input, then wire this node's output into that socket. Now the dropdown on the loader disappears and the single dropdown on CheckpointName controls it. Do the same to a second loader and both follow one selection. You've just made model-switching a one-click operation instead of a hunt.

    The same trick works with the pack's sibling nodes - CLIPName, CLIPVisionName, ControlNetName and the rest all follow this exact shape, so learning one teaches you the family.

    Installing it

    Part of ComfyUI-lhyNodes:

    • ComfyUI Manager → search lhyNodes → Install, restart.
    • Or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
    python -m pip install -r ComfyUI-lhyNodes/requirements.txt
    

    Restart ComfyUI.

    Where people get burned

    The obvious trap: this node does not load the model. If you delete the loader and wire this straight to a sampler, nothing works - you still need a CheckpointLoaderSimple; the name node just tells it which checkpoint. Also, the dropdown is snapshot at workflow-load: rename or delete the file and a saved workflow will either fail validation or silently point at a stale name, so re-check the selection after reorganizing your models folder. Small price for finally having one dropdown that rules them all.

    CategorylhyNodes/Utils

    Inputs (1)

    NameTypeDefaultDescription
    ckpt_nameCOMBOThe name of the checkpoint (model).

    Outputs (1)

    NameTypeDescription
    ckpt_name*