Nodes/SAX Bridge/SAX Text Catalog
ComfyUI Node

SAX Text Catalog

A prompt binder that lives in your graph — SAX Text Catalog

By so16tm·Created 7 months ago·Updated 10 days ago· 1
SAX Text Catalog
    • out_0
    • out_1
    • out_2
    • out_3
    • out_4
    • out_5
    • out_6
    • out_7
    • out_8
    • out_9
    • out_10
    • out_11
    • out_12
    • out_13
    • out_14
    • out_15
    • out_16
    • out_17
    • out_18
    • out_19
    • out_20
    • out_21
    • out_22
    • out_23
    • out_24
    • out_25
    • out_26
    • out_27
    • out_28
    • out_29
    • out_30
    • out_31
    ◄items_json{}►
    ◄select_to_add_lora▾►
    ◄select_to_add_wildcard▾►
    ◄merge_outputsfalse►

    SAX Text Catalog is a three-ring binder for your prompts, stored inside the node instead of scattered across text widgets. You keep a catalog of named texts - positive prompts, negative fragments, style blocks, whatever - and assign each one to an output slot through a relation. Flip which item a slot points to and every node downstream sees the new text without a single rewiring. It's the missing middle ground between "type your prompt every time" and "maintain a whole external prompt file."

    The mental model is four layers, and the README states it cleanly: Catalog → Item → Relation → Slot. The Catalog is the storage, an Item is one named text with tags, a Relation is the mapping between an Item and an output, and the Slot is the actual output pin that gets auto-generated. You edit items in a Manager Dialog (search, tag filter, a nice wide text editor); you edit relations in the node body.

    How it works

    Each relation row has a toggle and an item picker. The toggle is the killer feature: flip it off and the slot outputs "" instead of the text. That's how you mute a prompt fragment without deleting anything - and because SAX Prompt Concat skips empty strings, an unset or disabled relation just disappears from the final prompt instead of injecting a blank line. Orphaned relations (items you deleted) also output empty string, and connections to downstream nodes survive even when you delete an item, so your graph doesn't fall apart mid-edit.

    The outputs are out_0 through out_31 (STRING), each wired to wherever that text is needed. Wire them into SAX Prompt Concat for prompt building, or into a SAX Prompt via converted inputs. The select_to_add_lora and select_to_add_wildcard combos are just UI sources for the editor's pickers.

    If you have pythongosssss's ComfyUI-Custom-Scripts installed, the text editor gets danbooru tag autocomplete - type and it suggests tags. Without it, manual input still works fine.

    When you'd use it

    • One shared negative across multiple samplers, edited in one place.
    • A set of style fragments you swap between runs by toggling relations.
    • Prompt variations keyed to scenes, switched from a Toggle Manager instead of retyping.

    Installing it

    It ships in the SAX_Bridge pack. ComfyUI Manager → "Install via Git URL" → https://github.com/so16tm/SAX_Bridge, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/so16tm/SAX_Bridge
    

    Restart, and it's under SAX/Bridge/Utility. The autocomplete is optional (ComfyUI-Custom-Scripts), and wildcard-style expansion of catalog text happens downstream in the SAX prompt nodes, which need comfyui-impact-pack - the catalog itself needs neither.

    Gotchas

    Two things to know before you lean on it. First, this node stores and routes text - it does not do wildcard expansion itself, so a __wildcard__ token in a catalog item only expands if whatever's downstream does the expanding. Second, because it's a JSON-backed node managed by its own UI, copying workflows between different ComfyUI versions occasionally reshuffles relations; when a relation shows up as <orphan>, you deleted the item or the reference broke - the slot stays, the output is empty, and the fix is re-picking the item.

    CategorySAX/Bridge/Utility

    Inputs (4)

    NameTypeDefaultDescription
    items_jsonoptSTRING{}—
    select_to_add_loraoptCOMBO1 options: Select the LoRA to add to the text
    select_to_add_wildcardoptCOMBO1 options: Select the Wildcard to add to the text
    merge_outputsoptBOOLEANfalse—

    Outputs (32)

    NameTypeDescription
    out_0STRING—
    out_1STRING—
    out_2STRING—
    out_3STRING—
    out_4STRING—
    out_5STRING—
    out_6STRING—
    out_7STRING—
    out_8STRING—
    out_9STRING—
    out_10STRING—
    out_11STRING—
    out_12STRING—
    out_13STRING—
    out_14STRING—
    out_15STRING—
    out_16STRING—
    out_17STRING—
    out_18STRING—
    out_19STRING—
    out_20STRING—
    out_21STRING—
    out_22STRING—
    out_23STRING—
    out_24STRING—
    out_25STRING—
    out_26STRING—
    out_27STRING—
    out_28STRING—
    out_29STRING—
    out_30STRING—
    out_31STRING—