Add Layer Overlay JNK
Stack layers with position, rotation and fade β watch the opacity slider
- base_image
- overlay_image
- IMAGE
Add Layer Overlay is the compositing workhorse of the JNK pack: it pastes one RGBA image on top of another and lets you position, rotate, and fade the top layer without ever leaving the graph. Pair it with the pack's Create RGBA Image and the alpha-layer nodes and you can build a mini Photoshop out of ComfyUI - drop a transparent character render onto a background, nudge it around, tilt it, dial down its visibility.
Under the hood it's PIL alpha compositing. The overlay is converted to RGBA, pasted at a computed position onto a canvas the size of the base image, then alpha-composited with the base. Simple, predictable, and it handles batches: if you feed more base frames than overlays, it reuses the last overlay for the extras.
Inputs that matter
base_image/overlay_image- base and top layer, both plain IMAGE tensors. The overlay's alpha channel is what gets respected.position_type-top-leftorcenter.top-leftputs the overlay's corner at the offset coordinates;centercenters the overlay on them.center_rotation- degrees, -360 to 360. Note the source only rotates in center mode; in top-left mode rotation is ignored.x_offset/y_offset- pixel offsets, up to Β±48000.opacity- the slider that will bite you (see below).
Output is a single IMAGE - the composited result, same size as the base.
The opacity trap
This slider works backwards from what its name implies. In the code, opacity is really a fade-to-transparent amount: at 0 (the default) the overlay's alpha is untouched - fully opaque. At 100 the alpha is zeroed - the overlay vanishes entirely. So you don't set "how visible should it be," you set "how much should I erase it." Half visible is 50, which is... fine, but if you grew up on Photoshop sliders where 0 = invisible, the default of 0 looking fully visible will confuse you once, and on this node it's a classic "why is my layer ignoring me" moment. Zero means full opacity here.
Installing it
Part of ComfyUI-JNK-Tiny-Nodes, so pack-level install: search JNK in ComfyUI Manager β Install β restart, or:
cd ComfyUI/custom_nodes/
git clone https://github.com/Aljnk/ComfyUI-JNK-Tiny-Nodes.git
The pack lists opencv-python, pygame, and google-genai in requirements.txt, but this node runs on PIL and numpy, both already present in ComfyUI. No extra installs, no model downloads.
Where people get burned
Beyond the opacity inversion, the usual suspects: forgetting that the overlay needs an alpha channel to do anything interesting (a fully opaque JPG pasted at top-left just covers the base), and expecting rotation in top-left mode - it only rotates when position_type is center. Offset values are huge by design (that Β±48000 range), so don't be shy. It's the node to reach for when you want explicit, tweakable layer placement instead of whatever a batch-combine node does by default.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | β | |
| overlay_image | IMAGE | β | |
| position_type | COMBO | 2 options: top-left, center | |
| center_rotation | INT | 0-360β360 | β |
| x_offset | INT | 0-48000β48000 | β |
| y_offset | INT | 0-48000β48000 | β |
| opacity | FLOAT | 00β100 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |