๐ผ> Load Image
The vanilla loader, plus the filename output ComfyUI forgot to ship
- IMAGE
- MASK
- FILENAME
This is deliberately not a reinvention. The author's own description in the README is blunt about it: "Basically the same like the ComfyUI vanilla node, but with a filename output." If you've ever needed to know the name of the file you just loaded - to reuse it in an output filename, log it, or match it against something else in the workflow - the built-in Load Image simply doesn't tell you, and this is the drop-in replacement that does.
It's a small enough addition that it's shown up on Reddit as the answer to "why can't I find a filename option on Load Image" threads - someone pointed a confused user at this exact node as a stand-in when they thought a filename output should've been part of vanilla ComfyUI.
How it works
Functionally identical to the built-in loader: pick an image from your input directory via the dropdown, it loads the IMAGE and its alpha-channel MASK the same way vanilla does. The addition is a third output carrying the filename, with a toggle for whether the file extension comes along for the ride.
The inputs and outputs that matter
image- a dropdown of files in your ComfyUIinputdirectory, same selection UI as the vanilla node.strip_extension(BOOLEAN, defaulttrue) - when on, the filename output drops the.png/.jpgsuffix (example.pngbecomesexample). Turn it off if you want the extension preserved, say for logging exactly what file was loaded.
Three outputs: IMAGE, MASK (the standard alpha/transparency mask vanilla Load Image also provides), and FILENAME (STRING) - feed that last one into Text Combine to build a matching output filename in Save Image, so a batch of processed images keeps traceable names instead of a generic auto-incrementing counter.
How to install it
Via ComfyUI Manager: search "yanc" or "YANC - Yet Another Node Collection," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ALatentPlace/ComfyUI_yanc
then restart. No extra dependencies or model downloads - it wraps the same image-loading path ComfyUI's own loader uses.
Common issues & troubleshooting
You only need this for the filename output, and it feels like overkill for one feature. Fair - if all you need is a filename to string, this is still the lightest way to get it without writing a custom node yourself; the alternative of parsing a filename out of a full path via a text/regex node elsewhere is more moving parts for the same result.
Extension shows up when you didn't want it (or vice versa). That's strip_extension - default is true (extension stripped), so if you're seeing .png in your filename output, someone (possibly a saved workflow you didn't build) flipped it to false.
Dropdown doesn't show a newly added image. Same limitation as vanilla Load Image - the dropdown is populated from what's in the input directory at the time the ComfyUI page loaded or was last refreshed. Drop a new file in and it won't appear until you refresh the browser tab or restart, same as the built-in node.
You actually wanted to load from a subfolder or iterate through a batch. This node is single-file-at-a-time, same as vanilla. For folder-based loading (random pick or index-driven iteration), use YANC's separate Load Image From Folder node instead.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png | |
| strip_extension | BOOLEAN | true | โ |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | โ |
| MASK | MASK | โ |
| FILENAME | STRING | โ |