Nodes/comfyui_cv/CV Quality Compare (cv2.quality)
ComfyUI Node

CV Quality Compare (cv2.quality)

Scores how close ONE image is to a reference (cv2.quality) - the objective way to compare two settings of a filter, an upscaler or a denoiser instead of eyeballing them. Outputs the overall score and a per-pixel quality map showing WHERE the images disagree. Read the direction carefully: for SSIM and PSNR higher is better, for MSE and GMSD LOWER is better ('higher_is_better' says which). Both images must be the same size. To score a whole BATCH of candidates against one reference, use 'CV Quality Compare Batch' instead - it computes the reference's state once and returns the winner's index.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Quality Compare (cv2.quality)
  • reference
  • image
  • score
  • higher_is_better
  • quality_map
metricSSIM (structural similarity)
Categoryimage/CV/quality

Inputs (3)

NameTypeDefaultDescription
referenceNPARRAY,IMAGE,MASKThe ground-truth / original image. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
imageNPARRAY,IMAGE,MASKThe processed image to score against the reference. Must be the same size. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
metricCOMBOSSIM (structural similarity)SSIM tracks perceived structural change (0-1, 1 = identical) and is the usual choice. PSNR is a log-scale error in dB (>40 is typically indistinguishable). MSE is the raw squared error. GMSD compares gradient structure and correlates well with perceived sharpness loss.

Outputs (3)

NameTypeDescription
scoreFLOATOverall score, averaged over the colour channels.
higher_is_betterBOOLEANTrue for SSIM/PSNR, False for MSE/GMSD. Wire it into a comparison node so a workflow can pick the better of two candidates without hardcoding the metric's direction.
quality_mapNPARRAYPer-pixel quality/error map - preview it with 'Preview CV Array' (normalize/heatmap) to see WHERE the two images differ. GMSD's map is HALF the input's resolution.