Layer Blending Ops (live-preview)
The Photoshop blend-mode dropdown, finally as a ComfyUI node
- image_bg
- image_fg
- image
Layer Blending Ops is the node that finally gives ComfyUI a proper Photoshop-style blend-mode dropdown: Normal, Multiply, Screen, Overlay, Soft Light, Hard Light, Darken, Lighten, Color Dodge, Color Burn, Linear Dodge, Linear Burn, Vivid Light, Linear Light, Pin Light, Hard Mix, Difference, Exclusion, Add, Subtract, Divide - twenty-one modes, one mode menu. Drop a background and a foreground image in, pick a mode, and it composites them.
It's the second node in the ComfyUI Channel Ops pack, and it's the one you'll reach for whenever a single flat image isn't enough: texture overlay on a render (Multiply or Overlay), a glow pass (Screen or Linear Dodge), or compositing a foreground cutout onto a background with a clean opacity fade. It also pairs naturally with the pack's own Channel Ops node - do a per-channel operation, then blend the result back over the original to soften it, since Channel Ops has no opacity control of its own.
How it works
The math is the same blend formulas you know from image editors, and it's all plain tensor operations - no model, no dependencies beyond what ComfyUI already has. The two inputs are handled for you in ways that matter:
- The foreground is bilinearly resized to the background's H×W before blending, so mismatched sizes just work. That's convenient, but it also means no aspect-ratio control - if your foreground is a different shape, it gets stretched to fit, not letterboxed or smart-fit.
- Batches align to the smaller one. If your background has 8 frames and your foreground has 2, you get 2 blended frames, not an error. Which is usually what you want, and occasionally not - worth remembering when frames silently disappear.
opacityis 0–255 (the pack uses the same scale for itsamountdials), with 255 = fully opaque. So 128 is 50%. There's noblendpercentage here; that 0–255 scale trips up exactly once.
Every mode output is clamped to [0, 1], so Add and the dodge/burn family won't blow out to white and stay there - clipped, but safe.
The inputs that matter
image_bg- the base layer (required).image_fg- the layer on top, resized to match the background (required).mode- the blend mode. Normal is the default and is just a straight composite.opacity- 0–255, default 255 (opaque). The one control you'll actually tweak.
Output is a single image - wire it to Save Image, back into another blend, or into a mask/composite chain downstream.
Installing
It's part of the ComfyUI Channel Ops pack:
- ComfyUI Manager → Install Custom Nodes → search "ComfyUI Channel Ops" → install → restart.
- Or manually:
cd ComfyUI/custom_nodes && git clone https://github.com/L33chKing/ComfyUI_Channel_Ops, then restart.
No models, no extra pip packages - torch, NumPy, and PIL, all of which ComfyUI already ships. MIT licensed.
Gotchas
- The live preview is the selling point here: both inputs are saved downscaled and the blend is rendered in-node, so you can scrub through all 21 modes and an opacity slider without re-running the graph. If the preview area doesn't show, execute the node once first - the preview is built on first run.
- Hard Mix is aggressive by design. It thresholds the result to near black/white, which is great for posterized looks and startling for everything else. If a blend "breaks" your image, Hard Mix is usually the culprit.
- No per-channel masking on this node. If you need the blend restricted to a region, run a mask through the pack's Filter or Channel Ops nodes first, or composite the masked output yourself.
- Modes are named exactly as in Photoshop, but they're computed from scratch - a couple (Soft Light, Hard Mix) are simplified approximations, not pixel-perfect clones of what Adobe's engine produces. Fine for glows and grades; don't bet a CMYK-critical job on it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image_bg | IMAGE | — | |
| image_fg | IMAGE | — | |
| mode | COMBO | Normal | 21 options: Normal, Multiply, Screen, Overlay, Soft Light, Hard Light, +15 |
| opacityopt | INT | 2550–255 | — |
| preview_idopt | STRING | A | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |