Nodes/WhiteRabbit/πŸ‡ Watermark
ComfyUI Node

πŸ‡ Watermark

Watermark a whole video frame-by-frame without leaving ComfyUI

By Artificial-SweetenerΒ·Created about a year agoΒ·Updated about a month agoΒ· 83
πŸ‡ Watermark
  • image
  • IMAGE
β—„watermarkβ–Ύβ–Ί
β—„positionbottom-rightβ–Ί
β—„scale70β–Ί
β—„transparency100β–Ί
β—„rotation0β–Ί
β—„padding_x0β–Ί
β—„padding_y0β–Ί
β—„optical_paddingfalseβ–Ί
β—„optical_strength40β–Ί
β—„max_batch_size0β–Ί
β—„sinc_window3β–Ί
β—„precisionfp32β–Ί

Adding a watermark to a single image is a five-second job in any editor. Adding it to every frame of a video is the job that makes you swear at the editor instead. Watermark (class BatchWatermarkSingle) is WhiteRabbit's answer: a GPU-accelerated watermark overlay that takes a batch of images, composites a watermark onto each one, and does the watermark's scaling with the same gamma-correct TorchLanc resampler the pack uses everywhere else. It works on a single image, but it's built for the hundreds-of-frames case.

The honest pitch is in the author's own words: "very quick, especially when compared to doing the same task in pro editing tools." If you've ever exported a video from a local render and then sat in a video editor waiting for a batch watermark job, you know the pain this removes. It's the watermark, applied at render time, so you never touch the footage twice.

How it works

You pick a watermark file (PNG recommended - its transparency is preserved), and the node resizes it to a width relative to the target image, then alpha-composites it at the chosen position with the chosen transparency. The sinc_window and precision controls govern the Lanczos resize quality, and everything runs on the GPU.

The inputs that matter

  • image - the frames to watermark (single or batch).
  • watermark - select or upload the watermark image. Starts with an example.png so you can test the node before dropping in your own mark.
  • position - bottom-right (default), bottom-left, top-right, top-left, or center.
  • scale - target watermark width = image width Γ— (scale/100), aspect preserved. 70 means the mark is 70% as wide as the frame - generous; most people land lower.
  • transparency - alpha multiplier, 0–100. 100 = the file's own alpha, unchanged.
  • rotation - rotate the mark (bicubic), with the canvas expanding so nothing clips (PIL-style).
  • padding_x / padding_y - pixel padding from the chosen edge. Ignored when position is center.
  • optical_padding + optical_strength - this is the nice one. Corner alignment with a wide or rotated mark looks off-center to the eye because the visual center isn't the geometric center. Optical alignment nudges placement toward the mark's visual center so equal padding looks equal. Off by default; try it.
  • max_batch_size - chunk the batch for VRAM control; 0 = whole batch at once.

Installing it

WhiteRabbit pack install, done once:

cd ComfyUI/custom_nodes
git clone https://github.com/Artificial-Sweetener/comfyui-WhiteRabbit
cd comfyui-WhiteRabbit
python -m pip install -r requirements.txt

or ComfyUI Manager β†’ "WhiteRabbit". The only pip dependency is torchlanc (the GPU resampler this node uses); the pack targets ComfyUI's v3 node API.

Where people get burned

  • Using a JPG watermark. JPGs have no alpha channel, so the transparency is garbage and you get a white box around your mark. The tooltip is not kidding: PNG.
  • Padding with optical alignment off. A mark with a wide empty margin (say, a text logo) will look inset oddly at corners because the visible glyph isn't centered in its box. Turn on optical_padding and set optical_strength to taste.
  • Huge scale on high-res frames. The mark is sized relative to image width, so a setting that looks subtle on a 512-wide frame can look like a billboard on a 4K one.

Watermark every frame of a 10-second clip in the time it takes the batch to render, and you'll wonder why you ever exported first and watermarked second.

Categoryimage/post

Inputs (13)

NameTypeDefaultDescription
imageIMAGEImages to watermark. Accepts (H,W,C) or (B,H,W,C) with values in [0–1]. Processed on GPU.
watermarkCOMBOSelect or upload the watermark image (PNG recommended). The file’s transparency is preserved.
positionCOMBObottom-rightWhere to place the watermark. Padding is ignored when 'center' is selected. Rotation expands the watermark canvas.
scaleINT701–100Width-based scaling. Target watermark width = image width Γ— (scale/100). Aspect ratio preserved.
transparencyINT1000–100Alpha multiplier for the watermark: 100 = unchanged, 0 = fully transparent.
rotationINT00–359Rotate the watermark (degrees) with bicubic resampling. Canvas expands so nothing is clipped (PIL-style).
padding_xINT00–16384Extra horizontal padding in pixels from the chosen edge (ignored when position='center').
padding_yINT00–16384Extra vertical padding in pixels from the chosen edge (ignored when position='center').
optical_paddingBOOLEANfalseAdjust placement by the watermark’s visual center so equal padding looks right (optical alignment). Affects corner positions; ignored when position='center'.
optical_strengthINT400–100How strongly to nudge toward visual centering (0–100). 0 = off. Higher values shift more for wide/rotated marks.
max_batch_sizeINT00–4096Process images in chunks to control VRAM. 0 = process the whole batch at once.
sinc_windowINT31–8Lanczos window size (a) used when resizing the watermark. Higher = sharper (but more ringing).
precisionCOMBOfp32Resampling compute dtype. fp32 = safest quality; fp16/bf16 can be faster on many GPUs.

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”