Image MAE
The boring, honest 'did the pixels change' checker
- image_a
- image_b
- mae
MAE is the plainest member of the comfyui-image-metrics family, and it's the one you'll want first because it's impossible to misread. It averages the absolute difference between two images and hands you a single number. No log, no peak-value assumption, no window trickery - just "on average, how far apart are these pixels." If PSNR is the stat quoted in model cards and SSIM is the one that kind of tracks your eyeballs, MAE is the regression test you run when you genuinely just want to know whether a change happened.
What it's for
Every time you swap a component and want to check you didn't silently change the output: swap a VAE, switch a resampler, tile a pipeline, drop a different version of a node. Score the before and after against the original and compare MAE values. It's also the gentlest possible introduction to full-reference metrics - the README's sample workflows use PSNR and SSIM for the upscale-comparison lesson, but MAE is the one you can explain to a colleague in one sentence. It lives in the same "measure it instead of squinting at it" bucket as the rest of the pack, which is exactly the right instinct in a community that loves to evaluate by vibes.
How it works
mean(|image_a - image_b|) over every pixel and every channel. Because there's no log step, the order doesn't matter: computing per image and averaging the batch gives literally the same number as pooling all pixels together, which the source comments are careful to note. On a 0..1 image, a MAE of 0.02 means each channel's value is off by about 2% on average. Lower is closer; zero means identical. There's no "good" threshold - it's a relative scale you calibrate against your own workflow, which is fine because you're comparing two runs, not judging a paper.
Inputs and outputs
Two required IMAGE inputs: image_a and image_b, same shape as always in this pack.
- mae (
FLOAT) - the mean absolute error. That's it. One output.
Like its siblings, it's an output node, so the number shows up on the node even with nothing wired downstream.
Installing it
Same story as the whole pack - ComfyUI Manager, search "comfyui-image-metrics", or:
cd ComfyUI/custom_nodes
git clone https://github.com/NobutakaKuroki/comfyui-image-metrics
Restart ComfyUI and find it under KULab → Metrics. No extra Python dependencies, no model files to fetch. The pack is by Dr. Nobutaka Kuroki (Kobe University) and is explicitly a teaching collection, so the code is short, commented, and worth reading if you've never seen a metric implemented.
Where people get burned
Same-shape requirement and batch-averaging apply here too - one number for the whole batch, no way to select one image pair. And don't ask MAE for spatial information: it tells you how much the images differ, never where. For locating the difference you want an image-diff node that visualizes the delta, not a scalar. Keep that in mind and MAE is the most trustworthy member of the trio - it can't lie to you because it isn't trying to look smart.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image_a | IMAGE | — | |
| image_b | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mae | FLOAT | — |