Image Bounds
The bounding box behind WAS's crop-and-paste-back pipeline
Image Bounds doesn't touch your pixels. What it does is math: given a mask, it works out the tightest rectangle that fully encloses the masked region - the smallest box that contains everything that isn't zero - and hands that rectangle back as bounds data. It's plumbing, not an effect, and it's the entry point of a small family of nodes this pack ships specifically for crop-process-paste-back workflows.
Why you'd reach for it
Say you've masked a face, an object, or any region you care about, and you want to process just that patch at full resolution instead of the whole image - upscale it, run a second sampling pass, apply a filter - then put the result back exactly where it came from. Before you can crop to that region you need to know where it actually is in pixel coordinates, and that's this node's whole job. It's the same underlying idea behind detect-crop-refine tools elsewhere in the ecosystem (Impact Pack's FaceDetailer automates the same pattern with a YOLO or SAM detector deciding the region); WAS's bounds family is the earlier, manual version - you supply the mask, this node measures it.
How it works
It scans the mask for the extent of the non-zero area and outputs the coordinates of a rectangle around it - nothing generative, just geometry. Feed it a tighter mask and you get a tighter box; feed it a loose or noisy mask and the box grows to match, since it has no concept of "close enough," only where the mask actually has content.
The inputs and outputs that matter
You feed it a mask - from wherever: hand-painted, a segmentation node, a threshold pass on something else in your graph. What comes out is bounds data, not an image. That's the detail to hold onto: this node produces coordinates the rest of the family consumes, not a picture. Downstream, that bounds data feeds Inset Image Bounds (pad or shrink the box before you cut), then Bounded Image Crop or Bounded Image Crop with Mask to actually cut the region out, and later Bounded Image Blend to stitch your processed result back in at the same spot.
How to install it
It ships inside the full WAS Node Suite pack:
- ComfyUI Manager - search "WAS Node Suite", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui, thenpip install -r requirements.txtfrom inside that folder (portable builds:python_embeded\python.exe -s -m pip install -r requirements.txt), then restart ComfyUI.
Pure geometry, no model download and nothing heavy pulled in for this node specifically.
Common issues & troubleshooting
If a downstream crop comes out empty, offset, or way bigger than you expected, the mask feeding this node is almost always the actual cause - check it's genuinely covering just the region you want before assuming the bounds math is wrong. A mask with stray pixels far from your subject will blow the box out to include them, since Image Bounds has no way to know those pixels aren't intentional.
Beyond that, the standing caveat for the whole pack applies: WAS Node Suite has been unmaintained since December 2023 (the README says "Retired" right in the title), and the recurring complaint since is the whole suite failing to import after a ComfyUI update - usually a pinned dependency the update quietly broke, not anything wrong with individual nodes like this one. If you see an "Import Failed" on the whole suite, reinstall requirements.txt against your actual ComfyUI Python before troubleshooting a single node in isolation.
Inputs (0)
No inputs
Outputs (0)
No outputs