Nodes/Comfyroll Studio/โš™๏ธ CR Latent Batch Size
ComfyUI Node Runs on cloud

โš™๏ธ CR Latent Batch Size

Pad a single latent up to N for one sampling pass

By Suzie1ยทCreated 3 years agoยทUpdated 2 years agoยท 1,296
โš™๏ธ CR Latent Batch Size
  • latent
  • LATENT
โ—„batch_size2โ–บ

Simple job, does exactly what it says: take a single latent and pad it out to a batch of N so your next sampler pass produces multiple images from one setup instead of one. If you've built a single-image workflow and want four variations from the same prompt without rebuilding anything, this is the one-node fix.

How it works

A latent tensor coming out of an Empty Latent Image (or anywhere else) normally represents a batch of 1. This node takes that latent and repeats it up to batch_size, producing a new LATENT with that many entries. Feed it into your KSampler and - assuming your sampler's own seed handling varies per batch item, which is the ComfyUI default - you get batch_size distinct images from a single sampling call, instead of running the sampler batch_size separate times by hand.

It's functionally the same idea as ComfyUI's own "Repeat Latent Batch" node. Comfyroll ships its own version so it sits alongside the rest of the pack's Core/Essential nodes without pulling in a separate dependency.

Inputs and outputs that matter

  • latent - the LATENT to expand. Usually straight from your Empty Latent Image or VAE Encode.
  • batch_size - an integer, 1 to 999, default 2. This is the only real knob.
  • Output is a single LATENT at the new batch size, ready for your sampler.

How to install it

ComfyUI Manager: search "Comfyroll Studio", install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, restart. No models or extra dependencies - this is a pure tensor operation, and it works the moment the pack loads.

Common issues

The main thing to know before you crank batch_size up: VRAM scales roughly linearly with it. A batch of 8 at a resolution that's comfortable at batch 1 can blow your VRAM budget, especially on SDXL or anything larger. If you get an out-of-memory error right after adding this node, that's the cause - bring the number back down, or move the multiplication later in the graph, since batching after an upscale is far more expensive than batching before it.

There's no per-item seed control on this node itself - it just repeats the latent; whatever varies between the resulting images comes from your sampler's own batch-index seed behavior, not from anything this node configures.

If the node itself doesn't appear after installing, it's the usual Comfyroll pack-wide issue: this is one of roughly 200 nodes registered from a single set of files, and a broken import somewhere else in the pack (a missing dependency in an unrelated section) can take the whole registration down and throw a console error naming a class that has nothing to do with this one. Reinstall cleanly with a fresh git clone rather than debugging pip line by line.

Category๐Ÿงฉ Comfyroll Studio/โœจ Essential/๐Ÿ“ฆ Core

Inputs (2)

NameTypeDefaultDescription
latentLATENTโ€”
batch_sizeINT21โ€“999โ€”

Outputs (1)

NameTypeDescription
LATENTLATENTโ€”