Nodes/MOSS BBOX Prompter/MOSS BBOX Prompter
ComfyUI Node

MOSS BBOX Prompter

Seven color cards, one line of text per thing you want

By ukr8b3g-cmyk·Created 10 days ago·Updated 3 days ago· 6
MOSS BBOX Prompter
    • prompt_ui_data
    ◄scene►
    ◄background►
    ◄red_prompt►
    ◄blue_prompt►
    ◄yellow_prompt►
    ◄green_prompt►
    ◄magenta_prompt►
    ◄red_typeobject►
    ◄blue_typeobject►
    ◄yellow_typeobject►
    ◄green_typeobject►
    ◄magenta_typeobject►
    ◄prompt_ui_data►
    ◄red_framingAuto►
    ◄blue_framingAuto►
    ◄yellow_framingAuto►
    ◄green_framingAuto►
    ◄magenta_framingAuto►
    ◄red_angleAuto►
    ◄blue_angleAuto►
    ◄yellow_angleAuto►
    ◄green_angleAuto►
    ◄magenta_angleAuto►
    ◄cyan_prompt►
    ◄cyan_typeobject►
    ◄cyan_framingAuto►
    ◄cyan_angleAuto►
    ◄orange_prompt►
    ◄orange_typeobject►
    ◄orange_framingAuto►
    ◄orange_angleAuto►
    ◄red_focusAuto►
    ◄blue_focusAuto►
    ◄yellow_focusAuto►
    ◄green_focusAuto►
    ◄magenta_focusAuto►
    ◄cyan_focusAuto►
    ◄orange_focusAuto►

    Draw a box, describe what's in it. That's the deal with MOSS BBOX Prompter, the wording half of the current MOSS BBOX pair. It has a scene field, a background field, and seven color cards - red through orange - each with a description, a type, and framing/angle dropdowns. It outputs one thing: prompt_ui_data, which goes into MOSS BBOX Export along with the canvas.

    Nothing in this node generates anything. It's a text editor whose whole job is to keep each description attached to the right color so the canvas's boxes know which words belong to them.

    Why the color indirection exists

    MOSS-Image reads a structured caption: summary, then items each with a label and a bounding box. If you've done regional prompting the old way - masks, area conditioning, latent couples - this is the same problem (two subjects, attributes bleeding together) solved at the caption layer instead of the attention layer. The model is told where things go rather than having its attention masked into regions.

    Colors are the naming scheme for that. One box per color is the simple case. But you can draw five red boxes and they all inherit red's description - the pack's colors are not a seven-box limit. When same-color boxes need different words, you give a box its own ID card on the canvas; those per-box prompts live in the canvas's saved state, not here, and they take priority over the color defaults at export. So: color cards are the baseline, ID cards are the exceptions.

    What you actually set

    scene and background are stitched into the layout's summary caption, scene first. Then for each color in use:

    • *_prompt - the description. All boxes of that color share it.
    • *_type - character, object or text. This is what becomes the item's label, and it's authoritative: quoting a description or starting it with text: won't relabel it. There's a fourth option, obj, which is the legacy spelling and is restored as object so old workflows load correctly.
    • *_framing and *_angle - eleven and twenty-four presets. Pick "Close-up" and Export appends "shown in a close-up view" to that color's caption. Auto adds nothing.

    Red, blue, yellow, green and magenta are the original five required cards; cyan and orange were appended as optional widgets in 1.0.9 so the original 23-widget order stayed intact for anyone with saved workflows. If a cyan or orange card is left completely blank it's dropped from the output entirely.

    How text cards differ

    Choose text for a color and the card holds the literal wording to render, not a description of it. Two modes downstream, and the prompter feeds both: legacy expects visible wording | appearance and splits on the pipe; literal keeps the card exactly as typed - quotes, pipes, newlines, trailing spaces. That's why the node also carries a raw copy of text values alongside the cleaned data: Export can hand you the untrimmed string, but only as of workflows executed on a current version. If an older workflow went through a Krea2 prompter that already stripped whitespace, it's gone.

    Also worth knowing: framing and angle are ignored on text slots. They only decorate character and object captions.

    Wiring

    MOSS BBOX Canvas   framing_data    ──→ MOSS BBOX Export framing_data
    MOSS BBOX Prompter prompt_ui_data  ──→ MOSS BBOX Export prompt_ui_data
    MOSS BBOX Export   prompt → CLIP Text Encode, width/height → Empty Flux 2 Latent
    

    Both wires, always. Export validates the version tag on each one and fails loudly rather than guessing.

    There's also a prompt_ui_data string sitting in this node's own widget list. That's the UI's persistence slot for per-slot text styles - don't edit it.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/ukr8b3g-cmyk/MossImage-BBOX-Prompter.git
    

    Restart ComfyUI and Ctrl+F5. No pip dependencies; the pack ships its own UI helpers, so there's no Krea2 install required despite the adapted controls. You'll need MOSS-Image weights and a MOSS-capable ComfyUI, plus rgthree-comfy only for the bundled examples.

    Where people trip

    Wrong prompter. The legacy node displays as "MOSS BBOX Prompter (Hybrid)" and outputs a finished prompt; this one has no parenthetical and outputs prompt_ui_data. If Export complains about a missing prompt UI output, you grabbed the hybrid one.

    Empty box, empty caption. Draw a blue box and leave the blue card blank and you get a layout item with no caption - warned about in the log, not filled in for you. Empty is treated as intentional.

    Typed descriptions that never ship. Prose in a card with no box of that color only survives in caption/hybrid prose as an "unboxed description", and vanishes in layout_json. Draw the box, or delete the text.

    Position words fighting coordinates. "On the left" written into a card whose box is on the right produces a warning and a muddled image. The prompter is where that mismatch is easiest to fix, so fix it there.

    Categoryconditioning/MOSS

    Inputs (38)

    NameTypeDefaultDescription
    sceneSTRING—
    backgroundSTRING—
    red_promptSTRING—
    blue_promptSTRING—
    yellow_promptSTRING—
    green_promptSTRING—
    magenta_promptSTRING—
    red_typeCOMBOobject4 options: character, object, text, obj
    blue_typeCOMBOobject4 options: character, object, text, obj
    yellow_typeCOMBOobject4 options: character, object, text, obj
    green_typeCOMBOobject4 options: character, object, text, obj
    magenta_typeCOMBOobject4 options: character, object, text, obj
    prompt_ui_dataSTRING—
    red_framingCOMBOAuto11 options: Auto, Cowboy shot, Full body, Upper body, Bust-up, Headshot, +5
    blue_framingCOMBOAuto11 options: Auto, Cowboy shot, Full body, Upper body, Bust-up, Headshot, +5
    yellow_framingCOMBOAuto11 options: Auto, Cowboy shot, Full body, Upper body, Bust-up, Headshot, +5
    green_framingCOMBOAuto11 options: Auto, Cowboy shot, Full body, Upper body, Bust-up, Headshot, +5
    magenta_framingCOMBOAuto11 options: Auto, Cowboy shot, Full body, Upper body, Bust-up, Headshot, +5
    red_angleCOMBOAuto27 options: Auto, Front view, 3/4 right, 3/4 left, Eye level, POV, +21
    blue_angleCOMBOAuto27 options: Auto, Front view, 3/4 right, 3/4 left, Eye level, POV, +21
    yellow_angleCOMBOAuto27 options: Auto, Front view, 3/4 right, 3/4 left, Eye level, POV, +21
    green_angleCOMBOAuto27 options: Auto, Front view, 3/4 right, 3/4 left, Eye level, POV, +21
    magenta_angleCOMBOAuto27 options: Auto, Front view, 3/4 right, 3/4 left, Eye level, POV, +21
    cyan_promptoptSTRING—
    cyan_typeoptCOMBOobject4 options: character, object, text, obj
    cyan_framingoptCOMBOAuto11 options: Auto, Cowboy shot, Full body, Upper body, Bust-up, Headshot, +5
    cyan_angleoptCOMBOAuto27 options: Auto, Front view, 3/4 right, 3/4 left, Eye level, POV, +21
    orange_promptoptSTRING—
    orange_typeoptCOMBOobject4 options: character, object, text, obj
    orange_framingoptCOMBOAuto11 options: Auto, Cowboy shot, Full body, Upper body, Bust-up, Headshot, +5
    orange_angleoptCOMBOAuto27 options: Auto, Front view, 3/4 right, 3/4 left, Eye level, POV, +21
    red_focusoptCOMBOAuto13 options: Auto, Face, Eyes, Mouth, Hands, Feet, +7
    blue_focusoptCOMBOAuto13 options: Auto, Face, Eyes, Mouth, Hands, Feet, +7
    yellow_focusoptCOMBOAuto13 options: Auto, Face, Eyes, Mouth, Hands, Feet, +7
    green_focusoptCOMBOAuto13 options: Auto, Face, Eyes, Mouth, Hands, Feet, +7
    magenta_focusoptCOMBOAuto13 options: Auto, Face, Eyes, Mouth, Hands, Feet, +7
    cyan_focusoptCOMBOAuto13 options: Auto, Face, Eyes, Mouth, Hands, Feet, +7
    orange_focusoptCOMBOAuto13 options: Auto, Face, Eyes, Mouth, Hands, Feet, +7

    Outputs (1)

    NameTypeDescription
    prompt_ui_dataKREA2_ELEMENT_PROMPT_DATA—