Nodes/ComfyUI-Muye-nodes/添加图像水印
ComfyUI Node

添加图像水印

Stamp a finished logo on your images without leaving the graph

By muyexiuluo·Created about a year ago·Updated 23 days ago· 89
添加图像水印
  • 原图
  • 水印图片
  • 水印遮罩
  • IMAGE
缩放模式
缩放方法
缩放倍数1.0
缩放宽度512
缩放高度512
初始位置
横向位移0
竖向位移0
旋转角度0
水印透明度0

The name is literal: you hand it your generated image plus a ready-made watermark image - a logo, a signature, a handle - and it composites the second one onto the first. This is the "stamp a finished mark on your output" node, not the subtle overtext one (that's TextOverlayImage in the same pack). Reach for it when you batch-generate a folder of images and want them all leaving the graph with your name on them, or when you want a semi-transparent logo baked into every frame before you save. It's a deterministic pixel op, exactly the kind of thing you do after the sampler - no diffusion pass, no rerolling, milliseconds per image. The KB's post-processing layer is emphatic about this: a composite is a composite, and burning a model pass to do it is how you waste a run.

The pack author clearly wanted a one-stop watermark toolkit, because every fiddly knob you'd want is here. The two IMAGE inputs are 原图 (the base) and 水印图片 (the logo). Then a pile of controls:

  • 缩放模式 - 不缩放, 保持比例铺满, 按照缩放倍数缩放, or 按照输入宽高缩放. "保持比例铺满" fits the logo to the base without distortion; the other two scale by a 缩放倍数 or explicit 缩放宽度/高度.
  • 初始位置 - nine positions from 居中 to each corner, plus 横向位移 / 竖向位移 to nudge, and a 旋转角度 if you want a diagonal mark.
  • 水印透明度 - and here's the trap: 0 is fully visible, 100 is fully transparent. It's an opacity-inverse slider, backwards from what you'd expect. Set 0 for a solid logo, crank toward 100 to fade it into the background.

There's also an optional 水印遮罩 input that lets you control where the mark is erased - the mask's white areas punch holes in the watermark's alpha. It's genuinely useful if your logo isn't a clean rectangle and you want it to hug its own shape. The single output is the composited IMAGE, ready to feed SaveImage or a further processing node. It handles batches, so a folder's worth of frames all get stamped in one run.

Install

Same as every node in this pack: ComfyUI Manager → Custom Nodes Manager → search "muye" → install "ComfyUI-Muye-nodes", restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/muyexiuluo/ComfyUI-Muye-nodes
cd ComfyUI-Muye-nodes
pip install -r requirements.txt

then restart ComfyUI. Good news: this node only touches torch and Pillow, which ComfyUI already ships, so it works even if the pack's heavy deps (transformers, uniface) fail to install - those serve the captioning and face nodes. The README's manual-install block shows an older repo URL with an underscore (ComfyUI_Muye.git); use the -nodes URL above.

Common issues

The 透明度 inversion catches everyone once - start at 0 and dial up. If the watermark looks wrong at 50, it's because you're actually at 50% transparent and the image is showing through. Also remember the UI labels are all Chinese by design (display name 添加图像水印); the knob names I listed map 1:1 to what you see. If the node doesn't show up at all, check the ComfyUI console for a [Muye] Failed to load module line - the pack silently skips any module that fails to import, and a missing Pillow/opencv install is the usual culprit.

CategoryMuye/文本

Inputs (13)

NameTypeDefaultDescription
原图IMAGE
水印图片IMAGE
缩放模式COMBO4 options: 不缩放, 保持比例铺满, 按照缩放倍数缩放, 按照输入宽高缩放
缩放方法COMBO3 options: nearest-exact, bilinear, area
缩放倍数FLOAT1.00.01–16
缩放宽度INT5120–16384
缩放高度INT5120–16384
初始位置COMBO9 options: 居中, 上, 下, 左, 右, 上 左, +3
横向位移INT0-48000–48000
竖向位移INT0-48000–48000
旋转角度INT0-180–180
水印透明度FLOAT00–100
水印遮罩optMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE