ComfyUI Node

Nuke Merge

28 blend modes, Nuke-style

By sumitchatterjee13·Created about a year ago·Updated 9 days ago· 59
Nuke Merge
  • A
  • B
  • mask
  • IMAGE
operationover
mix1.00

Every composite, no matter how elaborate, eventually comes down to one moment: putting image A on top of image B and deciding how they interact. NukeMerge is that moment, done the way Nuke's Merge node does it - one node with a deep operation dropdown covering Porter-Duff compositing, standard blend modes, and matte operations. It's the connective tissue of any workflow that layers generated images.

The mental model is simple: A is the foreground (top layer), B is the background (bottom layer). Everything else is choosing what "on top" means for the specific job.

The operations that matter

The dropdown has 28 entries, but you'll live in about six of them:

  • over - the default and the one you'll use most: A composited over B, using A's alpha. This is how you place a cutout on a background.
  • plus - additive: A + B. Light, glow, fire, anything that should add energy.
  • multiply - A × B, darkens, keeps shadows, kills whites. Standard for texture and shadow pass work.
  • screen - the lighten-side twin of multiply; good for glows and light leaks.
  • overlay / soft_light - contrast and blended looks, the "texture on a surface" mode.
  • difference - |A − B|, the alignment-check tool: when two images are identical, difference goes black.

The Porter-Duff set (under, in, out, atop, xor) handles alpha-edge cases for masking and cutout work, and the matte operations (mask, stencil, matte, copy) do channel bookkeeping. If you don't know what "stencil" does, don't worry - you'll reach for over and plus and be fine for months.

The inputs that matter

  • A - foreground.
  • B - background. If the sizes differ, B defines the output frame.
  • operation - the 28-mode dropdown, default over.
  • mix - how much of the merge result replaces B, 0 to 1. Great for dialing a comp in at 60%.
  • mask - optional MASK to limit where the merge applies, so an operation only happens in part of the frame.

Output is a single IMAGE.

Installing it

It's the centerpiece of the Nuke Nodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/sumitchatterjee13/nuke-nodes-comfyui.git nuke-nodes
cd nuke-nodes
pip install -r requirements.txt

Or search "Nuke Nodes" in ComfyUI Manager and restart. It's under the Nuke category, pure PyTorch, no special dependencies.

Common issues

  • The result looks exactly like B - mix is probably at 0, or A has no alpha and you're using over (a fully opaque A just covers B - which is correct behavior, but might not be what you wanted). Give A real transparency, or switch the operation.
  • Things get blindingly bright - that's plus doing its additive thing. If you wanted A on top, use over.
  • Edges look wrong on a cutout - over relies on A's alpha; if A is a hard-edged RGB image with no alpha, the "cutout" is just a rectangle. Generate a matte first.
  • The mask input doesn't seem to do anything - it's a MASK type, so wire in a mask node output, not an IMAGE.

Between this and its sibling NukeKeymix, you've got both halves of compositing: blend operations here, pure mask interpolation there.

CategoryNuke/Merge

Inputs (5)

NameTypeDefaultDescription
AIMAGE
BIMAGE
operationCOMBOover28 options: over, under, plus, minus, multiply, screen, +22
mixFLOAT1.000–1
maskoptMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE