π BV Regional Deconstructor
Prompts, ASTs, and source, one selection at a time
- regional
- selection
- positive_ast
- positive_text
- positive_source
- negative_ast
- negative_text
- negative_source
- selected_id
- selected_name
If BV Regional Select is the picker, BV Regional Deconstructor is the picker that dumps everything on the table. Where Select hands you a selection object, Deconstructor takes that same slice - global, background, or one region - and unpacks it into nine outputs covering the prompt's structured AST, its plain text, its raw source, and the selection's identity. It's the node for when you don't just want a slice, you want every representation of that slice at once.
What the outputs actually are
Inputs match Select: regional, scope (global/background/region, default region), and region (the region name when scope is region). The outputs are the useful part:
selection- theBV_REGIONAL_SELECTIONobject, same as Select's output, so you can chain it into Mask Render or Prompt Extract.positive_astandnegative_ast(bothBV_AST) - the structured prompt tree, the pack's parse of the prompt into semantic categories. This is the currency of the pack's Prompt AST system; if you're doing category-aware prompt processing, this is where the structured version lives.positive_textandnegative_text(STRING) - the plain-text render of each prompt, ready for display or text nodes.positive_sourceandnegative_source(STRING) - the original source text before any parsing. The pack treats*_sourceas the single source of truth; AST and text are derived views. If you ever see a mismatch between what you typed and what a consumer used, source is where the truth lives.selected_idandselected_name(STRING) - the region's stable UUID and its name.
Why "three representations" isn't overkill
It looks redundant until you hit the workflows that need it. The AST exists so you can filter or reuse semantic prompt blocks without fragile string replacement - the pack's Prompt Encode/Decode family is built on it. The text is what you want for a prompt display node or to feed a rewrite/LLM pass. The source is what you want when you're round-tripping: edit the source, feed it back, and let the parser re-derive everything. Deconstructor is the node that makes all three available without you building the parse pipeline yourself.
When you'd reach for it
You're building a prompt-exploration workflow (show me the parsed categories of region 2), a Subgraph that needs a region's prompt as a projectable control, or a debugging session where "what did this region actually contain" is the question. The selected_id/selected_name pair matters in exactly the reusable-Subgraph case: stable IDs mean the same region keeps its identity even if names change, which is the pack's whole "stable IDs authoritative, names presentation" philosophy in action.
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
If you only ever feed whole documents to compilers, Deconstructor is overkill - Select plus Prompt Extract covers most needs with fewer ports. But the moment you want structured prompt data or both text and source side by side, this is the right tool, and it's the node that makes the pack's AST system actually reachable from the regional world.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| regional | BV_REGIONAL | β | |
| scope | COMBO | region | 3 options: global, background, region |
| region | STRING | β |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| selection | BV_REGIONAL_SELECTION | β |
| positive_ast | BV_AST | β |
| positive_text | STRING | β |
| positive_source | STRING | β |
| negative_ast | BV_AST | β |
| negative_text | STRING | β |
| negative_source | STRING | β |
| selected_id | STRING | β |
| selected_name | STRING | β |