Region bbox
Draw a region as a rectangle, in sane 0–1 coordinates
- condition
- REGION
FluxRegionBBOX is one half of how you define a region for the pack's headline node. It turns a rectangle plus a prompt's conditioning into a REGION, which you then feed into RegionAttention. If your region is roughly rectangular - a character on the left, a building on the right, a chunk of sky up top - this is the fast path. No mask painting, just four numbers.
Those four numbers are the part beginners fumble first, so let's be blunt: x1, y1, x2, y2 are fractions of the image, not pixels. They all run 0 to 1, where (0,0) is the top-left corner and (1,1) is the bottom-right. At generation time the pack multiplies them by the actual image width and height, so your region scales with resolution automatically. (0.25, 0.25, 0.75, 0.75) is always the middle half of the frame, at 768×768 or 1536×1536.
The defaults are a trap worth naming: x1=0, y1=0, x2=0.5, y2=0.5 - a top-left quarter of the image. If you drag a box node in, wire it up, and your region ends up in a corner you didn't mean, that's the default staring back at you. Set all four.
The other required input is condition: a CONDITIONING of the region's own prompt. You get that the usual Flux way - a ClipTextEncodeFlux node with the region's description ("a man in a red jacket", not the whole scene). The output is a REGION object that bundles that conditioning with the box, and you plug it into RegionAttention's region1 through region4 sockets.
Mechanically there's not much more to it. The box gets converted to a hard-edged mask at the generation size, then downsampled to latent resolution for the attention math. Hard edge means what it sounds like: the boundary is sharp, so a bbox region is best for "this area is this thing" rather than a feathered blend.
How you get it installed:
cd ComfyUI/custom_nodes
git clone https://github.com/attashe/ComfyUI-FluxRegionAttention
then restart ComfyUI (or use ComfyUI Manager and search "ComfyUI-FluxRegionAttention"). No extra model downloads - it runs on the Flux.1 checkpoint you already have.
Troubleshooting is short because the node is short. If the region isn't landing where you think, check whether you changed all four coordinates, not just two - people move x2 and y2 and leave the corner at the default. If your regions overlap, the pack does zero out the intersecting attention, but overlap is where this technique gets flaky; non-overlapping boxes are the stable path. And remember the pack-wide caveat from the author: this is train-free regional control, results are "not always stable", and some seeds just won't cooperate. When a region does nothing, re-roll the seed before you blame your coordinates.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| x1 | FLOAT | 0.000–1 | — |
| y1 | FLOAT | 0.000–1 | — |
| x2 | FLOAT | 0.500–1 | — |
| y2 | FLOAT | 0.500–1 | — |
| condition | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| REGION | REGION | — |