π BV Regional Prompt Enhancer
The prompt rewriter that respects your regions
- regional
- provider
- enhancement
- diff_json
- diagnostics
Generic LLM prompt rewriters have a dirty secret: they don't know your layout. Feed one a regional-prompting workflow and it will cheerfully rewrite the prompt for "the person on the left" into prose that puts two people in the scene, because the text on its own carries no geometry. BV Regional Prompt Enhancer is the fix - a prompt-only LLM rewriter that's spatially aware, built specifically for the BV Node Pack regional documents.
That's the whole pitch, and it's not marketing: the node hands the LLM the canvas, region geometry, hierarchy, overlap, and priority along with the existing Global, Background, and per-region prompts as immutable context. The model can improve wording, spatial phrasing, and which prompt "owns" which object - but it's structurally unable to touch region identities, masks, or the workflow around them. It changes prompt text only. (Read the README's honest caveat too: spatial awareness is guidance, not a promise. A target image model can still duplicate or mis-bind an object even with a perfect rewritten prompt.)
How the pipeline works
The enhancer is the middle of a three-node chain, and it's deliberately split into propose-then-commit:
BV Remote LLM Provider ββ
ββ> BV Regional Prompt Enhancer β> BV Apply Regional Enhancement
BV Comfy CLIP LLM Provider ββ
You wire a provider (from either provider node), a regional document, and hit run. Looking at the source, it builds a request with all that spatial context, calls the provider, then validates the response against preservation checks (did it keep the BV markup? the document id? the region structure?) and the regional policy you selected. If validation fails, it issues one automatic repair request; if the repair still fails, you get a rejected result rather than a corrupt document. The enhancement output only carries a verified proposal, and the separate Apply node re-checks it again before anything lands.
The inputs that actually matter
- prompt_language - the big one.
Anima / hybridfor sentence-aware models (the pack's recommended local path is Qwen3 via Ollama on Anima workflows),Natural languagefor prose-oriented setups, orTag only / SDXLif you want conservative tag-collision cleanup without inventing prose. - creativity - 0.0 is spelling/grammar/sentence repair, 1.0 is coherent creative enhancement. The README's tested default is 0.5, and tag-only mode is internally capped at 0.3 so it can't go full fanfic on your Danbooru tags.
- seed - the providers are seeded, so this gives you reproducible rewrites for A/B testing.
- instruction - the prompt template, pre-filled with a sane default.
- max_output_tokens - cap the response; 2048 is the default.
The diff_json and diagnostics outputs are your friends: diff_json shows exactly what changed per scope, and diagnostics tells you whether it was OK, repaired after rejection, or flat-out rejected. Wire them into a text display or the pack's BV Text Log Writer and you can audit every rewrite without trusting the LLM.
Installing and the gotchas
Install the pack once for all three nodes - search BV Node Pack in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/BlackVortexAI/bv_nodepack.git
Restart and hard-refresh with Ctrl + F5 (frontend extension, always). There are no pip dependencies; the only moving part is the LLM you choose as provider.
Two practical gotchas from how this is built. First, identical requests are cached on the provider side, so changing an unrelated widget won't re-bill you - but changing the seed, prompt, model, or reasoning setting will, because that's a genuinely new request. Second, evaluate the prompt diff separately from the rendered image. The README's controlled comparison shows the enhancer fixing spatial object placement - one cup near the woman, the notebook near the man - but results stay probabilistic across LLM responses and seeds. Judge the prompt first, then the pixels.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| regional | BV_REGIONAL | β | |
| provider | BV_LLM_PROVIDER | β | |
| instruction | STRING | Improve clarity, visual specificity, and coherence while preserving intent and BV markup. | β |
| max_output_tokens | INT | 2048128β32768 | β |
| seed | INT | 00β18446744073709550000 | β |
| prompt_language | COMBO | Anima / hybrid | 3 options: Anima / hybrid, Natural language, Tag only / SDXL |
| creativity | FLOAT | 0.500β1 | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| enhancement | BV_ENHANCEMENT_RESULT | β |
| diff_json | STRING | β |
| diagnostics | STRING | β |