Nodes/ComfyUI Layer Style/LayerUtility: Image List To Batch(Multi)
ComfyUI Node Runs on cloud

LayerUtility: Image List To Batch(Multi)

Image List To Batch (Layer Style)

By chflame163·Created 3 years ago·Updated 4 days ago· 3,113
LayerUtility: Image List To Batch(Multi)
  • image
  • image

Image List To Batch fixes one of ComfyUI's most annoying gotchas: the difference between a list and a batch. They look identical on the wire, but nodes treat them very differently, and mixing them up is why a workflow that "should work" throws a shape error or only processes the first image. This node takes an image list and packs it into a single batch tensor so the downstream node does what you meant.

Quick refresher, because this is the whole reason the node exists. In ComfyUI, a list is many separate items that flow through one at a time - the graph runs once per item. A batch is multiple images stacked into one tensor that a node processes together in a single pass. Loaders and some custom nodes emit lists; samplers, savers, and most image ops expect batches. When a batch-expecting node receives a list, you get either an error or silently-wrong behavior. This node is the adapter between the two.

The interface is as minimal as it gets. One input, image, which is your list of images. One output, image, which is those same pictures combined into a batch. Drop it right after whatever produced the list - a multi-image loader, a "load images from directory" node, the output of a per-item process - and feed its batch output into whatever needs a batch (a save node, a grid maker, a batched sampler).

The one real subtlety: batching requires every image to share the same dimensions, because a batch is a single rectangular tensor. This node's display name flags it as the "(Multi)" variant, which is built to cope with images of differing sizes rather than choke on them - but be aware that reconciling mismatched sizes means something has to give (padding or resizing), so if precise dimensions matter downstream, normalize your images to one size first and you'll have zero surprises. If they're already uniform, it's a clean, lossless repack.

Where it shows up in practice: loading a folder of images and needing to run them through a batched node, collecting the results of a per-image loop back into one batch to save as a set, or building a grid/contact sheet. Any time the error message mentions a shape or list/batch mismatch, this node (or its reverse) is usually the missing piece.

Installation is via the ComfyUI Layer Style pack - this node ships inside it. ComfyUI Manager: search "ComfyUI Layer Style," install, restart. Manual route: cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt in your ComfyUI Python environment and restart. No model download.

Troubleshooting is mostly the pack-level story that hits everything here: Layer Style is a large, dependency-heavy pack, and its most frequent failure is the whole pack showing "import failed" in the Manager (usually a transformers version conflict), which makes every node in it - this one included - disappear from your menu at once. If Image List To Batch isn't in your list, that's why. Reinstall the pack, try the Manager's "Try Fix," and reinstall the requirements into ComfyUI's actual environment if it persists. Node-specifically, if a batch op downstream still complains, double-check your images really are the same size - that's the constraint a batch can't get around.

Category😺dzNodes/LayerUtility/Data

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE