From SEG_ELT crop_region
Pull the crop coordinates out of one detected element
- crop_region
- left
- top
- right
- bottom
This is a plumbing node for people who've already decided to get their hands dirty inside Impact Pack's SEGS internals. If that's not you yet, the short version: SEGS is the pack's format for "here's a list of detected regions in this image," and a SEG_ELT is one single element out of that list - one detected face, one hand, whatever your detector found. DecomposeSEGS breaks a SEGS collection open into individual SEG_ELTs so you can inspect or edit them one at a time. This node is one of the readers: feed it a SEG_ELT's crop_region and it hands you back four plain integers.
What crop_region actually is
Here's the distinction that matters. Every SEG_ELT carries a bbox - the tight box around whatever was actually detected - and a separate crop_region, which is the (usually larger) area the pack actually cropped and processed. Detailer nodes pad the detection out by a crop factor before resampling, so you get context around the subject rather than a razor-tight crop that has no room to blend. bbox is what got found; crop_region is what got worked on. There's a sibling node, From SEG_ELT bbox, for the former - this one is for the latter.
The input and outputs
One input: crop_region, typed SEG_ELT_crop_region - meaning you don't wire in a whole SEG_ELT here, you wire in the crop_region field specifically (typically pulled off a SEG_ELT with an "Edit SEG_ELT" or similar node upstream, or via whatever node exposes that sub-field). Four outputs, all plain INT: left, top, right, bottom - the pixel coordinates of the crop rectangle in the source image.
That's the whole node. No options, no math, just unpacking a rectangle into numbers you can actually use - feed them into math nodes, use them to crop something else to match, or dump them to a console for debugging why a Detailer pass touched more of the image than you expected.
Why you'd want this
Mostly debugging and custom compositing. If a detail pass is bleeding into more of the image than you think it should, decomposing the SEGS and reading out crop_region tells you exactly what rectangle the pack actually operated on - often bigger than the detected box because of that padding factor, and now you can see it in numbers instead of guessing from a preview thumbnail. It's also useful if you're building a custom pipeline that needs to align something else (an overlay, a second crop, a manual composite) to the exact region Impact Pack used.
Installing it
Comes bundled with the whole pack - there's no separate install for one utility node. Easiest path: open ComfyUI Manager, search ComfyUI Impact Pack, click Install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt
(portable builds: python_embeded\python.exe -m pip install -r requirements.txt), then restart ComfyUI. This particular node needs no models and none of the pack's heavier dependencies - if the pack loads at all, this works.
Common issues
The type is the trap. crop_region is a specific sub-type, not the whole SEG_ELT and not a raw SEGS - plug a SEGS or SEG_ELT straight in and ComfyUI will refuse the connection. You need something upstream that decomposes the element and exposes its crop_region field specifically. If you're not sure how to get there, work backward from DecomposeSEGS and check what fields the node it hands you exposes.
The other thing worth knowing going in: this is genuinely deep-cut territory. Most people who install Impact Pack never open the SEGS_ELT manipulation nodes at all - they use FaceDetailer and move on. Reach for this one specifically when you're building or debugging a custom pipeline that needs to reason about exact pixel rectangles, not for a normal detailing workflow.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| crop_region | SEG_ELT_crop_region | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| left | INT | — |
| top | INT | — |
| right | INT | — |
| bottom | INT | — |