Read Image from Path
The one-file loader, when you know exactly which file
- image
- file_stem
The simplest of this pack's three image loaders. KY_Load_Images_from_path bulk-loads an entire folder; KY_LoadImageFrom flexibly handles a path, URL, or base64 string interchangeably. This one does exactly one thing: read a single image from a known path on disk, and hand it back along with the filename minus its extension.
Why the simple version is still worth having
When you already know exactly which file you want - the path came from another node's output, a loop variable, or you're just testing one specific image - pulling in the flexibility of KY_LoadImageFrom or the batching machinery of KY_Load_Images_from_path is more than you need. This node is the direct, no-frills equivalent: one path in, one image out, plus the filename stem for free.
Inputs and outputs
One required input: image_path, a STRING with the default "images". Worth flagging directly: that default isn't a valid single-file path on its own - it reads like a leftover placeholder rather than something meant to work out of the box, so always override it with a real file path before running the node.
Two outputs: image (IMAGE) and file_stem (STRING - the filename without its extension, extracted automatically so you don't need a separate parsing step just to reuse the original name downstream).
Where this fits
Pairs well with this pack's own KY_FilePathAnalyzer if you need more than just the stem (the extension, the parent folder, the full path all separately), or in a loop that iterates over file_names coming out of KY_Load_Images_from_path one at a time when you need per-image control that the batched loader's all-at-once approach doesn't give you.
Installing it
ComfyUI Manager: search ComfyUI-KYNode, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/yorkane/ComfyUI-KYNode
Restart ComfyUI. No external dependencies - a straightforward file read.
Common issues
The default image_path value of "images" will fail if you run the node without changing it - it's not a real single-file path, so treat it purely as a placeholder to replace, not a working example.
There's nothing in the schema suggesting graceful handling of a missing or corrupt file - expect a hard error rather than a fallback or a blank output if the path doesn't resolve to a real, readable image.
Relative paths are resolved relative to wherever ComfyUI's process is actually running from, which isn't always what you'd assume, especially on a portable/embedded install or a containerized deployment - use an absolute path, or a path within ComfyUI's own input folder convention, if you're getting a not-found error despite the file clearly existing somewhere on disk.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image_path | STRING | images | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| file_stem | STRING | — |