Nodes/ComfyUI Easy Use/easy batchAnything
ComfyUI Node Runs on cloud

easy batchAnything

Glue two of anything into one batch

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
easy batchAnything
  • any_1
  • any_2
  • batch

Two images, and you want them to travel through the rest of the graph as a single batch of two. Or two latents. Or two conditionings. easy batchAnything does that - it takes two inputs of (almost) any type and combines them into one batch. Simple, and it quietly saves you from hunting down the type-specific "batch images" / "batch latents" node every time.

The type-agnostic * inputs are the reason it earns its spot in the Logic category. One node instead of five specialized ones.

How it works

It stacks its two inputs along the batch dimension and hands back one combined object. Because the inputs are wildcard-typed, it adapts to whatever you plug in - feed it two IMAGEs and you get a 2-image batch; feed it two LATENTs and you get a 2-latent batch. The catch is that the two inputs have to be the same kind of thing and compatible in shape (see troubleshooting).

The inputs and outputs that matter

  • any_1 and any_2 - the two things to combine. Both required, both wildcard-typed.
  • batch - the combined output. Wire it into whatever consumes a batch: a sampler, a save node, a preview.

That's the whole node. No settings, no modes - which is the point.

How to install it

ComfyUI Manager: search ComfyUI-Easy-Use, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use

then install.bat / pip install -r requirements.txt, restart. No models.

Common issues & troubleshooting

Mismatched sizes fail. Batching stacks tensors, and tensors have to line up. Two images of different width/height can't be stacked into one batch - you'll get a shape error. Run them through easy imageScaleDown (or any resize) to a common size first, then batch.

Batch vs. list confusion. This makes a batch (one tensor with a batch dimension), not a list (separate items processed one at a time). They behave differently downstream: a batch goes through a sampler in one shot, a list re-runs the node per item. If a downstream node wants a list, convert with easy imageBatchToImageList. Getting these two mixed up is the most common head-scratcher with all of Easy-Use's batch/list nodes.

Only two inputs. batchAnything takes exactly two. Need to batch a whole pile? Chain them - feed the batch output of one into any_1 of the next - or use a list-oriented node if you're assembling many items.

Combining incompatible types. Two different types (an image and a latent) won't batch sensibly. Keep both inputs the same kind of thing.

CategoryEasyUse/Logic

Inputs (2)

NameTypeDefaultDescription
any_1*
any_2*

Outputs (1)

NameTypeDescription
batch*