Stack_condi
Five Masked Regions, One Background, One Conditioning Bundle
- mask_1
- mask_2
- mask_3
- mask_4
- mask_5
- condi_stack
Putting two or three specifically-described things in specific places in one image is one of the genuinely unsolved problems in text-to-image - the community's own framing is that multiple distinct subjects in one shot is "largely unsolved without spatial scaffolding." Stack_condi is that scaffolding: up to five independent text prompts, each with its own mask and its own strength, composited over a shared background prompt, all rolled into one conditioning bundle.
How it's laid out
- pos1 through pos5 - five independent positive text prompts, each optional. You don't need to fill all five; use as many regions as your composition actually needs.
- mask_1 through mask_5 - a mask per region, telling the node where each
posNprompt applies. - mask_1_strength through mask_5_strength (default 1, range 0–10) - how strongly each region's prompt is weighted relative to the others.
- background (multiline text, default
background is sea- yes, that's the author's own placeholder) and background_strength (default 1) - the prompt covering whatever isn't claimed by one of the five masks. - neg (default
Poor quality) - a single shared negative prompt covering the whole composite.
Output: condi_stack, a STACK_CONDI object meant to feed into Apt_Preset's own downstream sampler node.
What it's actually doing
This is regional conditioning: instead of one prompt describing the whole frame, you paint five masks over your canvas and give each one its own description - "a knight" over one region, "a dragon" over another, "a stone tower" over a third - while the background prompt fills in whatever's left unmasked. Each region's mask and strength control how firmly that text's conditioning is applied within its boundary; everything is composited into one CONDITIONING-shaped bundle before it reaches the sampler, rather than you manually chaining ConditioningSetMask and ConditioningCombine nodes five times over.
Setting it up
Start with fewer regions than you think you need - two or three well-placed masks beat five overlapping ones. Keep strengths near the default (1) until you see whether a region is being under- or over-expressed, then nudge individual posN_strength values rather than the whole composition's CFG. The background prompt matters more than it looks like it should: anything your masks don't cover falls back to it, so a vague background prompt (or the sample "background is sea" left un-edited) will bleed into any gaps in your mask coverage.
Install
ComfyUI Manager: search "ComfyUI-Apt_Preset," install, restart. By hand: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git, then restart. The pack's install.bat dependency installer is Windows-only - on Linux or a cloud instance, open it to see what it installs and pip-install those packages yourself, or trust ComfyUI Manager's "install missing nodes" prompt the first time you load a graph that needs it.
Troubleshooting
The schema doesn't spell out what happens to a mask that doesn't match your canvas's resolution - assume it needs to line up and check your output carefully if a region looks warped or misplaced rather than assuming it auto-corrects.
Leaving a posN field empty presumably means that mask's region just falls back toward the background prompt rather than getting its own override, though the exact fallback isn't documented - if a region isn't behaving how you expect, double-check you actually typed something into its posN field.
This pack has real, reported import failures independent of Stack_condi specifically - a comfyui subreddit thread shows (IMPORT FAILED): ...ComfyUI-Apt_Preset in someone's console after loading a workflow that used one of its nodes. ComfyUI Manager's "install missing custom nodes" fixed it for them, as did manually re-cloning the repo and restarting.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| pos1opt | STRING | — | |
| pos2opt | STRING | — | |
| pos3opt | STRING | — | |
| pos4opt | STRING | — | |
| pos5opt | STRING | — | |
| mask_1opt | MASK | — | |
| mask_2opt | MASK | — | |
| mask_3opt | MASK | — | |
| mask_4opt | MASK | — | |
| mask_5opt | MASK | — | |
| mask_1_strengthopt | FLOAT | 1.000–10 | — |
| mask_2_strengthopt | FLOAT | 1.000–10 | — |
| mask_3_strengthopt | FLOAT | 1.000–10 | — |
| mask_4_strengthopt | FLOAT | 1.000–10 | — |
| mask_5_strengthopt | FLOAT | 1.000–10 | — |
| backgroundopt | STRING | background is sea | — |
| background_strengthopt | FLOAT | 1.000–10 | — |
| negopt | STRING | Poor quality | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| condi_stack | STACK_CONDI | — |