Nodes/ComfyUI-WaterMark-Detector/Comprehensive Image Enhancement
ComfyUI Node

Comprehensive Image Enhancement

Run every watermark-enhancement trick at once

By hotpizzatactics·Created 2 years ago·Updated 2 years ago· 0
Comprehensive Image Enhancement
  • image
  • IMAGE
clahe_clip_limit4.0
clahe_grid_size8
hpf_cutoff_freq80
edge_low_threshold30
edge_high_threshold100
at_block_size11
at_c2.0
morph_operation
morph_kernel_size3
gray_lower50
gray_upper200
gray_boost_factor2.0
gray_sharpen_amount2.5
texture_freq_range70
texture_boost_factor3.0
denoise_strength5.0
denoise_color_strength5.0
weight_clahe0.30
weight_hpf0.20
weight_edge0.20
weight_at0.10
weight_morph0.10
weight_gray0.30
weight_texture0.30
weight_denoise0.10

This is the "throw everything at the watermark" node. Instead of picking one technique, Comprehensive Image Enhancement runs eight of them in a single pass - CLAHE, a high-pass filter, Canny edges, adaptive thresholding, morphology, a gray-region boost, a texture band-pass, and a denoise - then blends the results back onto your original image by weight. If you've cloned this pack and have no idea which of its many nodes you need, this is the one to drag in first. It's an exploration tool: run it once, and the faint mark you couldn't see before usually jumps out somewhere in the mix.

A quick word on the pack in general, because the title is doing some heavy lifting. ComfyUI-WaterMark-Detector contains no neural network and no model weights - no detector. It's all classical OpenCV/scipy/pywt image processing, and every node here is really an enhancement filter that makes a watermark easier to see (and then easier to mask or inpaint away). The community's watermark work is dominated by removal-via-inpainting - Flux Fill and friends - but you need the mark visible to know what you're removing. That's the niche this pack fills, and Comprehensive is its flagship.

How it works

The source is honest about the architecture: enhance() instantiates the pack's own CLAHEEnhancement, HighPassFilter, EdgeDetection, AdaptiveThresholding, MorphologicalOperations, ImprovedGrayColorEnhancement, TextureEnhancement, and DenoisingFilter classes, runs each on your input, and then does a weighted blend. Your original keeps a share of 1 - (sum of all weights), every enhanced layer contributes its own weight_* value, and the result is clamped to 0–1. So you're effectively building an eight-node chain with one node.

The inputs that matter

The schema is long, but you only really set two groups of things:

  • The weight_* knobs - weight_clahe, weight_hpf, weight_edge, weight_at, weight_morph, weight_gray, weight_texture, weight_denoise. These decide which techniques get to contribute. This is 90% of the tuning.
  • Per-method params for when you want to dig in: clahe_clip_limit/clahe_grid_size, hpf_cutoff_freq, edge_low_threshold/edge_high_threshold, at_block_size/at_c, morph_operation/morph_kernel_size, the gray range and boost, the texture range, and the denoise strengths. Same knobs as the standalone nodes, just namespaced.

Output is a single IMAGE tensor - wire it straight into a preview or Save Image, or feed it onward.

Where people get burned

The defaults are a trap. The eight weights sum to 1.6, which means your original gets a negative share (1 − 1.6 = −0.6), and the two binary channels - weight_edge and weight_at - are both active at 0.2. The default output is often a mashed edge map rather than a subtly enhanced photo. Fix: zero out every channel you don't care about (edge and adaptive threshold especially) and keep the remaining weights summing to about 1. Once the watermark is visible, the standard move is to mask it and inpaint - the edge/threshold outputs here double as decent raw masks for that.

Installing

Same as any custom node, and there's nothing exotic to fetch - no models at all:

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 on first load; opencv is the chunky one, and you almost certainly already have it. No GPU needed - this is all CPU-friendly CV. Restart ComfyUI after installing.

Expect this one to be the slowest node in the pack: it's eight full image passes per frame, so a big batch will take noticeably longer than any single node. If it's too heavy, break the workflow into the individual nodes you actually want - the pack ships them all as standalone classes, and their articles on this site cover each one.

Categoryimage/watermark

Inputs (26)

NameTypeDefaultDescription
imageIMAGE
clahe_clip_limitFLOAT4.00.1–10
clahe_grid_sizeINT82–16
hpf_cutoff_freqINT801–100
edge_low_thresholdINT300–255
edge_high_thresholdINT1000–255
at_block_sizeINT113–99
at_cFLOAT2.00–10
morph_operationCOMBO4 options: dilate, erode, open, close
morph_kernel_sizeINT31–21
gray_lowerINT500–255
gray_upperINT2000–255
gray_boost_factorFLOAT2.01–5
gray_sharpen_amountFLOAT2.50–5
texture_freq_rangeINT701–100
texture_boost_factorFLOAT3.01–5
denoise_strengthFLOAT5.00–20
denoise_color_strengthFLOAT5.00–20
weight_claheFLOAT0.300–1
weight_hpfFLOAT0.200–1
weight_edgeFLOAT0.200–1
weight_atFLOAT0.100–1
weight_morphFLOAT0.100–1
weight_grayFLOAT0.300–1
weight_textureFLOAT0.300–1
weight_denoiseFLOAT0.100–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE