ComfyUI Node

Watermarker

Watermarks that respect your corners, your spacing, and your sanity

By alessandroperilli·Created about a year ago·Updated 10 months ago· 4
Watermarker
  • source_image
  • watermark_image
  • watermark_mask
  • watermarked_image
corner
corner_padding25
percent_of_image20.0
opacity1.00

If you publish what you generate - on socials, a portfolio, anywhere - a watermark is the difference between "someone reposted my art" and "someone reposted my art and nobody knows it's mine." Watermarker drops a logo onto one of four corners of your image, with proper control over size, padding, and opacity, all inside the graph so you can watermark automatically on every render.

It's part of the Open Creative Studio Nodes pack. This one has no credited lineage in the README, which makes it the pack's own contribution, and it shows - it's the most properly-built node in the suite, doing its work in PIL rather than raw tensor hacks.

How it works

You feed it a source_image, a watermark_image (your logo), and - this is the part people miss - a watermark_mask. The mask defines which pixels of the watermark are opaque: white areas show, black areas don't. Load a PNG logo with Load Image and its mask output is exactly this. The node merges watermark RGB + mask into an RGBA image, so you can use a square logo with an irregular mask and the transparent areas stay transparent.

Then it scales the watermark to percent_of_image - 20 means 20% of the source's width/height, keeping proportions - places it in the corner you chose (bottom-right, bottom-left, top-right, top-left), leaves corner_padding pixels of breathing room from the edges, and applies opacity by scaling the alpha channel. Resizing uses LANCZOS, so edges stay clean.

Inputs that matter

  • source_image - the image to watermark.
  • watermark_image + watermark_mask - the logo and its alpha. Both required, and they must be the same resolution or the node raises an error.
  • corner - which corner the mark goes in.
  • corner_padding - pixels of space from the edge (default 25).
  • percent_of_image - watermark size relative to the source (default 20, step 0.1).
  • opacity - 0 to 1 transparency (default 1, fully opaque).

Outputs

  • watermarked_image - the composited result, same format as your source, ready to feed into any saver.

Install

ComfyUI Manager → "Open Creative Studio Nodes" → install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/alessandroperilli/OCS_Nodes

No extra dependencies - it uses PIL and torch, both already in ComfyUI.

Where people get burned

  • The mask is mandatory, not optional. Wire the mask output from Load Image, or the node will error. This is the single most common mistake.
  • Watermark and mask must match resolution. A mismatched pair raises a ValueError, not a graceful resize.
  • percent_of_image is size, not area. Setting 20 scales both dimensions to 20%, so the visible area is 4% of the source. That's the expected behavior, but beginners are routinely surprised by how small their logo looks.
  • Opacity of 0 is invisible and still burns compute. If you set it to zero, you get back the source image unchanged - fine, but there's no point.
  • It's protection, not prevention. A corner watermark is honestly trivially croppable. For real provenance you pair it with the Image Saver's embedded workflow metadata - the two nodes work well together.
CategoryOCS Nodes

Inputs (7)

NameTypeDefaultDescription
source_imageIMAGE
watermark_imageIMAGE
watermark_maskMASK
cornerCOMBO4 options: bottom-right, bottom-left, top-right, top-left
corner_paddingINT250–8192
percent_of_imageFLOAT20.00–100
opacityFLOAT1.000–1

Outputs (1)

NameTypeDescription
watermarked_imageIMAGE