HBH Image Overlay
Paste a logo, watermark or sticker with control over every axis
- base_image
- overlay_image
- image
- mask
This is the node the whole pack exists for. HBH_ImageOverlay takes a base image and an overlay image - a logo, watermark, sticker, frame, texture, whatever - and composites one onto the other with scale, rotation, horizontal and vertical flips, opacity, and a choice of ten blend modes. In return you get not just the composited image but a mask of exactly where the overlay landed, which is the part core ComfyUI makes you assemble by hand.
Why you'd reach for it: core's ImageCompositeMasked does simple pasting, but once you need to scale, rotate, flip and fade an overlay in one shot, you're usually wiring together a chain of transform nodes and writing your own mask. This collapses that chain into a single node and hands you the mask for free - handy for downstream work like inpainting behind the pasted element or masking a region for regeneration.
How it works, grounded in the code: it parses the coordinates string as JSON, takes the first entry, resizes the overlay to scale with Lanczos, applies the flips, rotates (with expand=True, so the canvas grows and the code re-centers the paste when the angle isn't a multiple of 180), converts both images to RGBA, applies opacity via the alpha channel, and pastes at the position. If blend_mode isn't normal, it then blends the two full canvases pixel-by-pixel using the classic formulas - multiply, screen, overlay, soft/hard light, color dodge/burn, darken, lighten. The mask output is built from the overlay's alpha pasted at the same spot.
The inputs that matter:
coordinates- a JSON list like[{"x": 0, "y": 0}]. Only the first point is used, so multi-point placement is a non-feature here.scale(0.1–10),rotation(–360–360),flip_horizontal/flip_vertical.blend_mode- the ten: normal, multiply, screen, overlay, soft_light, hard_light, color_dodge, color_burn, darken, lighten.opacity(0–1, default 1) - because it's applied through alpha, the mask dims along with the image.output_format(png/jpg/webp) - jpg flattens to RGB and drops transparency; webp/png keep RGBA.
Gotchas to plan around. First, the coordinate format: it must be a list, and feeding it the flat JSON that HBH_ImageCoordinatePicker emits puts your overlay at (0,0). The README's intended flow uses KJNodes' PointsEditor, which outputs the list format directly. Second, the non-normal blend modes run across the whole canvas, not just inside the pasted shape - this is a simple implementation, not a compositor, so don't expect layer-local blending. Third, the README insists you push images through an RGB conversion node (WAS Suite's Images to RGB) before combining with other nodes; follow it, it's the pack's one documented footgun.
Install: ComfyUI Manager, search ComfyUI_HBH-image_overlay. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/wings6407/ComfyUI_HBH-image_overlay
then restart. No requirements.txt, no model files - it's pure numpy/torch/Pillow, already in your install.
Reputation check, since it matters for trust: this is a niche pack from a solo dev, single commit, and there's essentially no community discussion of it - a couple of example workflows in the repo are your best documentation. It works, it's lightweight, and it has no dependencies to break; just keep expectations proportional.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | — | |
| overlay_image | IMAGE | — | |
| coordinates | STRING | [{"x": 0, "y": 0}] | — |
| scale | FLOAT | 1.00.1–10 | — |
| rotation | FLOAT | 0-360–360 | — |
| flip_horizontal | BOOLEAN | false | — |
| flip_vertical | BOOLEAN | false | — |
| blend_mode | COMBO | 10 options: normal, multiply, screen, overlay, soft_light, hard_light, +4 | |
| opacity | FLOAT | 1.000–1 | — |
| output_format | COMBO | 3 options: png, jpg, webp |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |