π BV Regional Mask Render
BV Regional Mask Render
- selection
- mask
- x
- y
- width
- height
ComfyUI's ordinary world runs on masks - MASK tensors you can blur, invert, composite, and feed into anything from inpaint nodes to ControlNet conditioning. The BV regional world runs on documents. BV Regional Mask Render is the bridge between them: it takes a selected region (or the global or background scope) and renders it into a real MASK tensor plus the pixel bounding box. If you've ever wished you could grab one region's geometry and use it outside the regional system, this is the node.
How it works
Two inputs: selection (the BV_REGIONAL_SELECTION from BV Regional Select) and the canvas size you want the mask at - width (default 1024) and height (default 1024). Set these to match your sampling resolution; the mask renders into that canvas, since the regional document stores geometry in normalized coordinates.
Five outputs, and the first two are the stars:
mask(MASK) - the rendered selection as a standard mask tensor. This plugs into any ordinary mask consumer: blur, composite, mask-to-image, inpaint, whatever.x,y,width,height(INT) - the selection's pixel bounding box. That's the sleeper feature: a real bounding box of the region, ready for crop nodes, region-aware post-processing, or just knowing where in the frame a subject actually sits.width/heightdoubles as your confirmation that the render came out at the canvas size you expected.
Why you'd want a region as a mask
The pattern that makes this node earn its keep: Select β Mask Render β any ordinary mask workflow. Feed the mask into a detailer so only the region's subject gets the face-fix pass. Use the bounding box to crop the rendered image to the region for a targeted upscale. Composite two regional renders that each used their own document. Once you realize your regional geometry is available as a plain MASK, a lot of "can I make this regional node talk to this normal node" questions just disappear.
Install
Search BV Node Pack in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/BlackVortexAI/bv_nodepack.git
Restart, hard-refresh with Ctrl + F5. No dependencies.
The honest take
Simple node, outsize usefulness - it's the least-glamorous bridge in the pack and one of the most load-bearing for people who mix regional authoring with ordinary mask workflows. The one thing to keep straight: the width/height you pass in define the render canvas, so if your mask and your latent are different sizes, things won't line up. Match the canvas to your sampler's resolution and it all just works.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| selection | BV_REGIONAL_SELECTION | β | |
| width | INT | 10241β16384 | β |
| height | INT | 10241β16384 | β |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| mask | MASK | β |
| x | INT | β |
| y | INT | β |
| width | INT | β |
| height | INT | β |