Nodes/ComfyUI Auto Watermark Mask/Auto Watermark Mask (OCR)
ComfyUI Node

Auto Watermark Mask (OCR)

A ComfyUI node in image/mask with 17 inputs and 3 outputs.

By goodguy1963·Created 3 months ago·Updated 3 months ago· 0
Auto Watermark Mask (OCR)
  • image
  • watermark_template
  • symbol_reference
  • mask
  • mask_preview
  • detected_text
languagesen
detection_modeocr_then_cv2
regionfull_image
min_confidence0.25
padding12
dilate10
blur7
cv2_sensitivity0.55
corner_fallbackoff
corner_width_ratio0.12
corner_height_ratio0.08
gputrue
detail_detectornone
symbol_match_threshold0.45
Categoryimage/mask

Inputs (17)

NameTypeDefaultDescription
imageIMAGE
languagesSTRINGenEasyOCR language codes separated by commas, e.g. en,de.
detection_modeCOMBOocr_then_cv2How to build the mask. Start with cv2_only for logos and faint symbols, or ocr_then_cv2 for readable text watermarks.
regionCOMBOfull_imageLimits the search area. Use corners or edges when the watermark is near the border for fewer false positives and faster matching.
min_confidenceFLOAT0.250–1Minimum OCR confidence before a text hit is added to the mask. Higher values are stricter.
paddingINT120–256Extra pixels added around each detected region. Increase if the mask clips the watermark edges.
dilateINT100–256Expands the mask after detection. Useful when thin strokes or glow edges are missed.
blurINT70–255Softens mask edges before preview and inpainting. Lower values keep the mask tighter.
cv2_sensitivityFLOAT0.550–1Controls how aggressively the CV2 fallback grabs low-contrast regions. Raise it for faint overlays, lower it to reduce false positives.
corner_fallbackCOMBOoffAdds a simple corner mask when the watermark is pinned to a corner and automatic detection misses it.
corner_width_ratioFLOAT0.120.02–0.5Corner fallback width as a fraction of image width.
corner_height_ratioFLOAT0.080.02–0.5Corner fallback height as a fraction of image height.
gpuBOOLEANtrueUse GPU for EasyOCR when available. Turn off if OCR startup is unstable in your environment.
detail_detectorCOMBOnoneExtra detector for hard cases. Use decomposition for faint blended overlays, or symbol_template when you can connect a watermark_template image.
symbol_match_thresholdFLOAT0.450–1Template match confidence threshold for symbol_template. Raise it to avoid lookalikes; lower it if the right watermark is being missed.
watermark_templateoptIMAGEOptional reference image of the watermark you want to find. Best results come from a tight clean crop of the watermark on a similar background.
symbol_referenceoptIMAGELegacy alias for watermark_template. You only need one of these inputs connected.

Outputs (3)

NameTypeDescription
maskMASK
mask_previewIMAGE
detected_textSTRING