Iterator Load Image
A Load Image that takes a file path instead of a picker
- image
- filename
Iterator Load Image is the file-picker-less twin of ComfyUI's core Load Image. Same job - read an image off disk, hand you a tensor - except instead of a browser dialog it takes a plain file_path string. That one difference is the whole point: a string can come from another node, which is how a folder ends up feeding itself.
The classic setup is img2img or enhancement at scale. Iterator List Files scans a folder, its file_paths output feeds this node's file_path, and ComfyUI runs the loader - plus everything downstream of it - once per file. One graph, one save-per-file at the end, no copying paths around, no dragging twenty images into a loader.
How it works
Under the hood it's basically the core LoadImage code path: PIL opens the file, ImageOps.exif_transpose corrects for EXIF rotation (so phone photos stop arriving sideways), it's converted to RGB, scaled to float32 in 0–1, and a batch dimension is added. Same [B, H, W, C] tensor every other ComfyUI image node expects. The "iteration" isn't a loop in this node - it's ComfyUI's native list expansion doing the walking.
Inputs and outputs
One input, two outputs. The input is the gotcha:
file_path(required, STRING) - markedforceInputin the source, which means there's no text widget. You can't type a path in; you must wire it from another node. That trips up everyone who installs this expecting a Load Image with a typing box. Wire it from Iterator List Files, or from any other STRING output - it's just a path.
Outputs:
image(IMAGE) - the loaded image tensor, ready for your sampler, upscaler, or whatever's next.filename(STRING) - the base name of the file, no path. This is quietly the most useful output here: feed it into your Save Image filename or a text field so each result is named after its source image.
Install
No models, no dependencies. The pack's requirements.txt is empty; the loader only uses PIL, numpy, and torch that ComfyUI already ships. ComfyUI Manager (search "ComfyUI Iterator Nodes"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/AIMovieStudio/comfyui-iterator
Restart ComfyUI and it's there.
Where people get burned
- The missing widget. Again: you cannot type into
file_path. If you're staring at an input with no box, that's not a bug - connect the wire. - FileNotFoundError red node. The loader raises if the path isn't a real file. This usually traces back to Iterator List Files listing a directory whose name ends in a matching extension (the list node checks extensions, not "is this a file"), or a path that moved since you pointed at it.
- It doesn't care about the extension. If a path resolves to a real image, it loads it regardless of the file's extension. List Files filtering wrong = weird results, not errors.
Reach for this when you want per-file runs - a discrete save and a clean filename per image. If you genuinely just want the whole folder as one batched tensor through a single pass, the core batch loader is the simpler tool. This node is for the case where each file deserves its own trip through the graph.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| filename | STRING | — |