Nodes/ComfyUI-Apt_Preset/IO_LoadImgBatch
ComfyUI Node

IO_LoadImgBatch

A visual gallery for stepping through a batch of images

By cardenluo·Created 2 years ago·Updated 22 days ago· 309
IO_LoadImgBatch
  • image_list_in
  • img_list
  • img_index
  • name_index
  • index
  • total
image_list
card_size64
index0

One of a handful of "visualization batch loading" nodes this pack added on top of the more basic loaders - the same idea gets applied to text, video, audio, and shot data elsewhere in the pack. IO_LoadImgBatch shows your image list as a strip of visual cards inside the node, and unlike its audio/video/text siblings, it actually carries real image data through, not just file paths.

How it works

image_list holds the multiline list you're managing, card_size (64–384, default 64) sets how big the thumbnail cards render - cosmetic only - and index (0–9999) picks which image is "current." The optional image_list_in input is typed IMAGE (not STRING, which is the type used by the equivalent input on the audio/text/video versions of this node) - so instead of feeding it a list of paths, you can feed it an actual upstream batch of loaded images to manage and step through.

Inputs and outputs

  • image_list - the list you're managing, built in the widget.
  • card_size - cosmetic card size in the gallery view.
  • index - which entry is currently selected.
  • image_list_in (optional, IMAGE) - feed a real image batch in from upstream instead of building the list by hand.

Outputs: img_list (the full IMAGE list), img_index (IMAGE - the currently-selected image itself, not just its path), name_index (STRING), plus index and total for anything downstream that needs to know its position in the sequence.

How to install it

ComfyUI Manager → search ComfyUI-Apt_Preset, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

then run install.bat for dependencies - Windows-only, so on Linux/macOS run the pip install lines inside it yourself - and restart ComfyUI.

Common issues & troubleshooting

Don't confuse this with IO_load_anyimage. That one scans a folder on disk; this one manages a list you build (or feed in) inside the workflow itself, and shows it as a visual gallery you can scrub through. Reach for this one when you're curating or reviewing a batch that already exists in the graph, and the folder loader when you're pulling files off disk.

Gallery widget renders blank or won't accept input. In-node canvas/gallery widgets are exactly the kind of thing that's broken on some packs during ComfyUI's ongoing "Nodes 2.0" frontend rewrite. If the card view stops working after a ComfyUI update, try the legacy canvas mode before suspecting the node itself.

IMPORT FAILED at startup. This pack has at least one reported import failure in the wild on a stock install, generally down to skipping the dependency step in install.bat - which won't run automatically off Windows. Check the console for the specific missing package before reinstalling.

CategoryApt_Preset/IO_Port/batch_input

Inputs (4)

NameTypeDefaultDescription
image_listSTRING
card_sizeINT6464–384
indexINT00–9999
image_list_inoptIMAGE

Outputs (5)

NameTypeDescription
img_listIMAGE
img_indexIMAGE
name_indexSTRING
indexINT
totalINT