Nodes/ComfyUI-Apt_Preset/pre_advanced_condi_merge
ComfyUI Node

pre_advanced_condi_merge

Eight ways to combine two conditioning streams

By cardenluo·Created 2 years ago·Updated 21 days ago· 309
pre_advanced_condi_merge
  • main_cond
  • aux_cond
  • aux_mask
  • conditioning
modeattention
main_cond_ratio0.500
mask_areadefault
attention_temp1.0
cross_weight0.50
adaptive_weight0.70
adv_weight0.10

ComfyUI ships basic ways to combine two conditioning streams - combine, average, concat. This node takes that idea and runs with it: eight different merge strategies, from the two simple ones you already know to attention-weighted, cross-attention, time-staged, and content/style-separated fusion. It exists for the case where you've got a main conditioning (say, a prompt plus ControlNet-baked structure) and a second, auxiliary conditioning (a style reference, a secondary control) and a straight combine or average isn't giving you the balance you want.

Part of Apt_Preset's chx_tool/conditioning category. This is one of the denser nodes in the pack - if you're new to it, you genuinely don't need most of these eight modes, and the honest advice is to start with one of the first two and only reach for the rest once you know specifically what problem you're solving.

The eight modes

  • combine - main and auxiliary features coexist; overlapping regions blend (the node's own description gives the example: blue clothing plus red clothing merges toward purple). main_cond_ratio sets the balance, 0–1.
  • average - the same idea, weighted by main_cond_ratio, but features that appear in both get proportionally blended rather than layered.
  • concat - no controllable ratio here. Matching features get replaced, non-matching features get appended, and if a ControlNet is in the mix, structure ends up concentrated in the controlled region.
  • attention - the default mode. Weights are learned automatically based on which features matter where, rather than a fixed ratio; attention_temp (0.1–10) controls how concentrated that attention gets.
  • cross_attention - aimed specifically at aligning two different modalities feeding the same generation (text plus a ControlNet, an image plus a style reference), where a plain merge tends to leave the two out of step. cross_weight (0–1) sets how tightly they get pulled into alignment.
  • adaptive - splits the generation timeline in two: early steps (roughly the first half) favor structure from the main condition at a fixed high ratio, later steps hand more weight to the auxiliary condition's detail via adaptive_weight.
  • modal_sep - separates content (the main component) from style (the secondary component) and fuses each independently, specifically to avoid content and style fighting each other.
  • adversarial - actively suppresses whichever features conflict between the two conditions (a color or style clash, for instance) rather than blending them, aiming for a coherent result instead of a muddled one. adv_weight (0–1) sets how hard that suppression pushes.

Inputs and outputs

  • main_cond (required) - your primary CONDITIONING.
  • mode (required) - which of the eight strategies to run. Defaults to attention.
  • aux_cond (optional) - the secondary CONDITIONING to merge in. Without it, most modes have nothing to do.
  • main_cond_ratio - 0–1, default 0.5. Used by combine/average.
  • aux_mask (optional MASK) plus mask_area (default/bounds) - restrict where the auxiliary condition applies spatially, rather than across the whole frame.
  • attention_temp, cross_weight, adaptive_weight, adv_weight - the mode-specific tuning knobs described above, each only relevant to its matching mode.

Output is a single merged CONDITIONING, ready to feed straight into your sampler in place of either input alone.

Installing it

ComfyUI Manager: search "ComfyUI-Apt_Preset", install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

Restart afterward. install.bat covers Windows dependencies; Linux/Mac, install from the requirements file inside your ComfyUI venv. No model downloads needed - this operates on conditioning tensors already produced elsewhere in your graph.

Common issues

Node runs but the result looks identical to main_cond alone. Check that aux_cond is actually connected - several modes (combine, average, cross_attention, modal_sep) do essentially nothing without a second conditioning to merge against.

Picked a mode and nothing changed even with both inputs connected. You may be tuning the wrong knob - each mode only reads its own parameter (attention_temp for attention, cross_weight for cross_attention, and so on). Adjusting main_cond_ratio while running in attention mode, for instance, won't do anything; that mode ignores it in favor of learned weighting.

Result looks muddled or washed out with two strong conditions. That's exactly the failure mode adversarial and modal_sep exist to fix - if combine or average is producing a blend that looks like neither condition rather than a coherent mix of both, try one of those two instead of pushing main_cond_ratio further to one side.

Overwhelmed by eight modes and not sure where to start. Don't try to learn all eight at once. combine or average with main_cond_ratio covers the vast majority of "blend two conditions" needs; treat the rest as tools to reach for only once you've hit a specific problem those two don't solve.

CategoryApt_Preset/chx_tool/conditioning

Inputs (10)

NameTypeDefaultDescription
main_condCONDITIONING
modeCOMBOattention8 options: combine, average, concat, attention, cross_attention, adaptive, +2
aux_condoptCONDITIONING
main_cond_ratiooptFLOAT0.5000–1
aux_maskoptMASK
mask_areaoptCOMBOdefault2 options: default, bounds
attention_tempoptFLOAT1.00.1–10
cross_weightoptFLOAT0.500–1
adaptive_weightoptFLOAT0.700–1
adv_weightoptFLOAT0.100–1

Outputs (1)

NameTypeDescription
conditioningCONDITIONING