Nodes/comfy-ovum/Make Flat Image List
ComfyUI Node

Make Flat Image List

Flatten every flavor of image collection into one list Comfy can iterate

By sfinktah·Created about a year ago·Updated 10 months ago· 7
Make Flat Image List
  • arg0
  • image_list
  • images

Make Flat Image List exists because ComfyUI lets image collections arrive in three different costumes, and only a masochist wants to remember which is which. Sometimes a node hands you a single image tensor. Sometimes it's a batch (one tensor with a leading dimension). Sometimes it's a Python list of images, or a list of lists of images, or a list that includes batches. This node takes any of those - or several of them at once - and flattens everything into one clean image list you can iterate over.

It's the image-flavored sibling of Make Flat String List, and they sit in the same category for a reason: both solve "I have a pile of things in inconsistent shapes and I need a single list before I loop over them." If you've ever stared at a loop's ITEM_LIST input and wondered what shape it actually wants, this is the node that makes the question go away.

How it works

The mechanism is recursive flattening. Each input socket accepts * (any type), and the node walks the value: if it's a batch tensor it unwraps it into individual images, if it's a list it recurses into each element, if it's a single image it keeps it. Everything gets reduced to the same leaf level, then handed out two ways. It's flagged "Experimental" in the source with a "beta" badge, so treat it as utility rather than foundation.

The inputs and outputs that matter

You get one dynamic input to start (arg0, type *) and the node grows more argN sockets as you connect things - handy when you're merging three different sources (two Load Image nodes plus a batch from an upscale pass, say) into a single stream. Its two outputs cover both worlds Comfy understands:

  • image_list - a native Python LIST of image tensors, for nodes that speak list.
  • images - an IMAGE output marked as a list (is_list: true), which is what a lot of batch-aware nodes expect to chew on.

Installing it

It's part of the comfy-ovum pack by sfinktah. ComfyUI Manager is the easy path - search "comfy-ovum", install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

No models to download, no heavy dependencies - the pack's requirements are mostly already present in ComfyUI (pillow, numpy), with a handful of small extras like requests and aiohttp that Manager installs automatically.

Common issues

Because it's marked experimental, the shape-changing behavior (changeInputs can reform sockets when an output is a list) can occasionally produce a red link you didn't expect - if a downstream node rejects your list, try the other output, since the native list and the IMAGE list behave differently in different consumers. And remember it flattens all the way: if you actually needed to keep batches intact, this isn't the node you want.

Categoryovum/lists/python

Inputs (1)

NameTypeDefaultDescription
arg0opt*

Outputs (2)

NameTypeDescription
image_listLIST
imagesIMAGE