ComfyUI Node
MOSS Regional Layout
Draw MOSS-Image layout boxes, caption them and give each box its own LoRAs. Outputs the MOSS layout prompt and a MODEL whose LoRAs only act inside their box (token-masked bypass). Scene LoRAs act on the whole image or only outside the LoRA boxes. Editor based on kijai's MOSS-Image Prompt Builder (KJNodes).
MOSS Regional Layout
- model
- image
- bboxes
- clip
- MODEL
- prompt
- preview
- mask_preview
- bboxes
- width
- height
◄width1024►
◄height1024►
◄prompt►
◄meta►
◄canvasnone►
◄feather0.10►
◄skirt0.00►
◄text_tokens▾►
◄ownership▾►
◄measure_until0.30►
◄spill0.10►
◄elements_data►
◄scene_loras_data►
◄style_palette_data►
◄bg_brightness25►
◄import_modewhen empty►
◄output_formatcompact►
◄import_json—►
CategoryMoonPack/lora
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| width | INT | 102464–16384 | Generation width: the boxes are placed in its pixels. |
| height | INT | 102464–16384 | Generation height: the boxes are placed in its pixels. |
| prompt | STRING | Description of the whole scene and its style (summary.caption). | |
| meta | STRING | Optional comma-separated summary.meta tags. | |
| canvas | COMBO | none | Optional summary.canvas. |
| feather | FLOAT | 0.100–0.3 | Soft LoRA mask edge, as a fraction of the box's shorter side. |
| skirt | FLOAT | 0.000–0.25 | Grows every LoRA mask by this fraction of the image's shorter side. |
| text_tokens | COMBO | masked: box LoRAs skip the text tokens (least bleed). global: box LoRAs also act on all text tokens (more bleed). own caption: each box LoRA also acts on its own caption's tokens, e.g. its trigger words (needs the clip input). | |
| ownership | COMBO | box: the drawn boxes decide where each LoRA acts (box 1 is in front). attention: during the first steps the node measures which caption each image area belongs to, then overlaps and the area around a box go to the character that is actually there (needs the clip input). | |
| measure_until | FLOAT | 0.300.05–0.9 | attention ownership: fraction of sampling used to measure; the box masks apply meanwhile. |
| spill | FLOAT | 0.100–0.3 | attention ownership: how far beyond its box a LoRA may follow its subject, as a fraction of the image's shorter side. |
| elements_data | STRING | — | |
| scene_loras_data | STRING | — | |
| style_palette_data | STRING | — | |
| bg_brightness | INT | 250–100 | — |
| import_mode | COMBO | when empty | 2 options: when empty, always |
| output_format | STRING | compact | — |
| imageopt | IMAGE | Optional background for the editor and the preview. | |
| import_jsonopt | STRING | Optional MOSS-Image layout JSON to load into the editor. | |
| bboxesopt | BOUNDING_BOX | Optional pixel boxes to seed an empty editor. | |
| clipopt | CLIP | The MOSS text encoder used for this prompt. Only needed for ownership = attention and text_tokens = own caption; it is used to find each box caption's tokens, the prompt is not changed. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| prompt | STRING | — |
| preview | IMAGE | — |
| mask_preview | MASK | — |
| bboxes | BOUNDING_BOX | — |
| width | INT | — |
| height | INT | — |