Studio Yotsuba
Back to Node List

Image Difference

image_difference

Visualizes pixel differences between two images and reports QA metrics.

Reviewed
Guide available

Input Ports

NameTypeDescription
Image A
a
Image
Required
Reference or earlier image.
Image B
b
Image
Required
Candidate or later image.

Output Ports

NameTypeDescription
Difference
difference
Image
Absolute per-channel difference image.
Changed Pixels
changed_pixels
Int
Pixels whose error exceeds Threshold.
Changed Ratio
changed_ratio
Float
Changed pixels divided by compared pixels.
Mean Error
mean_error
Float
Mean maximum-channel error.
Maximum Error
max_error
Float
Largest maximum-channel error.
Changed Bounds
bounds
Map
Bounding rectangle of changed pixels.

Parameters

NameTypeDefaultRangeDescription / Options
Threshold
threshold
Float
00–1 / step 0.001

Errors greater than this value count as changed.

Compare Alpha
compare_alpha
Bool
true—

Include alpha in the error and visualization. When disabled, hidden RGB differences between two fully transparent pixels are ignored.

Overview

Compares two images pixel by pixel, such as before/after or standard/variant versions. In addition to a difference image, it outputs the number and percentage of changed pixels, error, and change bounds, supporting both visual inspection and automated QA.

Usage tips

  • Connect the reference image to a and the comparison target to b. Areas where the image dimensions differ are compared against transparent pixels.
  • Use threshold = 0 for exact equality, or a small positive value to ignore compression artifacts and tiny rounding errors.
  • bounds is a Map with x, y, width, and height. Width and height are 0 when there are no changes.

Common pitfalls

Turn compare_alpha OFF when only transparency differs and you want to compare RGB alone. With it OFF, stored RGB differences are ignored when both pixels are fully transparent because they cannot affect the visible result. The difference image is not automatically amplified for visibility, so use the numeric outputs as well for very small differences.

Related nodes

  • tile_preview: visually inspect tile seams
  • batch_render: create an image list for multiple variants
Back to Node List