CheckpointLoader (dirty)
The checkpoint loader whose filename is a text box, built for API automation
- MODEL
- CLIP
- VAE
ComfyUI's normal checkpoint loaders have the filename baked into a dropdown. That's great for clicking, useless for automation - a script posting JSON to /prompt can't reach into the UI to pick a file. CheckpointLoader (dirty) is the API-friendly version: both the checkpoint name and the config name are plain text fields, so a string arriving from anywhere (a request body, this pack's RequestInputs node, a variable) can choose which model loads.
The "dirty" in the name is the key idea: the input is loosely matched against what's actually on disk, instead of requiring the exact dropdown value. Under the hood it strips the file extension and matches against ComfyUI's checkpoint list by base filename. So "dreamshaper_8" and "dreamshaper_8.safetensors" both resolve to the same file - a small forgiveness that saves API callers from a whole class of off-by-one-string bugs.
How it works
ckpt_name(STRING) - the checkpoint. Matched againstmodels/checkpointsby base name.config_name(STRING) - the config/checkpoint's sibling entry, also matched against the checkpoints list. Leave it as whatever the model expects; for most modern single-file checkpoints this is an empty/default config, and that's fine.- Outputs:
MODEL,CLIP,VAE- identical to the standard CheckpointLoader, because it literally calls ComfyUI's ownCheckpointLoaderunder the hood after resolving the names.
Pair it with the pack's Get Models dump node: your script reads the real filename list from the JSON, picks one, sends it as a string, and this loader resolves it. That's the intended loop, and it's a tidy one.
Install
Part of bmad4ever/comfyui_bmad_nodes, under Bmad/api/dirty loaders:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_bmad_nodes
cd comfyui_bmad_nodes
pip install -r requirements.txt
Restart, or ComfyUI Manager → search comfyui_bmad_nodes. No models to download - this node only loads the checkpoints you already have.
Gotchas
The match is by base name only. If no file matches, the node sets an error state with a "File '...' not found" message and the workflow fails - so whatever feeds this node should send a name that actually exists (that's why Get Models exists). Also note both fields resolve against the checkpoints folder list; if you're trying to load a LoRA or a UNet, this isn't the node - the pack has separate dirty loaders for those. And because it delegates to ComfyUI's own loader, everything you know about that node (VRAM, which formats work) applies unchanged.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| config_name | STRING | — | |
| ckpt_name | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| VAE | VAE | — |