Image Inset Crop (rgthree)
Image Inset Crop (rgthree)
- image
- IMAGE
Image Inset Crop trims an image inward from its edges. You tell it how much to shave off the left, right, top, and bottom - in pixels or as a percentage - and it hands back what's left in the middle. It's the "cut off the borders" node: simple, predictable, and defined by how much to remove rather than by corner coordinates, which is a nicer way to think about it when you just want to shed some margin.
Why you'd reach for it
Plenty of images arrive with stuff you don't want at the edges: a letterboxed video frame, a watermark strip along the bottom, some empty margin around a subject, a border from a previous process. The usual crop node makes you think in terms of an x/y origin and a width/height box, which is fiddly when all you actually want is "take 10% off each side." Image Inset Crop flips it: you specify the inset on each edge and it does the arithmetic. Want a symmetric trim? Set all four the same. Just the bottom? Set bottom, leave the rest at zero.
It's a small utility node, the kind rgthree stuffs the pack with - no generation, just a clean, obvious tool for a common chore.
Inputs and outputs
The inputs are straightforward:
- image - the image to crop.
- measurement -
PixelsorPercentage. This decides how the four edge values are read: as literal pixel amounts, or as a percent of the corresponding dimension. - left, right, top, bottom - how much to remove from each edge. Each defaults to
0(no trim) and steps in increments of 8, which is a friendly nudge toward dimensions that stay clean for later generation and upscaling stages.
The output is a single IMAGE - the cropped result. Wire it onward like any image.
Installing it
Image Inset Crop is part of rgthree-comfy. Install through ComfyUI Manager (search rgthree's ComfyUI Nodes) or clone the repo:
cd ComfyUI/custom_nodes
git clone https://github.com/rgthree/rgthree-comfy.git
Restart ComfyUI afterward. No models, no heavy dependencies - the pack is graph and UI code, so install is just the clone and a restart.
Common issues
The main thing to keep straight is the measurement toggle. A value of 100 means 100 pixels in Pixels mode but 100 percent - the entire edge, which would crop the image out of existence - in Percentage mode. If your output comes back blank or tiny, that mismatch is the first thing to check.
Second, remember these are insets, not a box. The numbers are how much you remove from each side, not the size or position of the region you keep. Setting left = 200 doesn't mean "start at x=200 and keep 200 wide" - it means "shave 200px off the left." Once that clicks, the node is very predictable.
Third, if you actually want to resize to a target rather than crop margins, that's a different job - reach for rgthree's Image Resize, which has proper fit modes. Inset Crop only removes edges; it never scales.
And the pack-wide caveat: if the node renders oddly, check whether ComfyUI's Nodes 2.0 frontend is enabled. The Vue rewrite broke several rgthree nodes, and the standing community fix is to keep it off.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| measurement | COMBO | 2 options: Pixels, Percentage | |
| left | INT | 00–16384 | — |
| right | INT | 00–16384 | — |
| top | INT | 00–16384 | — |
| bottom | INT | 00–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |