Nodes/ComfyUI-WJNodes/Composite Merge pro
ComfyUI Node

Composite Merge pro

Combine two settings chains into one (carefully)

By 807502278·Created 2 years ago·Updated 11 months ago· 21
Composite Merge pro
  • Options1
  • Options2
  • Composite_Basic
merge_modenormal
Cannot_mergedOptions1
merge_Applicationtrue
merge_backfalse
merge_surfacefalse
merge_MaskMixfalse
merge_Canvasfalse

WJNodes flags this one as experimental in its own description, and it's worth taking that seriously - this is the most advanced node in the pack's options-chain family for ImageCompositeMask_adv (see Composite_Basic for the base chaining pattern). Most of the family extends a single chain step by step. Composite_Merge_pro does something different: it takes two separate chains and combines them into one, which is a meaningfully harder problem than appending settings in sequence.

Why you'd want it, and why it warns you

If you've built two different presets - say, one options chain tuned for a "drop shadow" look and another tuned for a specific blend mode and mask handling - normally you'd have to rebuild one combined chain by hand. Composite_Merge_pro lets you keep them as two separate, reusable chains and combine them programmatically instead. That's genuinely convenient for building a small library of reusable composite presets.

The catch, straight from the node's own description: non-override merge modes can produce incorrect settings. Combining two arbitrary settings objects isn't always well-defined - what should happen when both chains set a conflicting blend mode? - and the pack's author is upfront that the non-override paths haven't fully solved that. If you need predictable results, override mode is the safer choice; the others are there for when you understand the tradeoff.

The inputs and outputs that matter

  • merge_mode - normal (a "smart" additive merge following each field's own combination rule - the pack's own recommended default), override (Options2's non-default values win wherever they're set, otherwise Options1 stands), add, subtract, multiplication, division, max, min (arithmetic combination of numeric values between the two chains).
  • Cannot_merged (default Options1) - which chain wins for settings that can't be numerically merged (dropdown-style fields, mostly): default, Options1, or Options2.
  • merge_Application (default true), merge_back, merge_surface, merge_MaskMix, merge_Canvas - booleans scoping which categories of settings actually get merged. Only merge_Application is on by default; the rest are off, so a plain merge without touching these only combines the application-scope settings (from Composite_Application_pro), not canvas, coordinate, or mask settings, unless you turn those categories on explicitly.
  • Options1, Options2 (both optional) - the two chains to merge.
  • Composite_Basic (output) - the merged chain.

Installing it

Via ComfyUI Manager: search ComfyUI-WJNodes, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-WJNodes.git
cd ComfyUI-WJNodes
pip install -r requirements.txt

Nothing extra needed for this node.

Common issues & troubleshooting

Merged result has settings that don't make sense, or seem to contradict either input chain. This is the exact failure mode the node's own description warns about with non-override modes. Switch merge_mode to override and see if the result becomes predictable - if it does, that confirms the merge itself, not your inputs, was the issue.

A category of settings you expected to merge didn't. Check merge_back, merge_surface, merge_MaskMix, and merge_Canvas - all four default to off, so unless you turn on the specific category you care about, only application-scope settings get combined.

Unsure which of two conflicting settings "won." That's what Cannot_merged controls for non-numeric fields - it defaults to Options1 winning ties, not to a genuinely merged value, so if your result looks like it just used one chain's settings wholesale for a given field, that's expected behavior, not a bug.

CategoryWJNode/ImageBlend/options_adv

Inputs (9)

NameTypeDefaultDescription
merge_modeCOMBOnormal8 options: normal, override, add, subtract, multiplication, division, +2
Cannot_mergedCOMBOOptions13 options: default, Options1, Options2
merge_ApplicationBOOLEANtrue
merge_backBOOLEANfalse
merge_surfaceBOOLEANfalse
merge_MaskMixBOOLEANfalse
merge_CanvasBOOLEANfalse
Options1optComposite_Basic
Options2optComposite_Basic

Outputs (1)

NameTypeDescription
Composite_BasicComposite_Basic