Compositing: Layer Add
Add a layer with a blend mode and opacity, the way you'd expect
- stack
- layer_image
- layer_mask
- LAYER_STACK
This is the node that makes the pack's layer system feel like Photoshop. JHPixelProLayerAdd takes a LAYER_STACK and an image, and adds that image as a new layer on top - with a blend mode, opacity, fill, an optional mask, and clip-to-below support. It's the workhorse of the compositing group: everything that isn't the background layer goes through this node.
You need a JHPixelProLayerStackStart upstream (that's the background layer), and you'll usually finish with JHPixelProLayerFlatten to render the result. In between, chain as many LayerAdds as you like - each one returns a new immutable stack, so the order you wire them in is the layer order they stack in.
The settings that matter
blend_mode: 27 modes, the full classic set -normal,multiply,screen,overlay,soft_light,hard_light,color_dodge,linear_burn,difference,exclusion,subtract,divide, plus the HSL modes (hue,saturation,color,luminosity) and the exotic corners (dissolve,hard_mix,pin_light,vivid_light, …). If you know Photoshop, every name means the same thing here.multiplyandscreenare the ones you'll live in.opacity(0–1, default 1): overall layer transparency. 0.5 is a half-transparent layer, exactly like Photoshop.fill(0–1, default 1): the fill knob - layer content opacity, separate from the layer's own opacity. Pro users know the distinction (fill doesn't affect layer effects; here there are no layer effects, so it's mostly a second, compositing-friendly opacity). Keep it at 1 unless you have a reason.clip_to_below(default false): clip this layer to the layer beneath it - the classic Photoshop clipping-mask behavior. Great for "texture only within the shape below" composites.layer_mask(optional MASK): the layer's alpha mask. The mask and the layer image both auto-resize to the base stack size (bilinear), so you don't have to pre-scale them.
Output is the new LAYER_STACK. That's it - stack in, stack out, layer added.
Two things to know
The stack is immutable, so you can't "edit" a layer - you branch or re-add. That's fine and it's how the graph stays clean. And if you're used to chaining math nodes to approximate a blend, stop: the implementation here is the real blend math, and divide, subtract, and the HSL modes are the ones you genuinely couldn't do by hand without a whole mini-graph.
Install
ComfyUI Manager → search ComfyUI-JH-PixelPro, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/ComfyUI-JH-PixelPro.git
cd ComfyUI-JH-PixelPro
pip install -r requirements.txt
Restart ComfyUI; it's under ComfyUI-JH-PixelPro/compositing. The pack needs ComfyUI ≥ 0.43.x, Python ≥ 3.10, plus kornia, mediapipe, opencv-python-headless, and scipy.
The honest caveat: this is layers-lite. No layer styles (bevel, glow, drop shadow), no smart objects - the README is upfront that those are out of scope. What you get is the core thing people actually use layers for: stacking images with real blend modes, masks, and opacity, non-destructively, in the graph. If that's the workflow you've been missing in ComfyUI, this node plus Start and Flatten is your whole toolkit.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| stack | LAYER_STACK | — | |
| layer_image | IMAGE | — | |
| blend_mode | COMBO | normal | 27 options: normal, dissolve, darken, multiply, color_burn, linear_burn, +21 |
| opacity | FLOAT | 1.000–1 | — |
| fill | FLOAT | 1.000–1 | — |
| clip_to_below | BOOLEAN | false | — |
| layer_maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LAYER_STACK | LAYER_STACK | — |