Skip to main content
Builds the layout prompt that MOSS-Image reads. It takes the elements drawn in the Create Bounding Boxes node and emits a JSON layout with one entry per box: its label, its caption, and its rectangle in the pixel space of the target canvas. Set width and height to the size of the image you plan to generate, then connect the output to the prompt input of the text encoder. With no elements connected the prompt text is returned unchanged.

Inputs

Outputs

Notes

Box rectangles arrive from Create Bounding Boxes as normalized coordinates between 0 and 1000 and are written to the layout in pixels relative to the center of the canvas, in yxyx order. The width and height values therefore have to match the image you generate, otherwise the boxes land in the wrong place. A box that holds text is always labeled as text, a box whose number is listed in character_boxes is labeled as a character, and every other box is labeled as an object.
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): da012a8d0dceaf6391110c90bd677d7929920d60fe961c00e5011b037206aa9a