Convert BBox Relative → Absolute Pixel
From Ideogram's 0-1000 boxes to real pixels
- converted_text
Some annotation formats don't give you coordinates in pixels. Ideogram's box convention - the one this pack's tagger uses - expresses every bbox on a normalized 0–1000 scale, and it's y-first. That's great for a model that needs a stable coordinate space regardless of image size, and useless the moment you want to draw the boxes on an actual image. CCC_BBoxAbsoluteConverter does the rescale: normalized 0-1000 values → absolute pixel coordinates, for the image size you tell it.
It keeps the axis order of your input (choose [y, x, y, x] or [x, y, x, y]), so you pick the convention, not it. Unlike the axis-swap converter, this one needs to know the image dimensions - hence the inputs.
How it works
The math is the whole node: pixel = round(value / 1000 * dimension), applied to each coordinate with the appropriate axis, then clamped so nothing lands outside the image. If your boxes were [y_min, x_min, y_max, x_max] @ 0-1000, you set image_height and image_width to your image's real pixel size and get back absolute pixel corners in the same y-first order.
The inputs that matter:
text_input- your caption/tag text containing the bracketed boxes.image_width/image_height- the actual dimensions of the images these boxes describe. The defaults are 1024×1024, which is right only if your images are exactly that.input_format- whether the numbers in your text are[y, x, y, x]or[x, y, x, y]. Get this wrong and your boxes come out transposed: a tall box becomes a wide one.
Output is a single converted_text string with every box in the text rescaled.
Where it fits
This is the bridge between the tagging side of the Consistent Character Creator and anything that needs pixel boxes - a review preview, a cropping/detailing stage, or exporting annotations for a trainer that wants real coordinates. Typical flow: CCC_BBoxConverter sorts out axis order if needed, this node converts to pixels once you know the image size, and then you can actually draw or crop.
The one thing it won't do is tell you the image size - that's on you. If your dataset is mixed resolutions, this node (which takes a single width/height) isn't per-image smart; either your images are uniform or you handle sizing upstream.
Installing it
Part of Mickmumpitz-Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git
or Manager → search "Mickmumpitz" → install → restart. Light deps only (numpy, Pillow, opencv-python), no downloads.
Troubleshooting
- Boxes off by a constant factor - you're feeding 0-1 normalized values into a 0-1000 converter (or vice versa). This node assumes 0-1000; if your input is already 0-1, rescale it first.
- Boxes transposed - wrong
input_format. Swap it and re-check. - Boxes outside the frame - the clamp hides this silently. If a box lands exactly at the image edge and you expected a margin, your width/height don't match the actual images. Verify one image's real dimensions.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text_input | STRING | — | |
| image_width | INT | 102464–8192 | — |
| image_height | INT | 102464–8192 | — |
| input_format | COMBO | [y, x, y, x] | 2 options: [y, x, y, x], [x, y, x, y] |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| converted_text | STRING | — |