Batch Average Un-Jittered
The second half of a jittered supersampling pass
- images
- IMAGE
This node doesn't do much on its own - it's designed to pair with two others in this same pack, Jitter Image and UnJitter Image, as a three-step supersampling technique borrowed straight from offline rendering. The README files it under exactly that: "For supersampling/antialiasing workflows." If you're not already using Jitter Image somewhere upstream, this node isn't going to do anything useful for you.
The technique it's part of
Supersampling by jittering is an old rendering trick: instead of rendering once at your target resolution, you render several times, each shifted by a tiny sub-pixel offset (the "jitter"), then shift each result back into alignment and average them together. The averaging fills in detail between pixel positions that no single sample could capture alone, which is exactly how antialiasing worked in offline renderers long before real-time AA existed. In this pack's version: Jitter Image applies the sub-pixel offsets to your batch going in, whatever processing happens in between runs on each jittered sample, UnJitter Image would reverse a single offset, and Batch Average Un-Jittered specifically un-shifts every frame in the batch back to alignment and averages them in one step - the combined final stage of the pipeline.
Inputs and outputs that matter
images- the jittered batch, after your processing step.operation-meanormedian. Mean is the standard choice for this technique, giving you the smooth antialiased blend. Median is worth trying if a couple of jittered samples came out visibly wrong and you don't want them dragging the average.
Output: a single IMAGE - the final, aligned, averaged result.
Installing it
ComfyUI Manager: search ComfyUI Image Filters, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters
Restart. No model downloads - pure pixel math. The pack's opencv dependency is the recurring install snag: version conflicts with other node packs' opencv installs cause import errors, which the repo's import_error_install.bat fixes by reinstalling all four variants together, or by hand: strip the opencv-* packages and keep only opencv-contrib-python.
Where people get burned
Using this node without Jitter Image feeding it is the main mistake - averaging a batch that was never jittered in the first place just gives you the same result as plain Batch Average Image, minus the point of the exercise. If you're trying to build an antialiasing/supersampling pass, start from Jitter Image, make sure whatever processing happens in between preserves the batch structure, and only then bring this node in at the end.
The other thing worth knowing: this technique assumes your batch is a fixed number of jittered samples of the same underlying image, not a sequence of genuinely different frames like video. Feed it real motion and you'll get the same ghosting problem any batch-averaging node has with unaligned content - jitter offsets are sub-pixel by design and don't account for actual object movement.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| operation | COMBO | 2 options: mean, median |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |