Inset Image Bounds
Pad or shrink a bounding box before you crop
Per WAS's own description, this "insets a image bounds" - it's the adjustment step in the pack's small bounds-based crop-and-paste-back family. Image Bounds measures a mask and gives you the tightest rectangle around it; Inset Image Bounds takes that rectangle and grows or shrinks it by a margin before anything actually gets cropped.
Why you'd want to adjust the box at all
A bounding box computed straight from a mask sits exactly flush against the masked region's edges - no breathing room at all. That's a problem for the step that usually comes after: Bounded Image Blend pastes a processed crop back into the original image, and a blend that has to happen right at a hard, flush edge is much more likely to leave a visible seam than one with a little margin to feather into. Pad the box first with this node, crop with that extra margin, and the blend step has actual room to work with. The reverse is useful too - if a mask is looser than you want and you're getting more image in your crop than necessary, shrinking the box tightens it back down.
How it works
It takes bounds data in - the rectangle from Image Bounds - and an inset amount, and returns adjusted bounds data: the same rectangle, expanded or contracted by that amount. No pixels move at this stage; it's still pure geometry, the same as the node upstream of it.
The inputs and outputs that matter
Bounds data in (from Image Bounds), an inset amount, and adjusted bounds data out - which then feeds into Bounded Image Crop, Bounded Image Crop with Mask, or straight into Image Bounds to Console if you want to check the numbers before committing to a crop. I can't confirm the exact sign convention (whether a positive value grows or shrinks the box) from a schema, so check the effect visually the first time you use it rather than assuming a direction.
How to install it
Bundled with the full WAS Node Suite:
- ComfyUI Manager - search "WAS Node Suite", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui, installrequirements.txt(portable:python_embeded\python.exe -s -m pip install -r requirements.txt), restart.
Pure geometry, no model download.
Common issues & troubleshooting
Blend seams still visible after cropping. If you're chaining this into Bounded Image Blend and still seeing a hard edge, the fix is usually more inset margin, not a different blend node - give the paste-back step more original image around the edges to feather into.
The box grew (or shrank) the opposite way you expected. Since the sign convention isn't something I can confirm from documentation, verify with Image Bounds to Console the first time you wire this in - print the bounds before and after the inset and confirm the direction matches what you assumed, rather than discovering it three nodes downstream when a crop comes out the wrong size.
Inset pushes the box outside the image entirely. Pad a box that's already near an edge and you can end up requesting a region partly outside the original image - worth sanity-checking your margin against how close the masked region sits to the image's edges.
Standard pack caveat: WAS Node Suite has been unmaintained since December 2023, and the recurring issue is the whole suite failing to import after a ComfyUI update. Reinstall requirements.txt against the right Python environment if that hits you.
Inputs (0)
No inputs
Outputs (0)
No outputs