Batch Size Selector
Why a batch-size node earns its keep
- batch_size
Batch Size Selector is a single integer that exists so your batch size lives in exactly one place. You type 4 into it once, wire it to three samplers, and every one of them renders four images per run - and when you drop to 1 to test something fast, they all drop together. No hunting through three KSamplers for the widget you forgot.
This is the classic "one source, many consumers" pattern from the plumbing layer of ComfyUI. The node does nothing to the data: it takes an integer widget and passes it straight through. What it gives you is a value you can fan out from one socket, the same way a seed node fans out a seed. The alternative - typing the batch size into each sampler's widget and remembering to keep them in sync - is how you end up with a base render at batch 4 and a detail pass silently running at batch 1.
The inputs that matter
There's only one, and it's the whole node:
- batch_size - an integer from 1 to 64. Type it in, that's it.
The single output is also batch_size, an INT, which you wire into any sampler's batch_size input. In practice that means right-clicking a KSampler's batch_size widget, choosing "Convert to input," and plugging this node in. The same trick works on detailer nodes, hi-res-fix samplers, and the latent source if you're generating a grid.
Where it actually helps
Two workflows make it worth the two seconds to drop in:
- Multi-pass pipelines - base render, then a detail pass, then maybe a second upscale pass. If all of them share the batch size, changing one number changes the whole run, and they can't drift apart.
- Batch-to-video or grid work - when you're deliberately rendering N variations and every stage needs to stay at N.
It's also handy if you want the batch size controlled from outside the sampler - say, driven by a global value further up the graph.
Install
It ships in the duckcomfy personal nodes pack. Easiest path: ComfyUI Manager → search "duckcomfy personal nodes" → Install, then restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/duckcomfy/duckcomfy_personal_nodes
Restart ComfyUI and the nodes appear under the duckcomfy category. The pack declares zero Python dependencies and needs no model downloads, so this is a fast, low-risk install. Worth knowing: the pack is one person's grab-bag - a lot of nodes (including this one) were copied from other suites to cut down on dependencies and third-party update risk. That's the reason the node exists at all; nobody wrote an original batch-size selector.
Gotchas
There are basically none, which is the point of a pass-through node. The only thing that trips people is expecting it to set a batch of latents - it doesn't. It just emits the number. The sampler you wire it into decides what the number means. If you convert a sampler widget to input and connect this, make sure you connected to the right socket, because a batch-size mismatch between two samplers is silent: you just get fewer images than you asked for and no error.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| batch_size | INT | 11–64 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| batch_size | INT | — |