Nodes/ComfyUI/Repeat Image Batch
ComfyUI Node Runs on cloud

Repeat Image Batch

The copy node that's easy to misread

By Comfy-Org·Created 4 years ago·Updated about 6 hours ago· 129,874
Repeat Image Batch
  • image
  • IMAGE
amount1

Sometimes you want the same image to show up a bunch of times. Not as separate files, but as a batch - multiple identical copies stacked together so a sampler or a video node can process them as one unit. Repeat Image Batch is the node for that, and it's about as simple as ComfyUI gets: one image in, amount copies out.

But the name is a trap, and it's worth knowing exactly which dimension it repeats before you build a workflow on it.

How it works

Under the hood it's a single call: image.repeat((amount, 1, 1, 1)). In torch, that repeats the batch axis (the first one) amount times and leaves height, width and channels untouched.

Here's the subtle part. If you feed it a batch of 1 - a single image - you get exactly amount copies of that image. That's the intuitive reading of the name. But if you feed it a batch of 3, you don't get amount copies of one of them; you get the entire batch repeated amount times, so the output is amount × 3 frames. Each of your three images appears amount times, in order.

So the mental model that never fails: Repeat Image Batch multiplies whatever batch it's handed. One frame in, N out. Three frames in, 3N out. It's the exact opposite of Image From Batch, which pulls one image out of a batch - which is why the two often appear as mirror images in workflows.

The inputs that matter

  • image - the IMAGE you want to duplicate. A single frame (batch of 1) if you want amount identical copies.
  • amount (default 1, range 1–4096) - the repeat count. Yes, the minimum is 1, which is a no-op, so it defaults to "don't change anything."
  • Output: one IMAGE with amount (or amount × input batch) frames.

When you'd actually use this

  • Matching batch counts. Some workflows need the same number of frames on every branch of a merge - if one branch produces 8 frames and another produces 1, repeating the 1 up to 8 makes the ImageBatch/concat happy.
  • Frame padding in animation. You've got 12 frames and you want each one held for 2 steps - repeat the whole batch by 2 and you've got the frames in the right order for a hold.
  • Batch-identical processing. You want a sampler to generate amount variations that start from the same image (same seed), which is a legit way to farm seed results.

Common issues

  • "It repeated all of them, not the one I wanted." The whole batch gets repeated, not a single member. If you want one image duplicated, make sure its batch is 1 first (drag a single image out, or use Image From Batch).
  • Order surprise. Copies come out in order: batch [A, B] with amount 3 → A A A B B B. If you expected A B A B A B, this isn't the node - that's interleaving, which this doesn't do.
  • Thinking it's a "duplicate to file" node. It's a tensor-level copy inside the graph. Nothing is saved; you still need a Save Image node if you want files on disk.

One more thing

It's worth noting the sibling relationship again: Image From Batch extracts a sub-batch, Repeat Image Batch expands it, and together they're the two ends of "slice the batch, then restore it." If you understand that the batch dimension is just the first axis of a tensor, both nodes stop being magic.

Ships with ComfyUI core, no install, no models. One input, one number, and a lot of identical frames.

Categoryimage/batch

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
amountINT11–4096

Outputs (1)

NameTypeDescription
IMAGEIMAGE