Nodes/Comfyui-TOO-Pack/TOO Smart Image Loader πŸ–ΌοΈ
ComfyUI Node

TOO Smart Image Loader πŸ–ΌοΈ

Four ways to source an image, one node, plus its metadata

By tetsuoo-onlineΒ·Created 9 months agoΒ·Updated about a month agoΒ· 5
TOO Smart Image Loader πŸ–ΌοΈ
  • image
  • IMAGE
  • FILE_PATH
  • metadata
  • workflow
β—„seed0β–Ί
β—„img_dir_level0β–Ί
β—„show_previewtrueβ–Ί
β—„txt_pathβ–Ί
β—„img_pathβ–Ί
β—„img_directoryβ–Ί

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:

  1. image input - whatever another node feeds you. This is pass-through only; no metadata or workflow is extracted from it.
  2. txt_path - a text file with one image path per line; one is chosen at random.
  3. img_path - a direct path to a specific file.
  4. 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.

CategoryπŸ”΅TOO-Pack/image

Inputs (7)

NameTypeDefaultDescription
seedINT00–18446744073709550000β€”
img_dir_levelINT0-1–10Directory depth: -1=all subdirs, 0=current only, 1-10=levels deep
show_previewBOOLEANtrueShow image preview in the node
txt_pathoptSTRINGPath to a text file containing image paths (one per line)
img_pathoptSTRINGDirect path to an image file
img_directoryoptSTRINGPath to a directory containing images
imageoptIMAGEβ€”

Outputs (4)

NameTypeDescription
IMAGEIMAGEβ€”
FILE_PATHSTRINGβ€”
metadataMETADATAβ€”
workflowWORKFLOWβ€”