Nodes/KJNodes for ComfyUI/ConditioningSetMaskAndCombine5
ComfyUI Node Runs on cloud

ConditioningSetMaskAndCombine5

The pack's biggest bundled regional-prompting node

By kijai·Created 3 years ago·Updated about 20 hours ago· 2,930
ConditioningSetMaskAndCombine5
  • positive_1
  • negative_1
  • positive_2
  • negative_2
  • positive_3
  • negative_3
  • positive_4
  • negative_4
  • positive_5
  • negative_5
  • mask_1
  • mask_2
  • mask_3
  • mask_4
  • mask_5
  • combined_positive
  • combined_negative
mask_1_strength1.00
mask_2_strength1.00
mask_3_strength1.00
mask_4_strength1.00
mask_5_strength1.00
set_cond_area

This is as far as KJNodes' regional-prompting bundle goes - five independent conditioning-and-mask pairs in one node, same mechanism the whole family shares. As the node's own description puts it: "Bundles multiple conditioning mask and combine nodes into one, functionality is identical to ComfyUI native nodes." At five slots you're well past "two subjects, keep their attributes separate" territory and into full scene composition - a crowd of five distinct figures, or five zones of a complex layout, each carrying its own prompt and mask.

The inputs that matter

  • positive_1/negative_1 through positive_5/negative_5 (CONDITIONING, required) - five independent conditioning pairs.
  • mask_1 through mask_5 (MASK, required) - one mask per region.
  • mask_1_strength through mask_5_strength (default 1, range 010) - per-region weighting, tunable independently.
  • set_cond_area (default / mask bounds) - canvas-wide mask-weighted application, or restrict each region's conditioning to its mask's bounding box.

Outputs: combined_positive and combined_negative, wired straight into your KSampler.

Worth being honest about the trade-off before you reach for this one: five independent conditioning branches is a lot of graph to maintain, and it's rare that all five regions genuinely need their own full prompt rather than a shared base with a couple of masked emphases. If you're not sure yet how many regions your scene actually needs, it's easier to start small - build with the two-region ConditioningSetMaskAndCombine, confirm the masking behaves the way you expect, and only step up to this five-region node once you know you need every slot.

How to install it

Via ComfyUI Manager: search KJNodes for ComfyUI, install, restart. Manually:

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

Then restart. No models needed - this is graph logic on conditioning objects you've already built.

Common issues & troubleshooting

Five text-encode nodes plus five masks feeding one node gets hard to read. At this size, graph organization stops being optional. Group and label your CLIP Text Encode nodes by which region they belong to, and consider a reroute-style pack (this pack's rgthree-adjacent, but rgthree-comfy itself is the standard tool for this) to keep the wiring from turning into a knot.

Generation time and VRAM use are noticeably higher than a single-prompt workflow. That's the real cost of five parallel conditioning entries running through every sampling step - not a misconfiguration, just what five regions costs compared to one.

You need more than five regions. This is the ceiling for KJNodes' bundled variants. Past this point, fall back to hand-chaining native ConditioningSetMask and ConditioningCombine nodes for each additional region - at six-plus regions, the flexibility of building it yourself outweighs what a fixed-size bundle node saves you.

A simpler node would do. If most of your five "regions" are really just minor emphasis rather than fully independent prompts, you likely don't need this whole family - a single base prompt with one or two masked accents (this pack's two-region ConditioningSetMaskAndCombine, or even native ConditioningSetMask) is easier to reason about and cheaper to run.

CategoryKJNodes/masking/conditioning

Inputs (21)

NameTypeDefaultDescription
positive_1CONDITIONING
negative_1CONDITIONING
positive_2CONDITIONING
negative_2CONDITIONING
positive_3CONDITIONING
negative_3CONDITIONING
positive_4CONDITIONING
negative_4CONDITIONING
positive_5CONDITIONING
negative_5CONDITIONING
mask_1MASK
mask_2MASK
mask_3MASK
mask_4MASK
mask_5MASK
mask_1_strengthFLOAT1.000–10
mask_2_strengthFLOAT1.000–10
mask_3_strengthFLOAT1.000–10
mask_4_strengthFLOAT1.000–10
mask_5_strengthFLOAT1.000–10
set_cond_areaCOMBO2 options: default, mask bounds

Outputs (2)

NameTypeDescription
combined_positiveCONDITIONING
combined_negativeCONDITIONING