Nodes/ComfyUI-TinyBee/Combine Florence2 Caption Data
ComfyUI Node

Combine Florence2 Caption Data

Merge several Florence2 detection payloads into one, then parse it once

By TinyBeeman·Created about a year ago·Updated 10 days ago· 1
Combine Florence2 Caption Data
  • data1
  • data2
  • data3
  • data4
  • data5
  • data6
  • data7
  • data8
  • data

One run of Florence2 grounding gives you one set of detections. Sometimes that's not enough - you've run the model on the same image with different prompts and want the union, or you've detected across multiple images and want all the boxes in one place before you start cropping. Combine Florence2 Caption Data is the merge node: it takes up to eight grounding payloads, concatenates every bounding box and label, and emits one combined payload that Florence2 Caption Data Parser can chew on in a single pass.

All eight inputs are optional data1 through data8, and the output is a single data JSON - so this is a "leave most of them unplugged" kind of node. Skip the empties and it just merges what's actually connected. The shape of the output matches what Florence2's grounding returns and what the parser expects: a payload holding parallel bboxes and labels lists.

Why the merge, and the one detail to know

The realistic scenario is running Florence2 with several different grounding phrases against the same image - "face," "hand," "the red dress" - then combining the results so one mask-building pass sees everything. Without the merge you'd have to parse each payload separately and union the masks yourself, which is extra nodes and extra failure surface. This collapses it to one wire.

One detail worth knowing because it affects downstream ordering: the merge sorts the combined boxes by label. The sort is stable, so entries with the same label keep their original order, but if you're relying on the order in which detections appeared, know that it's been alphabetized along the way. Usually that's a feature - grouped-by-label detections are easier to reason about - but if you're pairing boxes with other per-detection data by index, this changes the indexing.

Install and gotchas

Part of ComfyUI-TinyBee; one install for the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee

or ComfyUI Manager → "ComfyUI-TinyBee" → restart. No models, no dependencies beyond the pack's light requirements.txt. The only real failure mode is feeding it data that isn't in the Florence2 {bboxes, labels} shape - it reads those two keys and ignores everything else, so if your upstream node returns a different schema, you'll silently get empty results. Check what your Florence2 node actually outputs (most produce the [{"bboxes": [...], "labels": [...]}] form the parser accepts). You'll find it in 🐝TinyBee/Util next to the parser it feeds.

Category🐝TinyBee/Util

Inputs (8)

NameTypeDefaultDescription
data1optJSON
data2optJSON
data3optJSON
data4optJSON
data5optJSON
data6optJSON
data7optJSON
data8optJSON

Outputs (1)

NameTypeDescription
dataJSON