Apex Layer Blend
Photoshop blending modes without leaving ComfyUI
- base_image
- overlay_image
- mask
- blended_image
- blend_info
Apex Layer Blend brings Photoshop-style layer compositing into the graph. You feed it a base image and an overlay, pick one of 27 blend modes, and get a composited result - multiply, screen, overlay, color dodge, difference, hue, luminosity, the whole classic set. If you've ever wanted a light-leak texture to interact with your render the way it would in a real editor, this is the node that does it without exporting anything.
The mechanism is per-pixel math, same as any editor. Multiply darkens by multiplying the channels together, screen inverts and multiplies to brighten, overlay does contrast tricks depending on whether the base is above or below mid-gray. The color group (hue, saturation, color, luminosity) is the more interesting one: it converts both images to HSL, takes the hue/saturation from the overlay and the luminosity from the base, then converts back - that's why those modes feel like "recoloring the base with the overlay's palette." All of it runs as GPU tensor ops, which is why a plain normal blend completes in a couple of milliseconds at 1024×1024.
The inputs that matter
- base_image and overlay_image - the two layers. Order matters: the base is what survives, the overlay is the effect being applied.
- blend_mode - the 27-mode dropdown. You'll live on multiply, screen, overlay, and soft_light 90% of the time; the rest is for specific looks.
- opacity (0–1, default 1) - crossfades between the raw base and the blended result. This is the "how much of this effect do I actually want" dial, and it's the one you'll forget exists until something looks overcooked.
The mask input is the real power move - it restricts the blend to part of the frame, so you can composite a texture onto a subject while leaving the background untouched. Outputs are blended_image and a blend_info string recording the mode and opacity you used.
One thing to know before you wire it up
The node auto-resizes the overlay to match the base. If the two images are different sizes, the overlay gets stretched (or squeezed) to fit. That's convenient for quick comps - you don't have to pre-resize - but it also means you should feed a properly-shaped overlay if aspect ratio matters to you, because you won't get a warning. Batch shapes are checked, sizes are not.
Installing it
Same pack as everything else: Apex Artist - install once via ComfyUI Manager (search "Apex Artist"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/ApexArtist/comfyui-apex-artist.git
Then restart ComfyUI. It appears under Add Node → Apex Artist → Image → Composite. Zero extra dependencies and no model downloads - the pack's requirements file only lists what ComfyUI already ships. It's a small MIT pack from an indie author with essentially no community presence; that's fine here because the source is a single readable file, and after the ComfyUI malware incidents of 2024, "I can actually read the whole thing" is a genuinely comforting property.
Gotchas
If your overlay is semi-transparent (a PNG with alpha), don't assume it's being honored - the blend math operates on the RGB you feed it, so bake the alpha in before you get here if you need it. And when a blend looks "wrong," it's usually a color-space mismatch: if you're blending linear-Flux output with sRGB textures, the results will be off regardless of mode. The KB's ecosystem notes make the general point - ComfyUI gives you enormous capability and zero hand-holding - and blending is exactly the kind of thing where you'll feel that until you've done it once.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| base_image | IMAGE | — | |
| overlay_image | IMAGE | — | |
| blend_mode | COMBO | normal | 27 options: normal, dissolve, darken, multiply, color_burn, linear_burn, +21 |
| opacity | FLOAT | 1.000–1 | — |
| maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| blended_image | IMAGE | — |
| blend_info | STRING | — |