Nodes/MOSS BBOX Prompter/MOSS BBOX Text Link
ComfyUI Node

MOSS BBOX Text Link

Let a node write your box prompts instead of you

By ukr8b3g-cmyk·Created about a month ago·Updated about 12 hours ago· 10
MOSS BBOX Text Link
  • framing_data
  • previous
  • external_text
◄text—►
◄target►

The problem it solves

MOSS BBOX Prompter's whole pitch is per-box prompts: you draw a box, you type who's inside it, and the model gets a caption that says where each subject sits instead of one sentence describing everyone. That's regional prompting done as structured captioning rather than attention masking - same goal as Regional Prompter or Forge Couple, different mechanism, and it dodges the masked approach's seam-and-leak problem because there's no mask at all.

But manual typing doesn't scale to that idea. The moment box text becomes computed - an LLM rewriting a rough scene into per-character descriptions, a join/replace pipeline, the pack's own image analysis - you want a wire, not a textarea. MOSS BBOX Text Link is that wire. It takes any STRING, pins it to one Canvas box, and feeds it to the Prompter.

The nice part is what it doesn't destroy: your hand-typed prompt stays saved. External text overrides it at execution only. Unplug the link and the manual words come back.

How it works

Under the hood the node builds a small record - which Canvas, which box, what text, which link produced it - and the Prompter turns those records into box bodies at run time. A couple of design choices in the source are worth knowing because they explain the errors you'll see.

Links are keyed by Canvas identity plus box ID, so an assignment can't leak into a different Canvas that happens to have a box with the same ID. Duplicates are rejected outright: each Canvas-plus-box pair can appear only once in a chain. And when something's wrong - upstream STRING missing, target box deleted, box assigned twice - it raises instead of silently falling back to your manual text. Silent fallback would be friendlier for one run and ruinous over ten.

Externally fed text is literal. Spaces, line breaks, quotes and pipes survive as typed, even if the Export is in legacy text mode. No formatting, no emoji insertion, no concatenation with the manual body: it replaces the body.

On the card, the prompt area goes read-only and the label switches to External · Not run before execution, then External · Last run once the Prompter receives it. That's a snapshot of the last run, not a live mirror of upstream edits - don't debug a stale LLM output by staring at the card. Workflow files store the link and the chosen box, not the preview text, so after reloading you run once to repopulate it. Type, Framing, Angle, Focus and lettering stay editable throughout; only the body is claimed.

The inputs, and the one output

text is a socket, not a widget - the node is deliberately untypeable-into. Connect Text Multiline, a join/replace node, or an LLM's STRING output. framing_data comes from MOSS BBOX Canvas, and it has to be the current Canvas: the node reads a canvas ID off that blob and errors with "connect an updated MOSS BBOX Canvas" if it's missing. target is the Box selector, holding the chosen box's ID, and it must match exactly one box in the layout, so renaming or recolouring a box is safe but deleting and redrawing it isn't.

previous is the optional escape hatch for multi-box work: chain a second Text Link's external_text into the first one's previous. The single output, external_text, goes to MOSS BBOX Prompter's external_text input, and from there everything is the normal routine - Prompter into Export, Export's prompt into your text encode.

Install

Manager → Install via Git URL → the repo URL, restart, Ctrl+F5. Or:

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

No Python dependencies, so nothing to pip-install - but this specific node needs ComfyUI's V3 backend node API. It imports comfy_api.latest at module load and the pack only registers it when that import resolves. On an older ComfyUI it simply won't be in the node list. Update ComfyUI rather than hunting for a missing file.

The V2 template wants rgthree-comfy and expects MOSS-Image model files (int8 checkpoint, qwen3.5_9b text encoder, VAE); the node itself needs none of that to register.

Wiring two boxes

LLM / Text Multiline ──→ Text Link #1.text          (Box: RED)
MOSS BBOX Canvas.framing_data ──→ Text Link #1.framing_data

Text Link #1.external_text ──→ Text Link #2.previous
LLM / Text Multiline ──→ Text Link #2.text          (Box: BLUE)
MOSS BBOX Canvas.framing_data ──→ Text Link #2.framing_data

Text Link #2.external_text ──→ MOSS BBOX Prompter.external_text

Last link in the chain goes to the Prompter - not the first. Easy to get backwards.

When it misbehaves

Nothing in the node list - ComfyUI too old for the V3 API. "Select an existing box" - target is empty or the box was redrawn and now has a new ID. "Select each Canvas box only once" - two links point at the same box, usually a leftover branch you forgot about. An empty prompt in the render - the upstream STRING arrived empty, and external text wins over manual, including when it's blank. Check your LLM or join node actually emits something. The wrong box changed - if the same Canvas and Prompter feed several Exports, they all share one box body per execution; split the Canvas or the Prompter if you need divergent wording.

Categoryconditioning/MOSS

Inputs (4)

NameTypeDefaultDescription
textSTRINGConnect multiline text, join, replace or LLM STRING output.
framing_dataKREA2_ELEMENT_FRAMING_DATA—
targetSTRINGChoose a box from the connected Canvas.
previousoptMOSS_BBOX_TEXT_LINKSOptional: another Text Link, for additional boxes.

Outputs (1)

NameTypeDescription
external_textMOSS_BBOX_TEXT_LINKS—