Nodes/ComfyUI-Apt_Preset/pre_mul_Mulcondi
ComfyUI Node

pre_mul_Mulcondi

Five-region masked prompting, with a negative output

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
pre_mul_Mulcondi
  • context
  • mask_1
  • mask_2
  • mask_3
  • mask_4
  • mask_5
  • context
  • positive
  • negative
pos1
pos2
pos3
pos4
pos5
mask_1_strength1.00
mask_2_strength1.00
mask_3_strength1.00
mask_4_strength1.00
mask_5_strength1.00

This is regional prompting, ComfyUI-Apt_Preset style: instead of one prompt trying to describe your whole image and getting attributes smeared across subjects, you split the canvas into up to five masked zones and give each one its own text. It's the same underlying idea as the pack's deprecated pre_Kontext_mul_mask - same five-prompt, five-mask shape - but generalized off the Kontext-specific framing and shipped with a negative conditioning output the older node never had. If you're picking between the two, pick this one; the other is explicitly marked deprecated in the pack.

Regional prompting exists because prompt adherence in diffusion models is global, not spatial - describe two characters with different hair colors in one sentence and the model has no built-in sense of which words belong to which pixels. Painting masks over the canvas and giving each its own prompt is the community's long-standing fix, going back to Latent Couple and Regional Prompter on SD 1.5. This node is that pattern, wired for whatever model your context is carrying.

The inputs and outputs that matter

  • pos1pos5 (all optional STRING, multiline) - up to five independent prompts, one per region. Skip any you don't need.
  • mask_1mask_5 (optional MASK) - the corresponding region for each prompt.
  • mask_1_strengthmask_5_strength (default 1, range 0–10) - how hard each region's prompt pulls. Note this isn't a 0–1 blend like a lot of weight sliders; it's an open-ended multiplier, so pushing one region to 3 or 4 while leaving the others at 1 is a real, usable move if one instruction keeps losing to its neighbors.
  • context (optional) - the pack's run-context bundle, threaded through so you don't have to rewire model/clip/vae separately.
  • Outputs: context passthrough, positive, and negative - both CONDITIONING, ready for your sampler's two conditioning slots.

Every input here is technically optional, including context, which means the node degrades gracefully if you're testing it in isolation - but in practice you'll want at least two or three regions and a context bundle wired in for it to do anything useful.

How to install it

Search ComfyUI-Apt_Preset in ComfyUI Manager and install from there, or clone it directly:

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

The README's dependency installer (install.bat) is Windows-only; on Linux or Mac, read what it actually runs and pip-install those yourself, or just let ComfyUI Manager fill gaps on first load. No models to download for this node specifically - it's pure conditioning assembly, no weights involved.

Common issues & troubleshooting

One region dominates no matter what you set. Regional prompting steers where a prompt's influence concentrates; it doesn't hard-clip generation to the mask boundary the way, say, inpainting with a strict mask does. If a region keeps losing, try both raising its own mask_x_strength and lowering its neighbors' - the relative balance matters more than the absolute number.

Masks overlap and results get muddy. With five independent masks and no built-in conflict resolution, overlapping regions will have both prompts competing for the same pixels. Tighten the masks so they don't overlap, or accept the blend if that's actually what you want (a soft transition between two regions can look more natural than a hard seam).

You only need positive, not negative. That's fine - leave the negative output unconnected. The node still computes it, but ComfyUI won't complain about an unused output.

Migrating from pre_Kontext_mul_mask. The mask input names changed (mask1mask_1, underscore added) and the weight semantics changed (0–1 blend factor became a 0–10 strength multiplier), so a straight copy-paste of old weight values will behave differently here - recheck them rather than assuming parity.

CategoryApt_Preset/chx_tool/conditioning

Inputs (16)

NameTypeDefaultDescription
contextoptRUN_CONTEXT
pos1optSTRING
pos2optSTRING
pos3optSTRING
pos4optSTRING
pos5optSTRING
mask_1optMASK
mask_2optMASK
mask_3optMASK
mask_4optMASK
mask_5optMASK
mask_1_strengthoptFLOAT1.000–10
mask_2_strengthoptFLOAT1.000–10
mask_3_strengthoptFLOAT1.000–10
mask_4_strengthoptFLOAT1.000–10
mask_5_strengthoptFLOAT1.000–10

Outputs (3)

NameTypeDescription
contextRUN_CONTEXT
positiveCONDITIONING
negativeCONDITIONING