ComfyUI Extension: ComfyUI Batch Blend

Authored by starfieldscreensaver

Created

Updated

2 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Blends two image batches frame-by-frame using vectorised tensor ops. Supports 15 blend modes (normal, add, multiply, screen, overlay, soft light, and more). No loops or workarounds needed — works natively with batches.

Looking for a different extension?

Custom Nodes (1)

README

ComfyUI Batch Blend

A custom node for ComfyUI that blends two image batches frame-by-frame using fully vectorised tensor operations — no loops, no workarounds.

Existing blend nodes (including WAS Node Suite's Image Blend) operate on single images and break or produce incorrect results when given batches. This node handles batches natively.


Node: Image Batch Blend

Category: image/batch

Inputs

| Name | Type | Description | |---|---|---| | image_a | IMAGE | First image or image batch | | image_b | IMAGE | Second image or image batch | | blend_mode | COMBO | Blend algorithm (see below) | | blend_percentage | FLOAT | 0.0 = full image_a, 1.0 = full blend result |

Output

| Name | Type | Description | |---|---|---| | image | IMAGE | Blended image batch |

Blend Modes

| Mode | Description | |---|---| | normal | image_b replaces image_a (modulated by blend_percentage) | | add | Additive blend, clamped to [0, 1] | | subtract | Subtractive blend, clamped to [0, 1] | | multiply | Multiplies pixel values | | divide | Divides image_a by image_b | | screen | Inverse-multiply of inverted values | | overlay | Multiply for darks, screen for lights (based on image_a) | | soft_light | Gentle overlay using Pegtop formula | | hard_light | Strong overlay (based on image_b) | | difference | Absolute difference between pixels | | exclusion | Softer version of difference | | darken | Per-pixel minimum | | lighten | Per-pixel maximum | | color_dodge | Brightens image_a based on image_b | | color_burn | Darkens image_a based on image_b |

Batch size mismatch

If the two batches have different frame counts, the shorter batch is cycled (tiled) to match the longer one.

Resolution mismatch

If the two batches have different spatial dimensions, image_b is bilinearly resized to match image_a automatically.


Installation

Via ComfyUI Manager (recommended)

Search for ComfyUI Batch Blend in the Manager and install.

Manual

cd ComfyUI/custom_nodes
git clone https://github.com/starfieldscreensaver/comfyui-batch-blend

Restart ComfyUI. No extra dependencies required beyond what ComfyUI already ships with (PyTorch).


Why this exists

The standard approach to blending video frames in ComfyUI requires nested for-loops, ImageFromBatch nodes, sleep delays, and batch-reassembly nodes — a fragile multi-node subgraph just to apply a blend per frame. This node collapses that entire graph into a single node by operating directly on the [B, H, W, C] batch tensor.


License

MIT

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Learn more