Nodes/ComfyUI-ToriiGate-Reforged/ToriiGate Grounding Builder Reforged
ComfyUI Node

ToriiGate Grounding Builder Reforged

The caption node that does nothing — ToriiGate Grounding Builder Reforged

By CocyNoric·Created 10 days ago·Updated 9 days ago· 2
ToriiGate Grounding Builder Reforged
    • prompt
    caption_typeshort
    use_namestrue
    add_tagsfalse
    tags
    add_character_listfalse
    character_names
    character_count1
    add_character_tagsfalse
    add_character_descriptionsfalse
    char1_name
    char1_tags
    char1_description
    char2_name
    char2_tags
    char2_description
    char3_name
    char3_tags
    char3_description
    char4_name
    char4_tags
    char4_description
    char5_name
    char5_tags
    char5_description

    This node never touches a model. It's a string formatter, and that's exactly why you want it. ToriiGate Caption Reforged will happily caption an image all on its own, but with the Grounding Builder wired into its prompt input you get to steer what the model looks for - tags, character names, per-character details - instead of getting a generic "describe this picture" every time.

    It works by assembling the caption instruction in ToriiGate's own prompt format. The model is a fine-tuned Qwen3.5-4B whose captioning quality depends heavily on the structure of the instruction it receives, so this node is the structured front-end to the pack's unstructured back-end. Set your switches, type your tags, and it emits one prompt STRING that plugs straight into the Caption node's optional prompt pin.

    The inputs that actually matter

    • caption_type - the format and detail level, ten modes total. The README's own recommendation: long for general use (2–5 paragraphs of natural text). short is fastest. long_thoughts_v2 is the max-detail mode: character identification, key details, a long description, then per-character breakdowns. There are also structured modes - json, min_structured_md, min_structured_json - and comic-specific ones (json_comic, md_comic) if you caption pages.
    • add_tags + tags - comma-separated booru tags. These match how the anime-tag lineage is trained, so if you know the image's tags, this is where they go.
    • add_character_list + character_names + character_count - a general list of who's in the frame, up to five. Per-character fields inherit from this list by position if you leave their names empty.
    • add_character_tags and add_character_descriptions - reveal the char1_name through char5_name, charN_tags, and charN_description fields. The toggles exist so you only see what you're actually filling in; the fields are all there in the node regardless.

    Two honest warnings. First, use_names (on by default) tells the model it may try to recognize character names - and the README is upfront that identification accuracy "may not always be ideal," with both quantized and original weights. That's the same multi-subject attribution weakness every VLM captioner has; don't expect it to reliably know who a character is, even with the name handed to it. Second, these toggles only matter when a mode actually uses them. add_tags gates the tags field, add_character_list gates the character list - flip a mode and ignore a section and the instruction simply won't contain it.

    Where it slots in

    Build the grounding, then caption:

    Load CLIP ──────────────> ToriiGate Caption Reforged.clip
    Load Image ─────────────> ToriiGate Caption Reforged.image
    Grounding Builder.prompt ─> ToriiGate Caption Reforged.prompt
    ToriiGate Caption.caption ─> Preview Any.source
    

    For a training set, this is the tag-versus-natural-language decision played out in one node: short/long for natural-language captioning on an LLM-encoded base, the structured modes when you want machine-parseable output. It's the piece that turns a generic VLM captioner into something you can point at a dataset and trust to follow the same recipe every time.

    Install

    It ships in the ComfyUI-ToriiGate-Reforged pack, so it installs with the pack: clone https://github.com/CocyNoric/ComfyUI-ToriiGate-Reforged into ComfyUI/custom_nodes/ and restart, or grab it via ComfyUI Manager. No dependencies of its own, and no model - the model belongs to the Caption node you connect it to. The one failure mode worth naming: this node alone produces text that does nothing. If your workflow is just a Grounding Builder floating in space, nothing broke - you're just missing the other half of the pack.

    CategoryToriiGate/Grounding

    Inputs (24)

    NameTypeDefaultDescription
    caption_typeCOMBOshortCaption format. short is fastest; long is detailed natural text; json/min_structured produce structured output; long_thoughts_v2 is the most detailed.
    use_namesBOOLEANtrueAllows the model to use or try to recognize character names.
    add_tagsBOOLEANfalseShow and use general tags.
    tagsSTRINGGeneral booru tags for the image, separated by commas. These are only added when add_tags is enabled.
    add_character_listBOOLEANfalseShow and use character list.
    character_namesSTRINGGeneral character list, separated by commas. Empty per-character names use this list by position.
    character_countINT10–5Number of characters to configure.
    add_character_tagsBOOLEANfalseShow and use character tags.
    add_character_descriptionsBOOLEANfalseShow and use character descriptions.
    char1_nameSTRINGName/tag for character 1.
    char1_tagsSTRINGBooru tags for character 1, separated by commas.
    char1_descriptionSTRINGFree-form description for character 1.
    char2_nameSTRINGName/tag for character 2.
    char2_tagsSTRINGBooru tags for character 2, separated by commas.
    char2_descriptionSTRINGFree-form description for character 2.
    char3_nameSTRINGName/tag for character 3.
    char3_tagsSTRINGBooru tags for character 3, separated by commas.
    char3_descriptionSTRINGFree-form description for character 3.
    char4_nameSTRINGName/tag for character 4.
    char4_tagsSTRINGBooru tags for character 4, separated by commas.
    char4_descriptionSTRINGFree-form description for character 4.
    char5_nameSTRINGName/tag for character 5.
    char5_tagsSTRINGBooru tags for character 5, separated by commas.
    char5_descriptionSTRINGFree-form description for character 5.

    Outputs (1)

    NameTypeDescription
    promptSTRING