Nodes/ComfyUI LC123 Nodes/🧩LC Prompt Assembler
ComfyUI Node

🧩LC Prompt Assembler

The prompt assembler that also emits regional JSON

By lonecatone23·Created 2 months ago·Updated 3 days ago· 18
🧩LC Prompt Assembler
    • prompt
    • json
    pretty_printtrue
    remove_emptytrue
    include_scene_bboxesfalse
    subjects
    scene
    camera
    lighting
    style
    palette
    mood
    background
    composition
    extra
    margin0.05

    This is the payoff node of the pack's whole Prompt Builder stack. Feed it the outputs of the modular prompt nodes - subjects, scene, camera, lighting, style, palette - and 🧩LC Prompt Assembler returns two things: a clean, ordered prompt string for normal CLIP encoding, and a structured JSON with bounding boxes for the regional models that want placement data (Krea2, Ideogram, the Anima regional tooling). One prompt, two consumers, built from parts instead of one giant box of text.

    How it works

    All the content inputs are optional sockets, each with a tooltip naming its source: subjects (from 🗒️LC Subject or Subject Array), scene (Scene Builder), camera, lighting, style, palette (Color Palette's text output), plus free-text mood, background, composition, and extra fields. It assembles the human-readable prompt with labeled sections - Subject, Scene, Camera, Lighting, and so on - and, separately, builds the JSON for regional use.

    The JSON part is where it gets clever. Subject nodes carry position trailers (which this pack encodes as |||LC_POS:h|v|d||| markers), and the assembler converts those into elements entries with a bbox - a frame-relative box derived from horizontal, vertical, and depth placement, inset from the edges by margin (0–0.25, default 0.05 = 5%). Scene furniture/landmark boxes are included only when include_scene_bboxes is on (off by default - the main regional use is subject boxes). If there's high-level content but no placed elements, it emits a single centered fallback box rather than nothing.

    The three widgets that matter:

    • include_scene_bboxes - off by default; flip it only if you want scene objects in the JSON.
    • remove_empty - skip blank sections so empty sockets don't leave stray lines.
    • pretty_print - indented vs compact JSON. For humans or for log files.

    Outputs: prompt (STRING → CLIP text encode / conditioning) and json (STRING → regional builders like Krea2 or Ideogram).

    The real workflow

    Subjects + Scene + Camera + Lighting + Style + Palette → Assembler → prompt to CLIP for the full image, json to a regional builder for placement-aware generation. The pack positions the json output as only for regional builders - don't feed it to CLIP and expect magic.

    Install

    Part of ComfyUI LC123 Nodes (MIT, 89 nodes). ComfyUI Manager → search "ComfyUI LC123 Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lonecatone23/ComfyUI_LC123_nodes
    

    Restart. No extra dependencies. On hosted platforms like RunningHub, request the pack and they install it for you.

    The honest take

    The prompt side of this node is genuinely nice - block-structured prompts are exactly what modern LLM-encoded models respond to. The JSON side is only as good as your regional model's appetite for bbox captions; Krea2 and Ideogram are the intended consumers, and if you're not using those, the json output is just neat decoration. Start with the prompt, add the regional part when the model asks for it.

    CategoryLC123/prompt

    Inputs (14)

    NameTypeDefaultDescription
    pretty_printBOOLEANtrueJSON with indents when on; compact when off.
    remove_emptyBOOLEANtrueSkip blank sections so empty sockets do not leave empty lines.
    include_scene_bboxesBOOLEANfalseWhen on, JSON also includes scene furniture/landmark boxes. When off (default), only subject bboxes — the main regional use.
    subjectsoptSTRINGFrom 🗒️LC Subject or Subject Array.
    sceneoptSTRINGFrom 🗒️LC Scene Builder.
    cameraoptSTRINGFrom 🗒️LC Camera.
    lightingoptSTRINGFrom 🗒️LC Lighting.
    styleoptSTRINGFrom 🗒️LC Style Selector.
    paletteoptSTRINGFrom 🎨LC Color Palette (text output).
    moodoptSTRINGOptional mood line (free text).
    backgroundoptSTRINGOptional extra background notes.
    compositionoptSTRINGOptional composition notes (rule of thirds, etc.).
    extraoptSTRINGAnything else to append at the end.
    marginoptFLOAT0.050–0.25Inset all bboxes from frame edges (0–0.25). Default 0.05 = 5%.

    Outputs (2)

    NameTypeDescription
    promptSTRING
    jsonSTRING