FLUX.3 Prompt Builder KJ(Flux3PromptBuilderKJ)
FLUX. 3 Prompt Builder KJ (Flux3PromptBuilderKJ, category KJNodes/text) is a visual layout builder for FLUX. 3 prompts.
Flux3 Prompt Builder KJ
Description
FLUX.3 Prompt Builder KJ (Flux3PromptBuilderKJ, category KJNodes/text) is a visual layout builder for FLUX.3 prompts. Draw boxes on the canvas, give each box an id and a description, and the node appends those boxes to the prompt as a JSON table using a 0–1000 coordinate grid. Cite a box in the prompt as <id> to tie words to that region.
The node can work with reference images as well. Each reference gets its own canvas (selectable from the toolbar), in the same order the model receives them (ref_1 first). A box drawn on a reference marks where an object is in that reference; select the box, switch to the output canvas, and draw again to place that object there. A box only on a reference means the object is removed; a box only on the output means it is new.
Inputs
Canvas
- width (
INT, default1024, min64, max16384, step16): Output canvas width, and therefore the aspect the boxes are drawn on. Values are in multiples of 16. - height (
INT, default1024, min64, max16384, step16): Output canvas height, and therefore the aspect the boxes are drawn on. Values are in multiples of 16.
Prompt and Layout Data
- prompt (
STRING, default empty): The prompt text. The box table is appended after it. Cite boxes in this text using<id>. - elements_data (
STRING, default empty): Serialized boxes from the editor. This is managed by the node UI and normally should not be edited manually. - bboxes (
BOUNDINGBOX, optional): Optional pixel-space boxes ({x, y, width, height}) used to seed the output canvas when the editor has no boxes.
Images and References
- image (
IMAGE, optional): Optional background for the output canvas, also shown behind the preview. Its brightness is controlled bybg_brightness. - references (
AUTOGROW, required): Reference images, in the order the model receives them (ref_1 = ref_image_0). Each reference gets its own canvas in the editor. - image (
IMAGE, required): A required IMAGE input exposed by the node. The source definition lists both an optional backgroundimageand this requiredimageinput; check the sockets in ComfyUI when wiring so the optional background and the required image connection are not confused.
Import and Preview
- import_caption (
STRING, optional, default empty): An optional FLUX.3 caption (prompt plus box table), such as the output of a prompt upsampler. When connected, it loads into the editor and drives the output according toimport_mode. - import_mode (
COMBO, default"when empty", options"when empty"/"always"): Controls how a wiredimport_captionis used. In"when empty"mode it only seeds the editor while the editor has no boxes; after that the editor wins, so you can edit the layout. In"always"mode the wired caption is authoritative. - bg_brightness (
INT, default25, min0, max100): Background image brightness percentage. This is managed by the node UI slider and applies to the optional background image.
Outputs
The node returns six outputs, in order:
- STRING: The final prompt text, with the box table appended after the
promptvalue. - IMAGE: A rendered canvas/preview image of the layout.
- BOUNDINGBOX: The boxes from the output canvas as bounding-box data, using pixel-space
{x, y, width, height}boxes. - INT: The canvas width.
- INT: The canvas height.
- STRING: The serialized editor state (
elements_data), which can be reused or fed back into another builder.
Usage Notes
- Draw boxes on the output canvas, then give each box an
idand a description. Reference the box inpromptas<id>so the model ties those words to that region. - When using reference images, wire them in the same order they are given to the model.
ref_1corresponds toref_image_0. Use the toolbar view selector to switch between the output canvas and each reference canvas. - To move or place an object, draw its box on the reference, select that box, switch to the output canvas, and draw again. A box present only on a reference means the object is removed; a box present only on the output means it is new.
- The canvas controls are the same as in the Ideogram 4 builder. Right-click lists the boxes on the current canvas.
- If
bboxesis connected and the editor has no boxes, the pixel-space boxes seed the output canvas. - With
import_modeset to"when empty", a wiredimport_captionseeds the editor only while it is empty and then lets you edit. Set it to"always"when the wired caption should remain authoritative. - Use multiples of 16 for
widthandheight; the node accepts values from 64 to 16384.
Comments
Sign in with GitHub to join the discussion.