ImageDuplicator
Need N copies of one image in the graph? This is the node for it
- images
- IMAGE
Sometimes the problem isn't that you have too many images in a batch - it's that you have one image and need several copies of it, right there in the graph, ready to be processed differently. That's ImageDuplicator: take a single IMAGE tensor, hand you back N of them, stacked into one batch.
It ships in the same pack as ImageSelector, and the mental model is exactly the inverse. ImageSelector narrows a batch down; ImageDuplicator grows one. The README puts both under image, and they're companion utilities for that "I have a batch, I want a different batch" class of problem.
Why would you want copies? The honest answer: a lot of the time it's scaffolding for workflows that consume batches. You've got one source image you want to run through several different img2img variants, or you want to feed a fixed reference image into a node that expects a batch, or you're building a comparison grid where the same image needs to appear N times. It's also the image half of the "encode once, then duplicate" pattern the author recommends - encode your image to a latent once, duplicate the latent, then run N sampling passes, rather than round-tripping through the VAE repeatedly.
Inputs and outputs
images(IMAGE) - your input tensor, whether it's a single image or an existing batchdup_times(INT, default 2, range 1–16) - how many copies you want total- Output: IMAGE with the batch dimension multiplied by
dup_times
dup_times=1 is a no-op - you get the input back, which is occasionally handy as a passthrough but mostly a sign you should just delete the node. dup_times=2 with a single input image gives you a 2-image batch of identical images. If you feed in a batch of 3 and set dup_times=2, you get 6: each source image repeated twice, in order. The source clones the tensor and concatenates, so there's nothing clever happening - pure memory cost, no processing.
Install
It comes with the same pack as the selector, so this is the easiest install in the book: no dependencies beyond stock ComfyUI, no models to fetch. Either grab it from ComfyUI Manager (search "Image Selector"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/SLAPaper/ComfyUI-Image-Selector
Restart ComfyUI and all four nodes - ImageSelector, ImageDuplicator, and the two latent variants - appear.
A couple of honest caveats
The copy is identical pixels. If you duplicate one image and feed all the copies into a single KSampler with one seed, you'll get identical outputs - that's the ComfyUI batch-seed behavior biting again, not the node misbehaving. To get different results from identical copies, you need something that varies per batch slot: different seeds, different conditioning, different control images. Also, don't use this to make a batch when you actually wanted several variants of a generation - that's a random-seed workflow, and this node has nothing to do with variety. It duplicates. That's the job, and it does it cleanly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| dup_times | INT | 21–16 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |