ComfyUI Node
Regional Prompt Builder
Draw regions on a canvas and emit a layout-aware prompt for image generation models, plus pixel bounding boxes.
Regional Prompt Builder
- image
- ref_1
- ref_2
- ref_3
- ref_4
- ref_5
- ref_6
- ref_7
- ref_8
- ref_9
- ref_10
- regions
- prompt
- bboxes
- width
- height
- image
- image_refs
- masks
◄width1024►
◄height1024►
◄prompt►
◄regions_data[]►
◄removal_fillinpaint►
◄chroma_color#00B140►
◄desc_1—►
◄desc_2—►
◄desc_3—►
◄desc_4—►
◄desc_5—►
◄desc_6—►
◄desc_7—►
◄desc_8—►
◄desc_9—►
◄desc_10—►
CategoryERPK/utils
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102464–8192 | Target frame width in pixels |
| height | INT | 102464–8192 | Target frame height in pixels |
| prompt | STRING | Scene description: subject, setting, background, and style. Elements drawn on the canvas are placed on top of this scene. | |
| regions_data | STRING | [] | Managed by the canvas editor; JSON list of normalized regions. |
| removal_fillopt | COMBO | inpaint | How cleared areas (cut-outs and moved-region origins) are filled: 'inpaint' rebuilds the background (can smear on busy scenes); 'chroma' lays a flat key color to remove with a downstream chroma keyer. |
| chroma_coloropt | STRING | #00B140 | Hex chroma key color used when removal_fill is 'chroma' (default chroma green; pick blue/magenta if the scene already contains the key color). |
| imageopt | IMAGE | Optional reference image shown under the canvas regions and passed through unchanged, so the builder can sit inline in an image-edit chain. | |
| desc_1opt | STRING | Overrides region 1's description when connected (regions numbered as on the canvas). | |
| desc_2opt | STRING | Overrides region 2's description when connected (regions numbered as on the canvas). | |
| desc_3opt | STRING | Overrides region 3's description when connected (regions numbered as on the canvas). | |
| desc_4opt | STRING | Overrides region 4's description when connected (regions numbered as on the canvas). | |
| desc_5opt | STRING | Overrides region 5's description when connected (regions numbered as on the canvas). | |
| desc_6opt | STRING | Overrides region 6's description when connected (regions numbered as on the canvas). | |
| desc_7opt | STRING | Overrides region 7's description when connected (regions numbered as on the canvas). | |
| desc_8opt | STRING | Overrides region 8's description when connected (regions numbered as on the canvas). | |
| desc_9opt | STRING | Overrides region 9's description when connected (regions numbered as on the canvas). | |
| desc_10opt | STRING | Overrides region 10's description when connected (regions numbered as on the canvas). | |
| ref_1opt | IMAGE | Reference image for region 1. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_2opt | IMAGE | Reference image for region 2. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_3opt | IMAGE | Reference image for region 3. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_4opt | IMAGE | Reference image for region 4. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_5opt | IMAGE | Reference image for region 5. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_6opt | IMAGE | Reference image for region 6. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_7opt | IMAGE | Reference image for region 7. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_8opt | IMAGE | Reference image for region 8. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_9opt | IMAGE | Reference image for region 9. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| ref_10opt | IMAGE | Reference image for region 10. With an image connected and the region set to Node, it is composited into the scene at the region's box (background auto-keyed), pixel-exact; otherwise it is forwarded on image_refs and the region's prompt line cites its image number (regions numbered as on the canvas). | |
| regionsopt | ERPK_REGIONS | Detected regions (JSON) appended after the canvas regions at execute time. The canvas is unchanged, and desc_N/ref_N bind canvas regions only. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| bboxes | BOUNDING_BOX | — |
| width | INT | — |
| height | INT | — |
| image | IMAGE | — |
| image_refs | ERPK_IMAGE_REFS | Per-region reference images in region order; connect to an image edit node's image_refs input. |
| masks | MASK | One mask per region in region order [N, height, width]; regions without a stored segmentation get a filled-rectangle mask. |