Nodes/MOSS BBOX Prompter/MOSS BBOX Prompter (Hybrid)
ComfyUI Node

MOSS BBOX Prompter (Hybrid)

The node that writes the actual prompt

By ukr8b3g-cmyk·Created 10 days ago·Updated 3 days ago· 6
MOSS BBOX Prompter (Hybrid)
  • canvas_data
  • prompt
  • width
  • height
  • moss_json
◄moss_state{"schema_version":"moss_bbox_v1","prompt":"","width":896,"height":1184,"slots":{"red":"","blue":"","yellow":"","green":"","magenta":"","cyan":"","orange":""},"boxes":[],"settings":{"auto_position":false,"active_slot":"red","draw_mode":false,"selected_id":null}}►

The canvas draws rectangles. This node writes the sentence. MOSS BBOX Prompter (Hybrid) takes the geometry from a connected canvas, adds the wording you typed into its own seven color cards plus a whole-image prompt, and emits the hybrid string you feed to CLIP Text Encode.

It's the second half of the legacy pair, and like the legacy canvas it still works fine - the current equivalent is MOSSSharedPrompter feeding MOSS BBOX Export. If a workflow you downloaded has this node in it, here's exactly what it's doing.

The split, and why it's a nice split

Word and box live in different nodes here, which reads odd until you use it. You can nudge a rectangle three pixels and re-run without retyping a description; you can rewrite a color's description without touching geometry. The canvas fires canvas_data, the prompter fires prompt - a wire between them, not a copy. The prompter's live preview follows canvas edits as you make them, and its saved state stays focused on text.

That separation matters because layout-conditioned models reward iteration on both axes independently. MOSS-Image reads a structured caption - a summary, then items carrying a label and a centralized pixel yxyx box - and it does not treat those parts as decoration. Text and geometry both steer, and they can disagree with each other.

How it merges the two halves

Mechanically it's blunt and predictable. The node parses the incoming canvas_data for boxes, dimensions, colors and per-box labels, then overwrites the prompt fields in that layout with its own: the whole-image prompt becomes summary.caption, its seven color descriptions become the per-slot captions, and auto_position comes from its own settings. Then the shared builder renders hybrid output:

Character (box 1, red):
a young woman in a wet trench coat

Object (box 2, blue):
red ceramic teapot

{"summary":{"caption":"..."},"items":[{"label":"character","caption":"...","bbox":[-392,-540,-40,120]},...],"bbox_coord_space":"abs_centralized","bbox_format":"yxyx"}

Prose first, blank line, then the official object. Colors organize the editor; they are not an output palette, and nothing about "red" appears in the prompt. All boxes of one color share that color's description, while each box keeps its own type and, if it's a text box, its own string to render.

Inputs and outputs

Required: canvas_data (MOSS_BBOX_LAYOUT, from the canvas) and moss_state (STRING, the widget the prompter UI writes into - leave it alone).

Four outputs: prompt → CLIP Text Encode's positive text; width and height → Empty Flux 2 Latent (both, converted to inputs); moss_json if you want the schema with none of the prose.

One subtlety: the dimensions come from the connected canvas, not from the prompter's own numbers. If you wire the canvas's width/height to the latent and the prompter's to nothing, everything agrees. Mix sources and you'll get boxes that look offset.

Install

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

Or in ComfyUI-Manager: Install via Git URL with the repo address. Restart ComfyUI, Ctrl+F5 in the browser - the color cards are DOM widgets, so a stale frontend shows you one cryptic string widget and no cards at all.

Zero pip dependencies, and the package installs no models. You need MOSS-Image weights and a MOSS-capable ComfyUI; rgthree-comfy only if you want to open the bundled example workflows, which use its Power Lora Loader.

Traps

Empty means empty, deliberately. Clear a color's description and that text is gone from the output - it does not inherit the previous run's value. The author treats clearing a field as an instruction, not an accident.

Descriptions with no box still ship, as prose. Type into the blue card and never draw a blue box: the text appears under "Unboxed description (blue)" with a warning, and layout JSON has no slot for it. Draw the box or delete the text.

Hybrid is the only mode here. If you want prose-only or JSON-only output you need MOSS BBOX Export, which adds output_mode. This node predates that choice.

Hand-written position words can fight the boxes. Say "on the left" while the box sits right and you'll get a warning and a confused image. The box wins the geometry, the words win the attention - the conflict is yours to resolve.

Two promotors, similar names. MOSSBBoxPrompter displays as "MOSS BBOX Prompter (Hybrid)"; the current node is plain "MOSS BBOX Prompter". Search marks the hybrid one deprecated. It isn't broken, it's just not where new workflows should start.

Categoryconditioning/MOSS

Inputs (2)

NameTypeDefaultDescription
canvas_dataMOSS_BBOX_LAYOUT—
moss_stateSTRING{"schema_version":"moss_bbox_v1","prompt":"","width":896,"height":1184,"slots":{"red":"","blue":"","yellow":"","green":"","magenta":"","cyan":"","orange":""},"boxes":[],"settings":{"auto_position":false,"active_slot":"red","draw_mode":false,"selected_id":null}}—

Outputs (4)

NameTypeDescription
promptSTRING—
widthINT—
heightINT—
moss_jsonSTRING—