ComfyUI Node

Multi Repeat

A ComfyUI node in Zuellni/Multi with 4 inputs and 3 outputs.

By Zuellni·Created 3 years ago·Updated 3 years ago· 43
Multi Repeat
  • images
  • latents
  • masks
  • IMAGES
  • LATENTS
  • MASKS
batch_size1

This is the pack's most honest node: Multi Repeat takes a batch and repeats it. One input - batch_size - and it duplicates whatever tensors you feed it along the batch dimension. That's the entire job, and it's a job you actually need more often than you'd think.

What it is

Multi Repeat accepts images, latents, and/or masks, and repeats each along the batch axis batch_size times (1–64). A single image in becomes a batch of N identical images. A batch of 4 becomes a batch of 32 (it repeats the whole batch, not each element individually - so 4 images with batch_size=4 gives you the same 4 repeated 4 times, in order). That's an important distinction: it's repeat(), not expand() or "make me N variations."

Why this exists

Batches are the currency of ComfyUI, and several core nodes demand them. The classic case: you have one image and want to run a batch-aware process - like sampling multiple seeds from the same conditioning, or a video/AnimateDiff node that needs N frames. Rather than fussing with repeat nodes per type, one Multi Repeat pads your batch to the size the downstream node wants.

Another honest use: VRAM budgeting. Some samplers behave differently with batch size 1 vs batch size N (batch 1 can use a faster attention path). If a node is refusing to run at batch 1, repeating to batch 2+ can route around the optimization - a crude trick, but a real one people use.

The behavior details

  • batch_size=1 is a passthrough - nothing changes, which makes it safe to leave in a workflow.
  • Unconnected inputs pass through untouched, same as the rest of the Multi family.
  • It's cheap: repeating a tensor along the batch axis is a stride trick in torch, not a copy-heavy operation in practice. No VRAM explosion beyond what the bigger batch inherently costs.

The trap

Because the repeated entries are identical, any downstream node that treats batch entries as independent will produce the same result N times. If you wire Multi Repeat → KSampler expecting N variations, you'll get N copies of the same image (unless the sampler itself varies per item, e.g. via per-seed conditioning). For "N copies of the same input," it's perfect; for "N variations," it's the wrong tool - you want to vary the seed or conditioning before the sampler, not repeat after it.

Install

Part of Zuellni/ComfyUI-Custom-Nodes, via ComfyUI Manager (search "Zuellni") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Zuellni/ComfyUI-Custom-Nodes

Pure torch, no extra requirements, no downloads. The pack is archived but this is the kind of node that's too simple to rot. If you ever find yourself reaching for it and wishing it had more control (repeat per-element, tile patterns, etc.), core ComfyUI's batch/reshape nodes plus a RepeatLatentBatch-style node cover most of the same ground - but for the plain "make this batch bigger" job, this is the one.

CategoryZuellni/Multi

Inputs (4)

NameTypeDefaultDescription
batch_sizeINT11–64
imagesoptIMAGE
latentsoptLATENT
masksoptMASK

Outputs (3)

NameTypeDescription
IMAGESIMAGE
LATENTSLATENT
MASKSMASK