ComfyUI Node

GROW Image PSNR

The honest check for 'did the watermark ruin my image?'

By zhangp365·Created 2 months ago·Updated 2 months ago· 1
GROW Image PSNR
  • reference
  • watermarked
  • psnr_db

A watermark that makes your image look worse is a watermark nobody wants. GROW Image PSNR is the pack's own measuring stick for that question: feed it the clean image and the watermarked image, and it hands back the peak signal-to-noise ratio in dB. Higher is better, and the GROW project's bar is 35 dB - every image in the pack's validation lands above it (their three test images came in at 38–41 dB), which is why the watermarks look indistinguishable at a glance.

What it takes and gives

Two inputs, both IMAGE, same dimensions required - mismatched shapes throw a clear error:

  • reference - the clean image.
  • watermarked - the image with the GROW watermark.

One output: psnr_db, a FLOAT in dB. The node computes RGB PSNR over the [0,1] range, treating the whole tensor as one MSE, and prints the value to the UI as well.

The one measurement trap

Compare against the right reference. The pack's own methodology is specific: PSNR should measure only the change GROW introduced, so the reference has to be the identity-clean output produced with the same input, prompt, seed, model, and sampling parameters - not the source image. Because the source image also passes through Flux2/VAE reconstruction before you ever watermark it, comparing to the source counts the model's reconstruction error as watermark distortion. You'd get a lower number than the watermark actually deserves, and you'd panic over nothing.

Wire it after both branches of your workflow: clean path into reference, GROW-guided path into watermarked. If psnr_db is comfortably above 35, your watermark is invisible at the pixel level; if it's sagging below, that's a real signal to dial strength or guidance_scale back on the sampler.

Installing

It's the fourth node in comfyui-dit-watermark, so it comes with the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/zhangp365/comfyui-dit-watermark

Restart ComfyUI (or search comfyui-dit-watermark in Manager). No models, no extra pip packages - just PyTorch.

That's really the whole node. It's a metric, not a feature, but it's the metric that keeps the rest of the pack honest - if you're going to bake watermarks into images you ship, you want to know the cost in numbers, not vibes.

CategoryGROW/metrics

Inputs (2)

NameTypeDefaultDescription
referenceIMAGE—
watermarkedIMAGE—

Outputs (1)

NameTypeDescription
psnr_dbFLOAT—