Symbiotica Regional Prompt
The layout-aware edit prompt ERPK actually wants
- 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
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) - theSYMBIOTICA_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) - whereregion_croprefs 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) orreproduce_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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| template | SYMBIOTICA_TEMPLATE | — | |
| base_sheet | IMAGE | The editor's base sheet — becomes image 1 | |
| ref_mode | COMBO | region_crop | Per-region reference: crop of the task sheet at the region's box, the first checked ref file, or none |
| task_sheetopt | IMAGE | The editor's task sheet; region_crop refs are cut from it | |
| scene_promptopt | STRING | Overrides the bundle's scene prompt | |
| placement_markersopt | BOOLEAN | true | Draw 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_promptsopt | BOOLEAN | true | Rewrite 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_modelopt | STRING | claude-sonnet-5 | — |
| extra_rulesopt | STRING | Appended to the enhancer's system prompt — game/style conventions | |
| llm_seedopt | INT | 00–2147483647 | Change to re-roll the enhanced prompts (otherwise they cache with the template) |
| api_keyopt | STRING | Overrides Settings > Symbiotica > ANTHROPIC_API_KEY | |
| ref_framingopt | COMBO | restyle_to_base | How 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)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| image | IMAGE | — |
| image_refs | ERPK_IMAGE_REFS | Per-region refs in region order — connect to an ERPK image edit node's image_refs |
| refs_batch | IMAGE | Same refs as one IMAGE batch (padded to a common size) for generic edit nodes |
| bboxes | BOUNDING_BOX | — |
| masks | MASK | — |
| width | INT | — |
| height | INT | — |
| desc_1 | STRING | Region 1's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_1 | IMAGE | Region 1's reference crop — for ERPK ref_N sockets |
| desc_2 | STRING | Region 2's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_2 | IMAGE | Region 2's reference crop — for ERPK ref_N sockets |
| desc_3 | STRING | Region 3's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_3 | IMAGE | Region 3's reference crop — for ERPK ref_N sockets |
| desc_4 | STRING | Region 4's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_4 | IMAGE | Region 4's reference crop — for ERPK ref_N sockets |
| desc_5 | STRING | Region 5's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_5 | IMAGE | Region 5's reference crop — for ERPK ref_N sockets |
| desc_6 | STRING | Region 6's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_6 | IMAGE | Region 6's reference crop — for ERPK ref_N sockets |
| desc_7 | STRING | Region 7's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_7 | IMAGE | Region 7's reference crop — for ERPK ref_N sockets |
| desc_8 | STRING | Region 8's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_8 | IMAGE | Region 8's reference crop — for ERPK ref_N sockets |
| desc_9 | STRING | Region 9's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_9 | IMAGE | Region 9's reference crop — for ERPK ref_N sockets |
| desc_10 | STRING | Region 10's prompt (enhanced when enhance_prompts is on) — for ERPK desc_N sockets |
| ref_10 | IMAGE | Region 10's reference crop — for ERPK ref_N sockets |