Nodes/Duanyll Nodepack/Parse BBox QwenVL
ComfyUI Node

Parse BBox QwenVL

Turn Qwen-VL's JSON bounding boxes into real, usable BBOX values

By Duanyll·Created about a year ago·Updated 4 months ago· 2
Parse BBox QwenVL
  • json_data
  • BBOX
formatqwen25_vl
width640
height480

Qwen2.5-VL and Qwen3-VL can see an image and answer "where is the thing" with actual coordinates - but they hand them back as JSON inside their text output, and the two versions use different coordinate systems. Parse BBox QwenVL takes that JSON and converts it into real BBOX values you can wire into crops, masks, and drawing nodes. If you're building any "ask the model where stuff is, then act on it" workflow, this is the bridge between the language model and the pixel math.

How it works

You feed it the JSON the vision model produced - a list of objects, each with a bbox_2d array of four numbers [xmin, ymin, xmax, ymax] and an optional label. The node wraps each one into the pack's BoundingBox type. The interesting part is the coordinate conversion:

  • qwen25_vl (default): Qwen2.5-VL returns pixel coordinates, so they're used as-is.
  • qwen3_vl: Qwen3-VL returns normalized coordinates on a 0–1000 scale. The node rescales them by your width and height - int(x / 1000 * width) - to turn them back into real pixels.

Get the format wrong and your boxes will be tiny slivers in the corner or off the image entirely. Since the model version is fixed per workflow, set it once and forget it - but if you switch models, remember to switch the format.

Inputs and outputs

  • json_data - the parsed JSON (a list of {bbox_2d, label} dicts). Wire this from the pack's JSON path or LLM-output parsing nodes after a vision call.
  • format - qwen25_vl or qwen3_vl.
  • width / height - the image dimensions, only used for the qwen3_vl rescaling. Defaults are 640×480; if your image is a different size, set these or the coordinates will be wrong.

Output: a list of BBOX values, one per detected region, ready for the pack's Draw BBox, BBox Crop, or Merge Bounding Boxes.

The workflow it belongs to

The typical graph: send your image to a vision model via the pack's LLM nodes, ask it for the objects' locations, parse the JSON (strict JSON will choke - use the tolerant parser), then feed the result here and let the boxes do real work. This is genuinely the missing link for "grounded" workflows - getting from "the model knows where it is" to "we have actual pixels to crop."

Installing it

It's in Duanyll Nodepack. ComfyUI Manager → search "Duanyll Nodepack" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack

No extra dependencies beyond the pack's own. Find it under duanyll/bbox.

Honest caveat: it expects the exact bbox_2d/label schema, so if your model wraps coordinates in different keys, you'll get no boxes out. Prompt the model to return that shape and you're set.

Categoryduanyll/bbox

Inputs (4)

NameTypeDefaultDescription
json_data*
formatCOMBOqwen25_vl2 options: qwen25_vl, qwen3_vl
widthoptINT640
heightoptINT480

Outputs (1)

NameTypeDescription
BBOXBBOX