Nodes/ComfyUI Auto Watermark Mask/Auto Watermark Remover
ComfyUI Node

Auto Watermark Remover

Drop in a watermarked image, get a clean one back

By goodguy1963·Created 4 months ago·Updated about a month ago· 0
Auto Watermark Remover
  • image
  • watermark_template
  • symbol_reference
  • image
  • mask
  • mask_preview
  • detected_text
languagesen
detection_modecv2_only
regionfull_image
min_confidence0.25
padding10
dilate5
blur3
cv2_sensitivity0.80
corner_fallbackoff
corner_width_ratio0.12
corner_height_ratio0.08
inpaint_methodopencv_telea
inpaint_modelbig-lama.pt
inpaint_radius5
gpufalse
detail_detectornone
symbol_match_threshold0.45
diffusers_model_idstable-diffusion-v1-5/stable-diffusion-inpainting
diffusers_promptclean image, preserve the original subject and style, remove watermark and text
diffusers_negative_promptwatermark, text, logo, signature, artifact, distortion, deformed anatomy, blurry face
diffusers_strength0.90
diffusers_guidance_scale4.5
diffusers_steps30
diffusers_crop_padding48
moebius_seed0
moebius_steps20
moebius_guidance2.0

You have an image with a watermark and you want it gone, and you don't want to hand-paint the mask. Auto Watermark Remover is the whole job in one node: it detects the watermark, builds a mask, and fills the hole, all locally. The name is entirely literal - it calls no API and needs no key.

It's not magic, and the README is refreshingly honest about that. This node works best when the watermark is still visible enough to detect: readable text, corner logos and stock-photo marks, faint semi-transparent overlays with recoverable edges, and repeated symbol watermarks when you can feed it a reference template. If the watermark is a blend that's nearly invisible to your eye, no detector is going to save you.

How it works

Under the hood it's the classic detector-then-inpaint pipeline, which is still the practical open-source frontier for generic watermark removal. Detection happens first - downscaled if your input is huge, then mapped back to a full-resolution mask so big images don't crawl. Then the actual cleanup runs.

