Nodes/comfyui_gr85/CTGPhrases
ComfyUI Node

CTGPhrases

Turning a phrase list into Florence-2's grounding format

By veighnsche·Created 2 years ago·Updated 8 months ago· 1
CTGPhrases
    • STRING
    input_string

    If you've used Florence-2's "Caption to Phrase Grounding" task (that's what the "CTG" in this node's name refers to), you know it wants a specific list of phrases to locate in the image - "a red car", "a person", "a window" - not one blob of text. CTGPhrases is a small formatting helper for exactly that step: it lives in the same category as GR85_Florence2RunCTPG, and its job is to take a single input string and turn it into the list of phrases that node's phrase-grounding pass expects.

    The mechanism, as far as the interface tells you. One input, input_string - a plain string, presumably your comma- or period-separated phrase list typed out or built by an upstream node. One output, but notice its type: STRING with is_list: true. That's the whole point of this node existing - Florence-2's grounding task consumes a list of separate phrase strings, and this converts your single delimited string into that list shape so the next node in the chain (GR85_Florence2RunCTPG) can iterate over it correctly.

    Installing it. Search "comfyui_gr85" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/veighnsche/comfyui_gr85
    

    Restart ComfyUI. This node itself has no model or dependency requirement - it's string splitting. The Florence-2 model it's meant to feed does come with its own weight download, but that download is handled by whatever Florence-2 loader node you're pairing this with, not by comfyui_gr85 itself.

    Context worth knowing before you use it. Florence-2 is a genuinely popular vision-language model in the ComfyUI ecosystem - it shows up as a captioning tool for LoRA training datasets, and separately as a grounding/segmentation source bundled into background-removal packs like ComfyUI-RMBG. This node and its sibling GR85_CTGPhrasesSimple exist specifically to prep the grounding half of that workflow - turning a phrase list into something GR85_Florence2RunCTPG can run against an image.

    Where this is likely to trip you up. Because the exact split logic (comma vs. period vs. newline) isn't documented in the schema, the safest move the first time you use it is to wire the output into a GR85_ShowText and confirm the list came out the way you expected before you run a full grounding pass on a batch of images - a phrase list that split wrong (three phrases became one long one, or one phrase got split in half on an internal comma) will make Florence-2 hunt for the wrong things and give you bounding boxes that don't match what you intended.

    CategoryGR85/Florence2

    Inputs (1)

    NameTypeDefaultDescription
    input_stringSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING