Nodes/Eden.art nodesuite/Eden_RepeatLatentBatch
ComfyUI Node Runs on cloud

Eden_RepeatLatentBatch

Duplicate every latent in a batch β€” the boring node that unblocks batch workflows

By edenartlabΒ·Created 3 years agoΒ·Updated 6 months agoΒ· 119
Eden_RepeatLatentBatch
  • samples
  • LATENT
β—„amount1β–Ί

Eden_RepeatLatentBatch does exactly one thing: takes a batch of latents and repeats every sample in it amount times. It sounds pointless until you're trying to do something like "generate five variations of each of these four reference prompts" and realize the standard batch nodes hand you the whole batch and walk away. This is the node that turns one latent into a scaffold you can fan out across a workflow.

It ships in eden_comfy_pipelines, Eden.art's 70+ node suite (MIT-licensed, the same pack behind the creative tools on eden.art). This one lives in the "general" utility bucket, and it's a genuinely useful part of it.

What it does under the hood

The mechanism is simple: it copies your latent tensor and repeats each sample along the batch axis, so a batch of [A, B] with amount = 3 comes out as [A, A, A, B, B, B] - not [A, B, A, B, A, B]. The order matters. If you're pairing each repeated latent with a different value further down the graph, you want to know exactly how the ordering maps.

Two inputs, both easy:

  • samples - the LATENT tensor you want to fan out.
  • amount - how many copies of each latent (1–1024, default 1).

One output, LATENT, which you feed straight into a KSampler or into whatever consumes the expanded batch.

It's also polite about the extras that live inside a latent dict. If your samples carry a noise_mask (from an inpainting workflow), it gets repeated along with the tensor, and the batch_index bookkeeping is updated so downstream nodes that track per-sample identity don't get confused. That's the kind of detail that separates a utility node you can trust from one that silently scrambles your masks.

When you'd actually reach for it

Three patterns come up constantly. First, variation batches: repeat each latent N times, then give each copy a different seed or prompt via a shared counter, and you get N variations per source. Second, video frame math: image-to-video and frame-interpolation nodes often want a specific number of frames, and repeating a keyframe latent is the cheapest way to build that base sequence. Third, latent-level copy for side-by-side comparisons - repeat a latent and feed one copy through a different sampler path so you can compare outputs from identical inputs.

The one real warning

Memory. Repeating a latent multiplies its footprint in VRAM by amount before the sampler ever runs. A batch of 4 latents repeated 64 times is 256 latents in memory; on a consumer card that's how you get OOM errors that look like they came out of nowhere. Start small, confirm your graph actually consumes what you produce, then scale the number up. The amount input maxes at 1024, but "maxes at 1024" is not the same as "you should use 1024."

Installing it

Standard pack install - ComfyUI Manager (search "eden"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines.git
cd eden_comfy_pipelines
pip install -r requirements.txt

Restart ComfyUI and it shows up under Eden 🌱/general. No models, no keys, no downloads - this node is pure tensor plumbing.

CategoryEden 🌱/general

Inputs (2)

NameTypeDefaultDescription
samplesLATENTβ€”
amountINT11–1024β€”

Outputs (1)

NameTypeDescription
LATENTLATENTβ€”