TOO Smart Image Loader πΌοΈ
Four ways to source an image, one node, plus its metadata
- image
- IMAGE
- FILE_PATH
- metadata
- workflow
ComfyUI's built-in Load Image only reads from input/ and only loads one file at a time. TOO Smart Image Loader is the "stop fighting the filesystem" version: it loads from a direct path anywhere on your machine, from a directory, from a text file listing many paths, or straight from another node's image output - whichever you give it, in a fixed priority order. And for anything loaded from disk, it pulls out the embedded A1111/Civitai metadata and ComfyUI workflow along with the pixels.
If you've ever wanted to load the latest render from an arbitrary folder, or pick a random image from a dataset directory for a training-preview workflow, this is the node. The metadata extraction is the sleeper feature: because this pack revolves around metadata-aware save/load, this loader hands the metadata and workflow outputs straight to the saver or the metadata editor, so a file's generation settings travel with it through the graph.
How it works. Four sources, resolved in this order of priority:
imageinput - whatever another node feeds you. This is pass-through only; no metadata or workflow is extracted from it.txt_path- a text file with one image path per line; one is chosen at random.img_path- a direct path to a specific file.img_directory- a directory; one image is chosen at random.
Random selection is reproducible via seed: seed 0 rolls a new pick every run, any positive seed locks the same pick for the same inputs. img_dir_level controls how deep the directory scan goes (β1 = all subfolders, 0 = current only, 1β10 = levels deep). Formats supported: PNG, JPG, JPEG, BMP, WEBP, TIFF.
Inputs and outputs. Required: seed, img_dir_level, show_preview (the in-node image preview, default on). Optional: the four sources above. Outputs: IMAGE, FILE_PATH (the resolved path - "external_input" when fed via the image socket, "none" on failure), metadata, and workflow.
Install.
cd ComfyUI/custom_nodes
git clone https://github.com/tetsuoo-online/Comfyui-TOO-Pack
or ComfyUI Manager β "Comfyui-TOO-Pack" β restart. No heavy dependencies.
Gotchas. When you feed the image socket, expect FILE_PATH to be "external_input" and metadata to be empty - that path has no file to parse, and that's by design, not a bug. And keep the metadata story in mind: the KB's image-io-metadata doc points out that any file that's been re-encoded (screenshots, Reddit re-uploads, JPEG conversions) has had its embedded workflow stripped - so if metadata comes back empty from a PNG, check whether the file survived a re-encode, not the node. Otherwise it's the loader you'll wish core shipped.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00β18446744073709550000 | β |
| img_dir_level | INT | 0-1β10 | Directory depth: -1=all subdirs, 0=current only, 1-10=levels deep |
| show_preview | BOOLEAN | true | Show image preview in the node |
| txt_pathopt | STRING | Path to a text file containing image paths (one per line) | |
| img_pathopt | STRING | Direct path to an image file | |
| img_directoryopt | STRING | Path to a directory containing images | |
| imageopt | IMAGE | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| FILE_PATH | STRING | β |
| metadata | METADATA | β |
| workflow | WORKFLOW | β |