Nodes/ComfyUI-BrainDead/BD Compare Images
ComfyUI Node

BD Compare Images

How far a candidate lands from a reference - the red-zone difference the head chain is judged by. difference: red = per-pixel |reference - candidate| x gain, the region tinted teal. side_by_side: reference | candidate | difference with the score under it. score: mean difference on the region (0 = identical, in 0-255 levels) and the share of the region more than `threshold` levels off. Use it wherever a result should reproduce a source: the visible-layer PSD composite against the headshot, the engine stack against the plate-frame source, a plate against the image it was made from. A candidate with alpha is laid over white first; a different size is resized to the reference.

By BizaNator·Created 8 months ago·Updated about 13 hours ago· 15
BD Compare Images
  • reference
  • candidate
  • region
  • difference
  • side_by_side
  • score
◄gain3.0►
◄threshold40►
◄label►
Category🧠BrainDead/Segmentation

Inputs (6)

NameTypeDefaultDescription
referenceIMAGEWhat the candidate should reproduce.
candidateIMAGEThe result being judged.
gainFLOAT3.00.5–20Red = difference x gain (3: 85 levels off is full red).
thresholdINT401–255Levels off that count as 'off' in the score.
regionoptMASKWhere to measure (1 = measure). None: pixels that are not white in either image.
labeloptSTRINGShown on the side_by_side panel.

Outputs (3)

NameTypeDescription
differenceIMAGE—
side_by_sideIMAGE—
scoreSTRING—