Nodes/AQnodes for ComfyUI/AQ_BatchAverageImage
ComfyUI Node

AQ_BatchAverageImage

Collapse a whole batch of images into one — mean or median

By 2frames·Created about a year ago·Updated 6 months ago· 1
AQ_BatchAverageImage
  • images
  • IMAGE
operation

Dead simple: feed it N frames, get one back. mean blends the whole batch into a composite - great for de-noising a burst of near-identical renders, finding the "common denominator" across frames, or faking a long-exposure smear where things differ. median takes the per-pixel middle value, which shrugs off outliers: a few bad frames won't drag the result like they would with a mean.

How it works

No cleverness, and that's the point. It's literally torch.mean(images, dim=0, keepdim=True) or torch.median(...) across the batch dimension. Per-pixel, no alignment, no warping. Everything gets reduced to one frame of the same size.

Inputs

  • images - your batch.
  • operation - mean or median.

Output

One IMAGE.

Install

Part of AQnodes:

cd ComfyUI/custom_nodes
git clone https://github.com/2frames/ComfyUI-AQnodes
cd ComfyUI-AQnodes
pip install -r requirements.txt

or search "AQnodes" in ComfyUI Manager and restart.

Gotchas

The big one: there's no alignment. If your frames are from different crops or compositions, the result smears into mush - this is a per-pixel operator, so only feed it frames that already line up. It's the batch-wise sibling of AQ_BlendImages (same pack), but where that node blends two images with artistic blend modes, this one just averages everything in the batch. If you're averaging video frames, mean gives the classic motion-blur ghosting where things move, and median is the one to reach for when you want the static scene and want moving objects to vanish.

CategoryAQ/filters

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
operationCOMBO2 options: mean, median

Outputs (1)

NameTypeDescription
IMAGEIMAGE