π Watermark
Watermark a whole video frame-by-frame without leaving ComfyUI
- image
- IMAGE
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.pngso 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_paddingand setoptical_strengthto taste. - Huge
scaleon 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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Images to watermark. Accepts (H,W,C) or (B,H,W,C) with values in [0β1]. Processed on GPU. | |
| watermark | COMBO | Select or upload the watermark image (PNG recommended). The fileβs transparency is preserved. | |
| position | COMBO | bottom-right | Where to place the watermark. Padding is ignored when 'center' is selected. Rotation expands the watermark canvas. |
| scale | INT | 701β100 | Width-based scaling. Target watermark width = image width Γ (scale/100). Aspect ratio preserved. |
| transparency | INT | 1000β100 | Alpha multiplier for the watermark: 100 = unchanged, 0 = fully transparent. |
| rotation | INT | 00β359 | Rotate the watermark (degrees) with bicubic resampling. Canvas expands so nothing is clipped (PIL-style). |
| padding_x | INT | 00β16384 | Extra horizontal padding in pixels from the chosen edge (ignored when position='center'). |
| padding_y | INT | 00β16384 | Extra vertical padding in pixels from the chosen edge (ignored when position='center'). |
| optical_padding | BOOLEAN | false | Adjust placement by the watermarkβs visual center so equal padding looks right (optical alignment). Affects corner positions; ignored when position='center'. |
| optical_strength | INT | 400β100 | How strongly to nudge toward visual centering (0β100). 0 = off. Higher values shift more for wide/rotated marks. |
| max_batch_size | INT | 00β4096 | Process images in chunks to control VRAM. 0 = process the whole batch at once. |
| sinc_window | INT | 31β8 | Lanczos window size (a) used when resizing the watermark. Higher = sharper (but more ringing). |
| precision | COMBO | fp32 | Resampling compute dtype. fp32 = safest quality; fp16/bf16 can be faster on many GPUs. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |