ComfyUI Node

List of Images

Eight Sockets, One Bundle, and the Pack's One Actually-Useful Node

By BXYMartin·Created 2 years ago·Updated 2 years ago· 3
List of Images
  • any_1
  • any_2
  • any_3
  • any_4
  • any_5
  • any_6
  • any_7
  • any_8
  • images

Of the five nodes in BXYMartin/ComfyUI-InstantIDUtils, this is the one that actually behaves like a ComfyUI node. ListOfImages takes up to eight separate images and bundles them into a single output, so downstream list-capable nodes can process them all as one flow. It's the pack's quiet workhorse - and it exists for a very specific reason.

Why it exists

The pack was written to support BXYMartin's InstantID implementation, and InstantID-style identity work is happier with more than one reference. One photo gets you a likeness; two or three front-facing shots of the same person get you a steadier one, and multi-reference workflows routinely want to feed a batch of faces through an adapter together. In ComfyUI, "a batch of images" is usually one tensor with a batch dimension - but when your references arrive as separate tensors from separate LoadImage nodes, you need something to join them. That's this node.

How it works

The schema is refreshingly boring:

  • optional inputs any_1any_8 - all type IMAGE
  • output images - type IMAGE

The source collects whatever inputs aren't None into a Python list and returns it with a comment explaining the oddity: "yes, double brackets are needed because of the OUTPUT_IS_LIST... ¯_(ツ)_/¯" That shrug is doing real work. The node does not declare OUTPUT_IS_LIST, so the double brackets wrap your list of tensors in a way that ComfyUI passes through as a single value - meaning the thing downstream actually receives is a Python list of image tensors, not a single batched tensor.

That distinction matters. A list is not the same as a batched tensor. Many core nodes accept a list and iterate over it fine (VAEEncode, PreviewImage, anything with standard list handling), but a node that demands a proper batched tensor will complain. If you hit that, you're one step away anyway - the list is in order, so join it with any batch-stacking node.

The inputs that matter

Really only one thing to know here: order is preserved, and only connected inputs count. The node iterates any_1 through any_8 in order and skips empties, so the list you get out has the same order as the sockets you filled, with gaps removed. It's fixed at eight slots - that's a hard ceiling, not a suggestion. If you need nine references, you'll need a second ListOfImages or a different approach.

Install

Same story as every node in this pack - the repo has no README, so:

cd ComfyUI/custom_nodes
git clone https://github.com/BXYMartin/ComfyUI-InstantIDUtils

Restart ComfyUI, or use ComfyUI Manager and search ComfyUI-InstantIDUtils. No model files, no insightface, nothing to download. The only dependency in requirements.txt is diffusers, and this node doesn't even use it.

Troubleshooting

  • "Type error: expected IMAGE": downstream got a list, not a batched tensor. Feed it to a node that handles lists, or stack the list into a batch first.
  • Nothing comes out: all eight inputs were empty. The node returns an empty list if you connect nothing - check your wires.
  • Out of order: you probably swapped two sockets. There's no reordering inside the node; the output follows the input order.

Fair warning about the ecosystem this belongs to: it's an InstantID-era helper from March 2024, untouched since May 2024. The multi-reference use case it serves is still real - but if you're starting fresh on a modern model, identity work has moved on (on Flux, that's PuLID's job). The node itself remains perfectly usable on any architecture for one job: turning several images into one list.

CategoryControlNetUtils

Inputs (8)

NameTypeDefaultDescription
any_1optIMAGE
any_2optIMAGE
any_3optIMAGE
any_4optIMAGE
any_5optIMAGE
any_6optIMAGE
any_7optIMAGE
any_8optIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE