SEGS Pick
Grab one segment out of the pile and do something custom
- segs
- seg
Impact Pack's SEGS is a batch of detected regions - faces, objects, whatever your detector found - all bundled into one wire. Most of the time you hand that batch to a Detailer (SEGS) node and it processes everything. But sometimes you want just one of those segments, on its own, to feed into standard ComfyUI nodes that don't know SEGS from a hole in the ground. XJSegsPick takes a SEGS stream and an index and returns a single SEG. It's the "index into the array" node, and it unlocks the whole family of Extract and Stitch nodes this pack builds around.
Under the hood it's refreshingly honest: it pulls the valid segment list (same filtering as SEGS Count - empty masks and degenerate bboxes are skipped), checks your index is in range, and hands back seg_list[index]. The index is zero-based and clamps nothing: out of range means a hard error with a message telling you the valid range, which is actually the right behavior for a workflow bug you'd rather catch loudly than let silently corrupt.
The interface:
segs- SEGS in.index- INT, zero-based, from0up to 10000.- Output:
seg- a single SEG.
Where it shines: the manual detailer pipeline. Pick a segment → run it through SEGS Extractor to get the image/mask/coordinates as normal types → process them in whatever nodes you want (a different sampler, an upscaler, an IPAdapter) → put it back with SEGS Stitcher. Impact Pack's Detailer is a great one-node black box, but the moment you want a different pipeline per region, Pick is how you stop working on the whole batch. Pair it with SEGS Count or a loop index and you can iterate a batch one segment at a time with full control over each pass.
Install is the shared pack routine:
cd ComfyUI/custom_nodes
git clone https://github.com/alexjx/ComfyUI-XJNodes
Restart ComfyUI and find it under XJNodes/segs, or use ComfyUI Manager and search "ComfyUI-XJNodes". No models to fetch, requirements.txt is empty - the only real requirement is that SEGS comes from Impact Pack, so it assumes you're running that ecosystem already.
Caveat with the personal-use territory: this pack has essentially no community footprint, so you're on your own for examples. The pattern itself - pick, extract, process, stitch - is standard SEGS work, and this node is the cleanest way to start that loop.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| segs | SEGS | — | |
| index | INT | 00–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| seg | SEG | — |