Apply Flux Regional Conds
Where regional prompting actually enforces its masks
- model
- region_conds
- latent
- attn_override
- MODEL
ApplyRegionalConds is the node that makes the pack's regional prompting real. CreateRegionalCond collects prompt + mask pairs; this node builds the actual attention masks that keep each region's text tokens talking only to that region's image tokens, patches them into the model, and hands you back a model that respects the layout you drew. It's the Flux-native answer to the same problem Latent Couple and Regional Prompter solved on SD 1.5.
How it works
Given your region list and the latent, it constructs a per-region attention mask: region text attends to itself and to its masked image area, image tokens in one region don't attend to image tokens in another, and everything else falls back to a background mask. Two subtle details worth knowing:
- The first region in the list is the background. The node internally prepends an all-ones region and region, so your base prompt/background region should be chained first through CreateRegionalCond.
- The masks only apply inside the start_percent → end_percent window (defaults
0→0.5, i.e. the first half of sampling). This matches the current best practice in regional prompting: enforce layout while composition forms, then stop masking so the model blends naturally. Widening the window tightens the regions; narrowing it loosens them.
Inputs:
- model (MODEL) - the ConfigureModifiedFlux-patched Flux model.
- region_conds (REGION_COND) - the chained output from CreateRegionalCond.
- latent (LATENT) - the canvas, whose resolution drives the mask geometry.
- start_percent / end_percent - the active window, described above.
- attn_override (ATTN_OVERRIDE, optional) - from FluxAttnOverride, to pick which transformer layers enforce the masks. Defaults to the odd double blocks and odd single blocks, which is a sensible starting spread.
Output:
- MODEL - the patched model, ready for a guider and sampler.
Installation
Standard for the pack: ComfyUI Manager → search "ComfyUI-Fluxtapoz" → install → restart, or git clone https://github.com/logtd/ComfyUI-Fluxtapoz into custom_nodes. Only einshape, no model files.
Common issues
- Regions ignored entirely almost always means ConfigureModifiedFlux is missing upstream - without the patched blocks, the mask hooks have nowhere to attach.
- Bleeding between regions - dial the end_percent window and clean up your masks. If the masks come from a low-res source, they get interpolated to the latent; a blurry mask is a leaky mask.
- Everything on screen is "background" - check which region is first in the chain; remember it becomes the backdrop.
Regional prompting won't fix an overcrowded scene by itself, but for the two-character / two-object layout problem it's the honest tool, and this node is the enforcement half of it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| region_conds | REGION_COND | — | |
| latent | LATENT | — | |
| start_percent | FLOAT | 0.000–1 | — |
| end_percent | FLOAT | 0.500–1 | — |
| attn_overrideopt | ATTN_OVERRIDE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |