Nodes/ComfyUI-WaterMark-Detector/Watermark Enhancement
ComfyUI Node

Watermark Enhancement

The quick and dirty way to make a faint mark pop

By hotpizzatactics·Created 2 years ago·Updated 2 years ago· 0
Watermark Enhancement
  • image
  • IMAGE
contrast_factor1.5
sharpness_factor2.0

Watermark Enhancement is the pack's starter node: two sliders, one output, no decisions required. It runs a fixed CLAHE contrast pass, sharpens, and boosts contrast - the same bag of tricks the fancier nodes use, just hardcoded and bundled into one dead-simple step. If you cloned this pack and want to know whether it can even see the mark you're chasing, this is the five-second answer.

It's also the most honest node here about what this pack actually is. The pack title promises a watermark detector, but every node in it is enhancement - no model, no network, no detection. WatermarkEnhancement doesn't detect anything either; it makes the mark visible enough that you can. In a community where watermark work usually means removal via inpainting (Flux Fill and friends are the go-to), this node is the "see it first" half of the job: expose the mark, then mask and inpaint it away.

How it works

The source shows a three-step pipeline, all OpenCV:

  1. Convert to LAB, run cv2.createCLAHE with fixed settings (clip 3.0, 8×8 grid) on the L channel. Same local-contrast trick as the pack's standalone CLAHEEnhancement, just with no knobs exposed.
  2. Gaussian-blur the result and blend with addWeighted using sharpness_factor - an unsharp-mask sharpening.
  3. convertScaleAbs with contrast_factor as the alpha, a global contrast push.

The two inputs

  • contrast_factor (1–3, default 1.5) - the global contrast multiplier. The main lever for making faint marks separate from the background.
  • sharpness_factor (1–5, default 2) - unsharp strength; it's also applied in step 2's weighted blend, so high values give you that crisp, slightly edgy look.

Output is a single IMAGE, same resolution as the input. Wire it to a preview or Save Image. It's a full-color result - if you want a binary mask of the mark instead, switch to the pack's AdvancedWaveletWatermarkEnhancement (whose name is misleading, read its article) or threshold the output yourself.

Where people get burned

Easy to overdo, that's the whole story. contrast_factor near 3 and sharpness_factor near 5 on an already-clean image produces halos and clipping, and the fixed CLAHE amplifies any noise that's in the source. Clean the image first with the pack's DenoisingFilter if you're working from a grainy screenshot, and keep the sliders in the lower half of their ranges unless the mark is genuinely invisible. For a typical semi-transparent watermark over a photo, defaults get you most of the way there - which is exactly what a starter node should do.

Installing

No models, no GPU requirement - plain CPU OpenCV:

cd ComfyUI/custom_nodes
git clone https://github.com/hotpizzatactics/ComfyUI-WaterMark-Detector

or search ComfyUI-WaterMark-Detector in ComfyUI Manager. The pack's install.py pip-installs torch, numpy, opencv-python, scipy, and PyWavelets; opencv is the only substantial one and you almost certainly have it already. Restart ComfyUI after installing and the node appears under image/watermark.

Categoryimage/watermark

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
contrast_factorFLOAT1.51–3
sharpness_factorFLOAT2.01–5

Outputs (1)

NameTypeDescription
IMAGEIMAGE