Regional Layout Masks (!! / !!! / TB / TMB)
Masks for two- and three-character scenes
- mask_a_wife
- mask_b_bull
- mask_c_husband
- region_count
- layout_used
You don't paint your region masks. You type !!! and get three soft-edged vertical bands, ready for an Attention Couple–style regional workflow. That's the whole pitch of RegionalLayoutMasks, the biggest node in the ComfyUI-FilterLoRATriggers pack: turn a one-word layout token into ready-to-wire region masks, so the layout can live in a text file and be rolled through a wildcard instead of hand-adjusted every generation.
This is regional prompting, the old trick where you give each part of the canvas its own prompt so two characters don't bleed attributes into each other. The outputs tell you the intended audience plainly - mask_a_wife, mask_b_bull, mask_c_husband - because the pack was built for DrkSun81's Illustrious NTR workflows. But the node itself is generic: any two- or three-subject scene split works the same way.
How it works
There's a preset table in regional_layout.py, and each preset is just a list of normalized rectangles that become 1×H×W float masks:
OFF- full frame, region A only!!- left / right, a 55/45 split!!!- left / mid / right, 40/30/30TB- top / bottomTMB- top / mid / bottom, three horizontal bands
Notice the numbers: every multi-region preset overlaps its neighbors by about 10%, then the feather value softens the edges with a box blur (an average-pool pass under the hood). Soft, overlapping edges are deliberate - hard mask boundaries are what give regional prompting its characteristic collaged, seamed look, and this node is trying to avoid that for you. It won't fully solve the seams, though; the real fix is ending the masking once composition forms, which is a job for your regional conditioning node, not this one.
Aliases are accepted so wildcard lines read naturally: 2→!!, 3→!!!, LR→!!, LMR→!!!, TOPBOTTOM→TB, TOPMIDBOTTOM→TMB, SINGLE/FULL/1→OFF. Unknown tokens fall back to !!, and a lone ! is treated as OFF.
Inputs and outputs that matter
layout(required, default!!): the token. The tooltip is the spec: "OFF | !! | !!! | TB | TMB (or from layout list)" - the "layout list" isMaster_List_NTR_v2_Layouts.txt, fed line by line via WildPromptor so each generation rolls a different split.width/height(defaults 1024 × 1536, 64–8192 in steps of 8): the mask canvas. Match these to your latent size or the masks won't line up with what's being sampled. The default is a portrait frame that stays inside Illustrious's 1536² sweet spot, which tells you what workflow this was tuned for.feather(default 24, 0–128): edge softness in pixels. 24 is a sensible starting point; crank it to 0 for knife-edge regions, but expect seams.
Outputs: mask_a_wife, mask_b_bull, mask_c_husband (all MASK - unused regions are zeros tensors, so wiring all three is harmless), plus region_count (INT) and layout_used (STRING) for switching and debugging. The masks feed your regional/Attention Couple conditioning node; layout_used tells you which token actually won the alias normalization.
Installing it
Same story as the rest of the pack - no models, no extra dependencies beyond torch, which ComfyUI already runs.
cd ComfyUI/custom_nodes
git clone https://github.com/DrkSun81/ComfyUI-FilterLoRATriggers.git
restart ComfyUI, and watch for [ComfyUI-FilterLoRATriggers] registered: [...] in the console. Or grab it via ComfyUI Manager by searching the pack title.
Where people get burned
- It only makes masks. The node produces region masks; it does not apply them. You still need the Attention Couple / regional conditioning nodes for the model you're actually running, and those are architecture-specific - what works on Illustrious doesn't port to a DiT model. This node is the layout front-end, not the whole regional stack.
- Feather is a box blur. It's proportional to the canvas, and big values at high resolution blur whole regions into each other. If regions start merging, check
featherbefore you blame the masks. - The "has no class_type" trap. If you load a saved workflow before the pack finished loading, ComfyUI saves a red missing-node stub. Fix: restart, load the workflow JSON fresh, or delete the red node and re-add "Regional Layout Masks" from the menu under
utils/regional.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| layout | STRING | !! | OFF | !! | !!! | TB | TMB (or from layout list) |
| width | INT | 102464–8192 | — |
| height | INT | 153664–8192 | — |
| feather | INT | 240–128 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| mask_a_wife | MASK | — |
| mask_b_bull | MASK | — |
| mask_c_husband | MASK | — |
| region_count | INT | — |
| layout_used | STRING | — |