The parts that matter, in order:

  • Detection. cv2_only uses a contour/text-like-region heuristic and is the fastest starting point. ocr_then_cv2 adds EasyOCR for readable text. ocr_only is for when you specifically want text and no CV2 fallback.
  • Hard cases. detail_detector=decomposition recovers faint blended overlays that simple contours miss. detail_detector=symbol_template matches a known logo against a reference image you connect.
  • The fill. opencv_telea is the fast first pass for small marks; big_lama is the quality upgrade for thicker or textured areas; symbol_reverse_blend reconstructs a dark semi-transparent symbol from your template; gemini_reverse_alpha is a narrow special case for the Gemini sparkle overlay (yes, that watermark is a real plague - it leaks into models' training data and shows up uninvited); diffusers_sd_inpaint runs a crop-aware SD inpainting pass for semantic cleanup on faces, bodies, and costume detail.

The inputs you'll actually touch

Of the twenty-plus widgets, beginners can ignore most of them. The ones that matter:

  • image - your watermarked image, as a batch or a single frame.
  • detection_mode - start cv2_only, switch to ocr_then_cv2 when the watermark is readable text.
  • region - edges or corners for border watermarks; full_image otherwise. Smaller regions are faster and produce fewer false hits.
  • inpaint_method - opencv_telea for speed, big_lama for quality.
  • watermark_template - an optional reference crop of the logo or symbol. A tight, clean crop on a similar background beats a noisy crop from the same image every time.

Worth tuning: cv2_sensitivity (raise it for faint overlays, lower it to stop masking real detail), padding and dilate (if watermark edges survive, nudge these up), and symbol_match_threshold (start around 0.45–0.55; raise it if the template keeps latching onto lookalikes).

The node outputs the cleaned image, plus a mask, a mask_preview you can actually look at before trusting it, and detected_text (the OCR'd watermark text and detector messages). Wire image onward to whatever's next; use mask_preview for debugging.

Installing it

ComfyUI Manager is easiest - search for ComfyUI Auto Watermark Mask. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/goodguy1963/comfyui-auto-watermark-mask

Then restart ComfyUI. Manager will install the Python deps, which is where the install actually gets interesting: easyocr, onnxruntime-gpu (on Windows x64 - a chunky install), opencv-python, spandrel, and huggingface_hub. Expect a first-run download or two: EasyOCR pulls its language weights, and Big-LaMa auto-downloads big-lama.pt from Hugging Face into your inpaint model folder (disable that with COMFYUI_AUTO_WATERMARK_MASK_AUTO_DOWNLOAD=0 and drop the file in yourself).

Where people get burned

  • symbol_reverse_blend errors out if no template is connected - it requires watermark_template or its legacy alias symbol_reference. Not a bug; it literally cannot run without the reference.
  • The Diffusers method isn't installed by default. diffusers_sd_inpaint needs diffusers, transformers, and pillow in your environment, which requirements.txt does not include, and the default model is the ~4GB stable-diffusion-v1-5/stable-diffusion-inpainting. If you pick it without the packages, it fails. Install them only if you actually need semantic cleanup.
  • First OCR run feels hung. EasyOCR downloads language weights on first use; it's slow once, fast after.
  • Mask eats the subject. cv2_sensitivity too high turns real image detail into "watermark." Check mask_preview before the fill - that output exists precisely so you don't find out after.

It's a niche tool, and the community knows the generic version has limits. For stock-style corner marks and readable text it's genuinely good; for everything else, start with the defaults and work your way up the ladder one method at a time.

Categoryimage/cleanup

Inputs (30)

NameTypeDefaultDescription
imageIMAGE
languagesSTRINGenUsed only when OCR modes are selected.
detection_modeCOMBOcv2_onlyHow to create the watermark mask before cleanup. cv2_only is usually the best starting point for logos and symbols.
regionCOMBOfull_imageLimits detection to likely watermark areas. Smaller regions are faster and reduce false hits.
min_confidenceFLOAT0.250–1Minimum OCR confidence before text is masked. Only matters for OCR modes.
paddingINT100–256Extra pixels around each detected area before cleanup.
dilateINT50–256Expands the final mask. Increase if the watermark edges are still visible after removal.
blurINT30–255Softens the mask edge. Lower values keep the repaired region tighter.
cv2_sensitivityFLOAT0.800–1Sensitivity for non-OCR detection. Raise it for faint overlays, lower it to avoid masking real image detail.
corner_fallbackCOMBOoffAdds a simple mask in one or more corners when the watermark sits near the border and detection is inconsistent.
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.
inpaint_methodCOMBOopencv_teleaCleanup backend. Start with opencv_telea for small marks, big_lama for texture overlap, or moebius for higher-quality 512px generative inpainting.
inpaint_modelCOMBObig-lama.ptBig-LaMa checkpoint name. Used only when inpaint_method=big_lama.
inpaint_radiusINT51–64OpenCV or cleanup radius. Small values preserve detail better; larger values can erase thicker marks.
gpuBOOLEANfalseUse GPU for OCR when available. Big-LaMa, Moebius, and Diffusers manage their own device placement.
detail_detectorCOMBOnoneExtra detector for hard masks. Use symbol_template together with watermark_template for known logos or repeated symbol watermarks.
symbol_match_thresholdFLOAT0.450–1Template match threshold for symbol_template and symbol_reverse_blend. Raise it to be stricter.
diffusers_model_idSTRINGstable-diffusion-v1-5/stable-diffusion-inpaintingOptional Hugging Face model id or local folder for diffusers_sd_inpaint.
diffusers_promptSTRINGclean image, preserve the original subject and style, remove watermark and textPrompt used only by diffusers_sd_inpaint. Keep it focused on preserving the original subject while removing the watermark.
diffusers_negative_promptSTRINGwatermark, text, logo, signature, artifact, distortion, deformed anatomy, blurry faceNegative prompt used only by diffusers_sd_inpaint.
diffusers_strengthFLOAT0.900–1How strongly Diffusers redraws the cropped area. Lower values preserve more of the source image.
diffusers_guidance_scaleFLOAT4.51–20Prompt guidance for diffusers_sd_inpaint.
diffusers_stepsINT301–100Inference steps for diffusers_sd_inpaint.
diffusers_crop_paddingINT480–512Extra context around the masked area when using diffusers_sd_inpaint.
moebius_seedINT00–2147483647Random seed used only by moebius.
moebius_stepsINT201–100Denoising steps used only by moebius. The upstream default is 20.
moebius_guidanceFLOAT2.00–10Classifier-free guidance used only by moebius.
watermark_templateoptIMAGEOptional reference image of the watermark to match. Use a tight crop when possible. A clean external template works better than a noisy crop from the same image.
symbol_referenceoptIMAGELegacy alias for watermark_template. You only need one of these inputs connected.

Outputs (4)

NameTypeDescription
imageIMAGE
maskMASK
mask_previewIMAGE
detected_textSTRING