pre_Kontext_mul_mask
Deprecated 5-region masked prompting for Kontext
- context
- image
- mask
- mask1
- mask2
- mask3
- mask4
- mask5
- context
- positive
First thing to know: this node ships filed under the pack's own Deprecated category. The author hasn't pulled it, but they're telling you not to build new workflows around it. If you inherited a graph with this node in it, it'll probably still run - read on to understand what it does - but for anything new, look at pre_mul_Mulcondi in the same pack first, which does almost the same job with a cleaner, non-Kontext-specific schema (and adds a negative output this node doesn't have).
What it was for
This is regional prompting, hand-built for Flux Kontext-style editing. The problem it solves is an old one: a single prompt describing "a red-haired woman on the left and a blue-haired woman on the right" reliably lets those attributes bleed into each other, because prompt adherence is global - the model doesn't know which words apply to which pixels. Regional prompting fixes it by painting the canvas into zones and giving each zone its own instruction. This node lets you define up to five such zones (pos1 through pos5, each a separate text prompt) tied to five separate masks (mask1–mask5), each with its own influence weight (prompt_weight1–prompt_weight5, 0–1, default 0.5). A base image and mask round out the inputs. Everything gets merged into one positive conditioning output, plus the context bundle passed through - this pack threads a RUN_CONTEXT object through nearly every node so you don't have to rewire model/clip/vae/latent by hand at each step.
The inputs and outputs that matter
pos1–pos5- up to five independent text prompts, one per masked region. Leave the ones you don't need blank.mask1–mask5- the region each prompt applies to. You'd typically paint these by hand or generate them from a segmentation node upstream.prompt_weight1–prompt_weight5(default 0.5, range 0–1) - how strongly each region's prompt pulls, relative to the others.context→context,positive- the run-context bundle passes through unchanged;positiveis the merged conditioning you wire into your sampler.
All of the region inputs are optional, so nothing stops you from wiring just one or two if you don't need all five.
Why it's deprecated
Nothing in the pack's changelog spells out the exact reason, but the shape of the replacement tells the story: pre_mul_Mulcondi takes the same five-prompt, five-mask pattern and generalizes it - it drops the Kontext-specific framing, renames the mask inputs (mask_1–mask_5 instead of mask1–mask5), swaps the weight range from a 0–1 blend factor to a 0–10 strength multiplier, and emits both positive and negative conditioning instead of just positive. That reads like a straightforward "same idea, second draft" situation rather than a change of purpose.
How to install it
Search ComfyUI-Apt_Preset in ComfyUI Manager, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
The README ships a Windows install.bat for dependencies; on Linux or Mac, open it in a text editor to see what it's actually installing (it's a thin pip wrapper) and run those commands yourself, or just let ComfyUI Manager resolve missing packages on first launch. No model downloads are required for this specific node - it's pure conditioning logic, no weights to fetch.
Common issues & troubleshooting
Regions bleed into each other anyway. Masked regional prompting only constrains where a prompt's influence concentrates - it doesn't hard-clip the diffusion process to that region. If you need harder boundaries, that's a symptom of the underlying model (Kontext) rather than something this node's weights can fix; lowering the other regions' prompt_weight relative to the one you want dominant helps more than raising the target one.
It's not in the node search, or search turns up nothing under this name. Deprecated nodes in this pack tend to move category over time as the author reorganizes; if a saved workflow references it and ComfyUI reports a missing node, check whether the pack updated past the version that shipped it, and pin your ComfyUI-Apt_Preset install to an older commit if you need this exact node to keep working.
You're starting fresh. Don't. Reach for pre_mul_Mulcondi instead - it's the node this one looks like it was replaced by, and it's not filed under Deprecated.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| contextopt | RUN_CONTEXT | — | |
| imageopt | IMAGE | — | |
| maskopt | MASK | — | |
| pos1opt | STRING | — | |
| pos2opt | STRING | — | |
| pos3opt | STRING | — | |
| pos4opt | STRING | — | |
| pos5opt | STRING | — | |
| mask1opt | MASK | — | |
| mask2opt | MASK | — | |
| mask3opt | MASK | — | |
| mask4opt | MASK | — | |
| mask5opt | MASK | — | |
| prompt_weight1opt | FLOAT | 0.500–1 | — |
| prompt_weight2opt | FLOAT | 0.500–1 | — |
| prompt_weight3opt | FLOAT | 0.500–1 | — |
| prompt_weight4opt | FLOAT | 0.500–1 | — |
| prompt_weight5opt | FLOAT | 0.500–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| context | RUN_CONTEXT | — |
| positive | CONDITIONING | — |