Image From Folder π Just Nodes
Load images by index from any folder β for when the input dir is too small
- image
- text
Image From Folder is the node you grab when your images live somewhere other than ComfyUI's input directory. Point it at any absolute folder path, give it an index, and it loads that folder's image - sorted by filename - straight out of the list. No copying files into input/, no drag-and-drop, no dropdown of a thousand thumbnails.
This is the workhorse of "I have a directory of stuff and I want to process it one at a time" workflows. A folder of frames for a video pass, a pile of reference shots for batch upscaling, a dataset you're walking through for captioning. Since the index is just an integer input, you can drive it from anything that produces an int - the pack's Labeled Index, a Batch Stepper, a Picker - and walk through the folder hands-off. Need image 7 of 40? Set index to 7 (zero-based) and run.
Mechanically it's straightforward: the folder is listed, image extensions (.jpg, .jpeg, .png, .webp) are filtered, the files are sorted, and index picks the entry. EXIF orientation is respected, the image is normalized to a batch-of-one tensor on the image output, and - the pack's signature move - if the file was saved with embedded just_text metadata, that text comes out on the text output. Load a folder of the pack's own Save Image With Text outputs and you get image plus caption pairs for free, no input-directory gymnastics.
A handy front-end extra: the node has a scan folder button that hits the server and reports how many images it found, so you can sanity-check the path before you run. The server-side count only includes image extensions, matching what the loader will actually see.
Installing it
Same as every Just Nodes node: ComfyUI Manager β search "Just Nodes" β install β restart, or cd ComfyUI/custom_nodes && git clone https://github.com/Arroz-11/ComfyUI-Just-Nodes.git. No models, no extra dependencies, MIT licensed.
Gotchas
- The path must be absolute and visible to the ComfyUI server process. A relative path or a folder on another machine won't resolve.
- Index is into the sorted file list, zero-based, and out-of-range raises an error that stops the run - there's no wrap-around. That's why a stepper or check before you run is worth it.
- Text output only works for PNG
just_textmetadata (same limitation as Load Image With Text); JPEG/WebP sidecar captions aren't picked up. - Scanning is just a count - the button doesn't preload or validate every file, so a corrupt image still fails at load time.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| folder | STRING | β | |
| index | INT | 00β18446744073709550000 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| text | STRING | β |