Nodes/BV Node Pack/πŸŒ€ BV Regional Prompt Enhancer
ComfyUI Node

πŸŒ€ BV Regional Prompt Enhancer

The prompt rewriter that respects your regions

By BlackVortexAIΒ·Created 8 months agoΒ·Updated a day agoΒ· 6
πŸŒ€ BV Regional Prompt Enhancer
  • regional
  • provider
  • enhancement
  • diff_json
  • diagnostics
β—„instructionImprove clarity, visual specificity, and coherence while preserving intent and BV markup.β–Ί
β—„max_output_tokens2048β–Ί
β—„seed0β–Ί
β—„prompt_languageAnima / hybridβ–Ί
β—„creativity0.50β–Ί

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 / hybrid for sentence-aware models (the pack's recommended local path is Qwen3 via Ollama on Anima workflows), Natural language for prose-oriented setups, or Tag only / SDXL if 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.

CategoryπŸŒ€ BV Node Pack/regional/prompt enhancement

Inputs (7)

NameTypeDefaultDescription
regionalBV_REGIONALβ€”
providerBV_LLM_PROVIDERβ€”
instructionSTRINGImprove clarity, visual specificity, and coherence while preserving intent and BV markup.β€”
max_output_tokensINT2048128–32768β€”
seedINT00–18446744073709550000β€”
prompt_languageCOMBOAnima / hybrid3 options: Anima / hybrid, Natural language, Tag only / SDXL
creativityFLOAT0.500–1β€”

Outputs (3)

NameTypeDescription
enhancementBV_ENHANCEMENT_RESULTβ€”
diff_jsonSTRINGβ€”
diagnosticsSTRINGβ€”