Nodes/ComfyUI-MingNodes/AI Remove Watermark
ComfyUI Node

AI Remove Watermark

Paint a mask, LaMa fills it in

By mingsky-ai·Created 2 years ago·Updated 2 years ago· 505
AI Remove Watermark
  • image
  • mask
  • image

The name says exactly what it does, which is refreshing - this node paints out a watermark (or a logo, a timestamp, a stray object, anything unwanted) using a mask you draw, and fills the hole with an AI model rather than a blur or clone-stamp. It's the ComfyUI-MingNodes take on a job that gets asked about constantly: "how do I clean this reference image before I use it."

How it works

Under the hood it runs LaMa (Large Mask inpainting) - a dedicated, open-source inpainting model, not a diffusion model repurposed for the job. That distinction matters: LaMa was trained specifically to fill large masked regions with plausible structure and texture, which is exactly the watermark-removal use case (a solid-ish patch of the image needs to disappear convincingly). It's a well-known baseline in the inpainting-tool space - the same model shows up under the hood of standalone tools like lama-cleaner and in other ComfyUI relighting/compositing pipelines, so you're not running some obscure one-off; it's a proven, if not state-of-the-art, workhorse. Diffusion-based inpainting (SD inpainting models) can sometimes out-perform it on tricky content, but LaMa's advantage is that it's fast, dedicated, and doesn't need a full checkpoint loaded to do one job.

You give it the image and a mask covering the area to remove, and it inpaints only inside that mask - everything outside is left untouched.

The inputs and outputs that matter

This is a deliberately small node:

  • image (IMAGE) - the picture with the watermark on it.
  • mask (MASK) - paint over the watermark (or whatever you want gone). Use ComfyUI's built-in mask editor, or generate the mask with a segmentation node if you're doing this on a batch.

One output: image, the cleaned result. Wire it into Save Image, or feed it further downstream if this is a pre-processing step before the image goes into another workflow.

The mask quality is the whole ballgame here - a tight mask that just covers the watermark with a little padding will look far better than a sloppy one. Too tight and you leave a visible edge of the original watermark; too loose and you're asking LaMa to invent more of the image than it needs to, which increases the odds of a smudgy or inconsistent patch.

How to install it

This is the one node in the pack that needs an extra download - don't skip it or the node will fail or error out at runtime.

  1. Install the pack itself via ComfyUI Manager (search "ComfyUI-MingNodes"), or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/mingsky-ai/ComfyUI-MingNodes
    
  2. Download the LaMa model: big-lama.safetensors from Hugging Face.
  3. Put it in ComfyUI/models/ming/ - the pack's own model folder, not the standard checkpoints directory. If that folder doesn't exist yet, create it.
  4. Restart ComfyUI.

Common issues & troubleshooting

Node errors out or can't find the model. Almost always the model isn't where the node expects it. Double-check it's in models/ming/, named exactly big-lama.safetensors, and that you restarted after adding it - ComfyUI won't pick up a new file in a custom folder without a restart.

Result looks smudgy or the watermark's ghost is still visible. Two usual causes: the mask didn't fully cover the watermark (zoom in and check the edges), or the watermark sat over genuinely complex detail (fine text, intricate pattern) that's hard for any inpainting model to reconstruct convincingly. For stubborn cases, a tighter, better-fitted mask usually beats a bigger one.

You need this at scale across a folder of images. LaMa-style inpainting works fine in a batch if you can automate mask generation - otherwise you're hand-painting a mask per image, which doesn't scale past a handful of files. If you're doing serious volume, look at whether a detection model can generate the mask for you first.

CategoryMingNodes/Image Process

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
maskMASK

Outputs (1)

NameTypeDescription
imageIMAGE