图像层叠加🐠meeeyo.com
Stack two images with alignment, scale, and opacity — watermark and composition in one node
- image1
- image2
- IMAGE
The pack's README calls it "image layer overlay," and that's the honest description: ImageOverlayAlignment (图像层叠加 - "image layer overlay") takes two images, puts one on top of the other at a chosen alignment corner, and gives you one composited IMAGE. It's the node you reach for to slap a watermark on an output, paste a logo onto a generated image, or build a simple picture-in-picture composition - without adding a Python node or a heavyweight image-editing extension.
How it works
Inputs are image1 and image2 (both IMAGE, force-input), plus four controls. Here's the mental model: image1 is the foreground layer, image2 is the background - image1 is pasted on top of image2. That ordering is the first thing to check when your layers come out swapped.
alignment- seven options:top_left,top_center,top_right,bottom_left,bottom_center,bottom_right,center. Both images get placed relative to these corners of the combined canvas.scale- scales image1 only (0.1–10, default 1). The background stays fixed. So "make my logo smaller" = lower the scale on image1.opacity- alpha of image1 (0–1). Below 1 makes the foreground see-through. This is your "ghost watermark" control.offset- a string of four integers:right,left,down,up. Positive values push the foreground that direction, negative pull it the other way. Default0,0,0,0is no offset. It's a slightly odd format (why four numbers when two would do?) but think of it as "nudge right by X, nudge left by Y…" - only the one you actually set matters.
The canvas is the size of the larger image (max width, max height), with the smaller one aligned to the corner you picked, and the result is composited with transparency. Output is a single IMAGE (RGBA).
Where it fits
It's the compositing half of the pack's image toolkit, pairing with GenericImageLoader (load from path/URL/base64) and ImageAdjuster (resize first so both layers fit the same frame). For batch workflows - watermarking a folder of outputs, stamping a date or logo on generated images - it does in one node what would otherwise need three or four.
Install
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git
Restart. Or ComfyUI Manager → "ComfyUI_StringOps". No models, no heavy deps. Chinese UI (图像层叠加) with the 🐠meeeyo.com branding.
Common issues
Three gotchas worth flagging. Layer order: image1 is on top - if you expected the first image to be the backdrop, swap the wires. Scale and opacity only touch image1: background is untouched, which surprises people who assume symmetric controls. And the offset format is easy to misread - it's right,left,down,up and offsetting is applied to image1 (the foreground) only, then clamped so it can't push off-canvas. There's also no rotation or blend-mode choice here - this is hard composition (paste with alpha), so if you need soft-light blending or 3D transforms, this isn't the node; it's the simple, fast one.
For watermarks, logos, and layer stacks it's exactly right, and it keeps your whole pipeline inside ComfyUI. Small note: because it returns RGBA, if your next node wants straight RGB you may need a composite/concat step - minor, but it'll save you a confused minute.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image1 | IMAGE | — | |
| image2 | IMAGE | — | |
| alignment | COMBO | 7 options: top_left, top_center, top_right, bottom_left, bottom_center, bottom_right, +1 | |
| scale | FLOAT | 1.00.1–10 | — |
| opacity | FLOAT | 1.00–1 | — |
| offset | STRING | 0,0,0,0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |