Fix Checkpoint Name
Fix Checkpoint Name – ComfyUI Node Guide
- STRING
What it is
A one-job string node: give it a full file path to a checkpoint, and it hands back just the checkpoint's name - no folder structure, no extension. It exists for the same reason half this pack exists: somewhere in a workflow you have a full path string (from a loader, from this same pack's Select Model 20, from anywhere that reports a model's location) and you want the clean name to stamp into a filename, a caption, or metadata, without models\checkpoints\realistic\ cluttering it up.
It's the kind of node you don't think about until you need it, and then you really need it - nobody wants "C:\Users\you\ComfyUI\models\checkpoints\my_favorite_model_v3.safetensors" baked into every output filename.
How it works
Per the pack's own description, it finds the substring between the last backslash (\) and the .safetensors extension, and returns that as the checkpoint name. That's the whole algorithm - a string slice, not a lookup against your actual models folder. It doesn't validate that the file exists or that it's really a checkpoint; it just does the text surgery.
That backslash detail matters, and it's the thing to actually read carefully before you wire this in - more on that below.
Inputs and outputs
- input_text – a plain STRING (default empty), the full path you want trimmed.
- output – a single STRING: the extracted checkpoint name.
Nothing fancier than that. No tooltip is attached to the field, and the README's own description is the whole spec, so trust that over any assumption about smarter path parsing.
Installing it
It ships in the same pack as everything else here, no separate install:
cd ComfyUI/custom_nodes
git clone https://github.com/Shadetail/ComfyUI_Eagleshadow
Or search "Eagleshadow Custom Nodes" in ComfyUI Manager. No models, no extra dependencies - it's a text function, that's it.
Common issues
It only looks for a backslash. The README is explicit that it splits on \, which is the Windows path separator. If your ComfyUI install runs on Linux or macOS - which is most cloud and containerized setups, comfy.icu included - your paths use forward slashes (/), and this node's slicing logic won't find what it's looking for the way it would on Windows. Test it against a real path from your own setup before you build a workflow around it; don't assume Windows-authored path-parsing utilities carry over cleanly to a Linux path.
It hardcodes .safetensors. If you're feeding it a path to a .ckpt or .pt file, the extension it's trimming won't match, and you'll get back something with the wrong tail still attached (or the whole string unchanged, depending on how the slice fails). Since almost everyone's on .safetensors these days this rarely bites, but it's worth knowing the assumption is baked in rather than detected.
It's not a lookup, it's string slicing. Feed it garbage - a path with no backslash, or no .safetensors in it at all - and you'll get unpredictable output rather than a helpful error. This node trusts its input completely, so put it right after whatever's generating the path, not several nodes downstream where you might have already mangled the string.
Small, honest utility. Just make sure the path format it expects matches the path format your setup actually produces.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| input_text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |