Diagonal Text Watermark
A tiled, tilted watermark that actually covers the frame
- image
- IMAGE
Diagonal Text Watermark stamps your text across an image on a diagonal, either as one centered label or repeated across the whole frame in a tiled pattern. It's for the moment you want a visible "this is a draft / this is mine" mark on a preview image before you share or deliver it - the classic preview-watermark use case. It's honest about being a visible mark: no subtle steganography here, just your text, angled, covering ground.
The inputs that matter
image(IMAGE) - the source.text(STRING, default "WATERMARK") - what gets stamped.font_size(INT, 10–500, default 48).opacity(FLOAT, 0–1, default 0.3) - the watermark's alpha. 0.3 is a sane preview watermark; crank toward 1.0 for something that screams.angle(FLOAT, default -45) - rotation in degrees.color- one ofwhite,black,red,blue,green. That's the whole palette; no custom hex.repeat(BOOLEAN, default true) - tiled pattern across the whole image when on, single centered stamp when off.
Output is the watermarked IMAGE.
How it works
It builds a transparent overlay layer, draws the text (repeated with spacing if repeat is on), rotates the whole layer, then scales the text's alpha by opacity and alpha-composites it over the image. The tiled mode rotates a large canvas so the pattern stays dense after rotation - that's why a diagonal repeat doesn't leave big gaps. When repeat is off you get one centered, rotated label instead.
The pack's other features are mostly about making images good; this one is about marking them, and the mechanism is exactly as straightforward as it sounds.
The gotchas
Font handling is the weak spot. The code tries arial.ttf first, then a DejaVu path, then falls back to PIL's tiny default bitmap font. On Windows, arial is there and this is a non-issue. On Linux, if neither arial nor that specific DejaVu path exists, you get the default bitmap font, and at font_size 48 it looks like a pixelated afterthought. There's no font-picker input, so on a minimal Linux install you may need to install a TTF font in a location the code will find. If your watermark text renders blocky, that's the cause.
Also, the color list is five presets - you can't do a custom color or per-channel tint without editing the node. And like the rest of this pack, it's CPU-side PIL work: fine for a few images, slow for a large batch.
Installation
Part of Praveen's ComfyUI Tools. Install via ComfyUI Manager (search "Praveen" / "praveen-tools"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Praveenhalder/praveen-tools
Restart ComfyUI. No model downloads, no extra dependencies - Pillow ships with ComfyUI. For a quick visible watermark before you share a preview, it does the job; just don't ask it for custom fonts or colors.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| text | STRING | WATERMARK | — |
| font_size | INT | 4810–500 | — |
| opacity | FLOAT | 0.300–1 | — |
| angle | FLOAT | -45-180–180 | — |
| color | COMBO | 5 options: white, black, red, blue, green | |
| repeat | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |