Draw Image Bounds
See what a bounds row actually points at — and get the region as a mask
- image
- image_bounds
- IMAGE
- MASK
An IMAGE_BOUNDS value is just numbers - rows of first and last pixel column and row describing rectangles in an image. Perfectly precise, completely invisible. If you've ever wired a bounds row into something and had zero idea whether it was pointing at the sky or the car, this node is the missing pair of eyes: it draws the rectangles on the image so you can see exactly what the bounds describe, with an optional fill, label, and a mask version of the same regions on the second output.
Its natural home is detection and region workflows. You measure a region with Image Bounds or Mask to Bounds, you maybe inset it, and now you want to check what you've got before you crop or mask through it. Draw Image Bounds turns that check into something you can actually look at, and because it also returns the drawn regions as a mask, it doubles as a cheap bounds-to-mask converter when you set it to fill.
How it works
The two required inputs are the images to draw on and the image_bounds describing the regions. Batch semantics matter here: a single image gets every row of the bounds drawn on it - which is how you see a whole set of detected regions at once - while a batch of images gets one row each, in order.
Then the styling knobs:
color- outline colour as#RRGGBB,#RRGGBBAAor a name. Green shows up on most photographs; magenta is the better pick over foliage, where green outlines vanish.thickness- outline width in pixels.0draws no outline at all, which matters for the mask trick below.fill_opacity- how solidly the inside is filled in the same colour.0.0leaves regions open, which is what an inspection overlay wants; around0.25tints the region while keeping the picture readable underneath.label- a caption drawn in each rectangle's top-left corner.{index},{width}and{height}expand per region, soregion {index}: {width}x{height}labels a set of crops with what each will produce.label_size- label text height in points; read only when a label is set.opacity- fades outlines, fills and labels together, so nothing drifts out of step when you blend the overlay down.
What comes back
The first output is the IMAGE with bounds drawn over it. The second is a MASK of the rectangles - white wherever the overlay was drawn. That second output is the quietly useful one: with thickness at 0 and fill_opacity above 0, the mask becomes a solid region mask for the bounds, which turns "draw boxes so I can check my detection" into "also hand me a clean mask of everything I just checked."
Installing it and the one scaling trap
WAS Node Suite v3, nothing special: ComfyUI Manager → search WAS Node Suite v3, or clone into custom_nodes, restart. No models, no pip packages - the drawing runs on the pack's own canvas code.
The trap is thickness, which is in raw pixels: 3 is clearly visible at 1024 and essentially invisible at 4096. Scale it with your working resolution rather than leaving the default when you jump to hires work - or use the label/fill to make regions readable at any size.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The images to draw on. A single image gets every row of the bounds drawn on it, which is how a whole set of detected regions is seen at once; a batch gets one row each, in order. | |
| image_bounds | IMAGE_BOUNDS | The regions to draw, from Image Bounds, Inset Image Bounds, Mask Crop Region or any other node with a bounds output. | |
| color | STRING | #00FF00 | Colour of the outline, as #RRGGBB, #RRGGBBAA or a name. Green shows up on most photographs; magenta is the better choice over foliage. |
| thickness | INT | 30–256 | Width of the outline in pixels. Scale it with the image, 3 is clear at 1024 and invisible at 4096. 0 draws no outline, which leaves the fill as the only mark and turns the region into a solid block. |
| fill_opacity | FLOAT | 0.000–1 | How solidly the inside of each rectangle is filled, in the same colour. 0.0 leaves it open, which is what an inspection overlay wants; around 0.25 tints the region while leaving the picture readable underneath. |
| label | STRING | Caption drawn inside the top left corner of each rectangle. Empty draws none. {index} becomes the row number, {width} and {height} the size of that region in pixels, 'region {index}: {width}x{height}' labels a set of crops with what each one will produce. | |
| label_size | INT | 201–512 | Height of the label text in points. Read only when a label is set. |
| opacity | FLOAT | 1.000–1 | How much of the whole overlay shows. Applied to the outlines, fills and labels together, so nothing drifts out of step when it is faded. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | The images with the bounds drawn over them. |
| MASK | MASK | The rectangles as a mask, white wherever the overlay was drawn. With thickness 0 and fill_opacity above 0 this is a solid region mask for the bounds. |