Nodes/ComfyUI-WJNodes/Composite Application pro
ComfyUI Node

Composite Application pro

Choose which layer your settings actually apply to

By 807502278·Created 2 years ago·Updated 11 months ago· 21
Composite Application pro
  • Options
  • Composite_Basic
res_backfalse
res_surfacefalse
res_maskfalse
apply_backfalse
apply_surfacetrue
apply_masktrue

Part of WJNodes' modular options-chain system for its ImageCompositeMask_adv compositor (see Composite_Basic for the full explanation of how these chain together). If Composite_Basic and friends are where you set blend modes, opacity, mask handling and so on, Composite_Application_pro is where you decide who those settings apply to: the background layer (back), the layer being placed on top (surface), or the blend mask itself (MaskMix).

Why you'd need this

Most of the option nodes in this family default to affecting surface and the mask, not back - that's stated directly in Composite_Batch's own description, and it's the sensible default since you're usually adjusting the thing being composited onto the background, not the background itself. But sometimes you genuinely want your opacity, blend mode, or coordinate settings to apply to back instead - compositing multiple layers in sequence, say, where today's "surface" is tomorrow's "back." Composite_Application_pro is the control for redirecting that scope, and it also gives you a clean way to reset any one of the three roles back to its defaults without rebuilding the whole chain.

The inputs and outputs that matter

Six booleans, in two groups:

  • apply_back, apply_surface (default true), apply_mask (default true) - whether the accumulated settings in this chain apply to that role at all. back is off by default; surface and mask handling are on.

  • res_back, res_surface, res_mask - reset that role's settings back to default, independent of the apply flags above.

  • Options (optional) - the chain to modify.

  • Composite_Basic (output) - the chain, now scoped.

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

No extra dependency for this node or its siblings.

Common issues & troubleshooting

Settings you configured upstream don't seem to affect the background layer. That's expected unless you explicitly turned apply_back on here - it's off by default across this family, precisely because most workflows only want to adjust the surface and mask.

A setting you thought you reset is still active. The res_* flags reset a role's settings, but only within this node's position in the chain - if a later node in the same chain re-applies a setting to that role, the reset gets overridden downstream. Order matters in this options-chain pattern the same way it would in any pipeline: check what comes after this node, not just before it.

Unsure whether this node is even necessary for your graph. If you're happy with the default scoping (surface + mask, not back), you don't need Composite_Application_pro at all - it exists specifically for the cases where the default scope is wrong for what you're building, which for a lot of simple two-layer composites, it won't be.

CategoryWJNode/ImageBlend/options_adv

Inputs (7)

NameTypeDefaultDescription
res_backBOOLEANfalse
res_surfaceBOOLEANfalse
res_maskBOOLEANfalse
apply_backBOOLEANfalse
apply_surfaceBOOLEANtrue
apply_maskBOOLEANtrue
OptionsoptComposite_Basic

Outputs (1)

NameTypeDescription
Composite_BasicComposite_Basic