Image Extract Rect
Crop a fixed rectangle from a corner of an image
- image
- image
This node grabs a rectangle of a set size out of one corner of an image. You tell it how big - width x height - and which corner to anchor to, and it hands you back just that patch. That's it. On its own it's a plain corner crop, but its real job is the first half of an extract-process-recombine loop: pull a region out, do something expensive or fiddly to just that region, then paste it back with the pack's Image Combine Rect node. In the menu it's Image Extract Rect.
The pack's own example is watermarks - snip the corner where a logo or signature lives, clean it up, put it back - but the pattern works for anything you want to treat one region differently from the rest.
How it works
It takes a width x height box anchored at the corner you choose and returns the pixels inside it. top-left starts the box at the top-left of the image and extends right and down; bottom-right anchors it to the bottom-right and extends left and up; the other two corners do the obvious thing. Because the size is fixed rather than proportional, the same settings pull the same-sized patch regardless of the source image's dimensions - which is exactly what you want if the patch has to line up when you paste it back later.
The inputs and outputs that matter
image- the image to cut from.width/height- the size of the patch, in pixels.corner- which corner to anchor the box to: top-left, top-right, bottom-left, or bottom-right.
Output: a single image containing just the extracted rectangle.
Installing it
ComfyUI Manager: search ComfyUI_Nimbus-Pack, install, restart. Small pack - if it's not indexed, clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/sergekatzmann/ComfyUI_Nimbus-Pack.git
pip install -r ComfyUI_Nimbus-Pack/requirements.txt
Restart. Pure PIL/NumPy, no models. The requirements.txt exists for the pack's video node.
Common issues & troubleshooting
Keep Extract and Combine in sync. This node pairs with Image Combine Rect, and the two only line up cleanly if you don't change the patch's size in between. If you extract a 256x256 corner, upscale that patch to 512x512, then combine, it won't sit where it came from - Combine pastes at the source patch's own size. Either keep the dimensions matched, or resize the processed patch back before recombining.
Your box is bigger than the image. If width or height exceeds what's available from that corner, you can only get back what's actually there - pick a patch size that fits inside the source.
Wrong corner. The anchor is literal: top-left grabs the top-left region, not the top-left as the box's own corner somewhere else. If your patch is coming from the wrong place, you've picked the wrong corner value.
You wanted an arbitrary crop, not a corner one. This node only anchors to the four corners - there's no free x/y offset. If you need a region from the middle, this isn't the tool; reach for a general crop node with x/y coordinates.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width | INT | 1001–8192 | — |
| height | INT | 1001–8192 | — |
| corner | COMBO | 4 options: top-left, top-right, bottom-left, bottom-right |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |