Nodes/Symbiotica/Symbiotica Regional Prompt
ComfyUI Node

Symbiotica Regional Prompt

The layout-aware edit prompt ERPK actually wants

By symbiotica-ai·Created 6 months ago·Updated about 13 hours ago· 2
Symbiotica Regional Prompt
  • template
  • base_sheet
  • task_sheet
  • prompt
  • image
  • image_refs
  • refs_batch
  • bboxes
  • masks
  • width
  • height
  • desc_1
  • ref_1
  • desc_2
  • ref_2
  • desc_3
  • ref_3
  • desc_4
  • ref_4
  • desc_5
  • ref_5
  • desc_6
  • ref_6
  • desc_7
  • ref_7
  • desc_8
  • ref_8
  • desc_9
  • ref_9
  • desc_10
  • ref_10
ref_moderegion_crop
scene_prompt
placement_markerstrue
enhance_promptstrue
llm_modelclaude-sonnet-5
extra_rules
llm_seed0
api_key
ref_framingrestyle_to_base

ERPK-style Gemini edit nodes want their prompts in a specific shape: numbered box_2d placements per region, the base sheet as image 1, per-region reference images numbered from 2. Writing that by hand is misery and it's exactly where layout edits fall apart. Symbiotica Regional Prompt turns a template bundle into that layout-aware edit prompt automatically - the strongest lever it has against position drift being set-of-mark placement dots.

How it works

From the template and the base_sheet (which becomes image 1), the node builds the ERPK Regional Prompt Builder format: each region gets a numbered box_2d placement and a prompt line, and per-region reference images get numbers from 2 onward. With placement_markers on (default), it draws a labeled colored dot at each region's center on image 1 and cites the dot in that region's prompt - set-of-mark prompting, the same trick the vision-model world converged on. The edit model places each element on its dot and paints the dot out. It's the single most effective thing this node does.

Optionally, enhance_prompts rewrites each region's client text into a dense production prompt via Claude, grounded in the task sheet - the same machinery as the pack's Prompt Enhancer, folded in.

The inputs that matter

  • template (required) - the SYMBIOTICA_TEMPLATE.
  • base_sheet (required) - becomes image 1.
  • ref_mode - per-region reference: region_crop (crop of the task sheet at the region's box - the default), the first checked ref file, or none.
  • task_sheet (optional) - where region_crop refs are cut from.
  • placement_markers - the set-of-mark dots; leave on.
  • enhance_prompts - the Claude rewrite step. Needs Settings → Symbiotica → ANTHROPIC_API_KEY when enabled.
  • ref_framing - restyle_to_base (take the design from the reference but redraw it in image 1's style) or reproduce_exact (copy the reference as-is, ERPK parity).

The outputs

prompt (the composed edit prompt) and image (image 1 with markers), plus image_refs (the ERPK_IMAGE_REFS for an ERPK edit node's image_refs socket) and refs_batch (the same refs as one padded IMAGE batch for generic edit nodes). It also emits bboxes, masks, width/height, and the desc_1..10 / ref_1..10 pairs for the ERPK per-socket lanes.

Install

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/symbiotica-ai/comfyui-nodes.git symbiotica
pip install -r symbiotica/requirements.txt

Restart, or search Symbiotica in ComfyUI Manager. The core prompt-building needs no key; the Claude enhancement does.

Gotchas

Turn placement_markers off and watch position drift come back - that's the clearest before/after experiment you can run with this node. The Claude enhancement is per-region API calls, so keep the same cost and data-leave-the-machine caveats you'd have with any LLM step; llm_seed re-rolls the rewrites while the rest of the prompt caches with the template, so bump only that when you want new text. And if you wire into an ERPK node, use image_refs (the native type), not refs_batch - the batch is for edit nodes that only speak IMAGE.

Categorysymbiotica/pipeline

Inputs (12)

NameTypeDefaultDescription
templateSYMBIOTICA_TEMPLATE
base_sheetIMAGEThe editor's base sheet — becomes image 1
ref_modeCOMBOregion_cropPer-region reference: crop of the task sheet at the region's box, the first checked ref file, or none
task_sheetoptIMAGEThe editor's task sheet; region_crop refs are cut from it
scene_promptoptSTRINGOverrides the bundle's scene prompt
placement_markersoptBOOLEANtrueDraw a labeled colored dot at each region's center on image 1 and cite it in that region's prompt line (set-of-mark). The edit model places each element on its dot and paints the dot out — the strongest lever against position drift.
enhance_promptsoptBOOLEANtrueRewrite each region's client text into a dense production prompt (Claude, grounded in the task sheet). Feeds the desc_N outputs and this node's own prompt. Key: Settings > Symbiotica > ANTHROPIC_API_KEY.
llm_modeloptSTRINGclaude-sonnet-5
extra_rulesoptSTRINGAppended to the enhancer's system prompt — game/style conventions
llm_seedoptINT00–2147483647Change to re-roll the enhanced prompts (otherwise they cache with the template)
api_keyoptSTRINGOverrides Settings > Symbiotica > ANTHROPIC_API_KEY
ref_framingoptCOMBOrestyle_to_baseHow the prompt cites each reference: restyle_to_base = take the DESIGN from the reference but redraw it in image 1's art style (design transfer); reproduce_exact = copy the reference item as-is (ERPK parity)

Outputs (28)

NameTypeDescription
promptSTRING
imageIMAGE
image_refsERPK_IMAGE_REFSPer-region refs in region order — connect to an ERPK image edit node's image_refs
refs_batchIMAGESame refs as one IMAGE batch (padded to a common size) for generic edit nodes
bboxesBOUNDING_BOX
masksMASK
widthINT
heightINT
desc_1STRINGRegion 1's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_1IMAGERegion 1's reference crop — for ERPK ref_N sockets
desc_2STRINGRegion 2's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_2IMAGERegion 2's reference crop — for ERPK ref_N sockets
desc_3STRINGRegion 3's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_3IMAGERegion 3's reference crop — for ERPK ref_N sockets
desc_4STRINGRegion 4's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_4IMAGERegion 4's reference crop — for ERPK ref_N sockets
desc_5STRINGRegion 5's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_5IMAGERegion 5's reference crop — for ERPK ref_N sockets
desc_6STRINGRegion 6's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_6IMAGERegion 6's reference crop — for ERPK ref_N sockets
desc_7STRINGRegion 7's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_7IMAGERegion 7's reference crop — for ERPK ref_N sockets
desc_8STRINGRegion 8's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_8IMAGERegion 8's reference crop — for ERPK ref_N sockets
desc_9STRINGRegion 9's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_9IMAGERegion 9's reference crop — for ERPK ref_N sockets
desc_10STRINGRegion 10's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets
ref_10IMAGERegion 10's reference crop — for ERPK ref_N sockets