Image Batch Boolean
Conditionally batch two images, or quietly pass one through
- image1
- image2
- IMAGE
There are workflows where a second image is optional - you batch two references when you have them, and you want to quietly fall back to one when you don't. Image Batch Boolean is the Flux Continuum pack's answer: it takes two images and a batch_enabled toggle. Toggle on, it concatenates them into a single batch. Toggle off, it passes image 1 through untouched. Simple, and the lazy-loading makes it smarter than it looks.
How it works
With batching enabled, the node stacks image1 and image2 along the batch dimension. The wrinkle: if the two images have different dimensions, it upscales image2 with bilinear sampling to match image1's height and width before concatenating - so you don't get a shape mismatch error for feeding a 512px reference next to a 1024px one. It's a pragmatic "make them match, then stack" approach rather than a resampling expert; quality of the upscale is basic bilinear, fine for a batch that's headed into a model anyway.
The lazy part is the real feature: image2 is marked lazy, so when batch_enabled is off, the node never requests image 2 at all. That means a heavy second-image pipeline (load, preprocess, whatever) simply doesn't run when you're not batching - execution is skipped upstream, not just ignored downstream. That's the pack's "smart second image loading" from the README, and it's genuinely useful in a big workflow where image 2 might be an expensive processed input.
Inputs and outputs
- image1 -
IMAGE, always required. - image2 -
IMAGE, lazy. Only loaded when batching is enabled. - batch_enabled -
BOOLEAN, default true.
Output is one IMAGE: the batch of both, or just image1.
Installing it
Ships in robertvoy/ComfyUI-Flux-Continuum:
cd ComfyUI/custom_nodes
git clone https://github.com/robertvoy/ComfyUI-Flux-Continuum
or ComfyUI Manager ("Flux Continuum"), restart. No extra dependencies - it uses only core ComfyUI image utilities.
Where people get burned
Two things. First, when batching is enabled with mismatched sizes, image2 gets stretched to image1's dimensions - if your two inputs are wildly different aspect ratios, that's a distortion, not a crop. Second, a "batch" of images means downstream nodes see multiple frames; if your sampler or detailer assumed a single image, batching two into it can produce doubled or unexpected output. And remember the lazy-loading cuts both ways: toggle batch_enabled back on and image2's entire upstream chain suddenly runs again, so don't wonder why the graph got slow after flipping a boolean.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image1 | IMAGE | — | |
| image2 | IMAGE | — | |
| batch_enabled | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |