ComfyUI Node Runs on cloud

SEGS Concat

Merge two detection batches into one, with a silent gotcha

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
SEGS Concat
  • segs1
  • SEGS

Run a face detector and a hand detector over the same image and you get two separate SEGS collections. If you want a single Detailer pass to handle both faces and hands together, instead of running the whole detect-crop-refine loop twice, you need them merged into one SEGS first. That's this node's whole job: segs1 plus segs2, concatenated into one.

The one thing to know before you use it

The README states this plainly, and it's the single most important fact about the node: if segs1 and segs2 don't share the same source shape, segs2 is silently dropped. Not an error, not a warning in the console - the concat just quietly proceeds with only segs1's elements. If your source images are different resolutions, or one SEGS collection came from a resized copy of the image the other came from, you can end up with a "merged" SEGS that's actually missing half its detections, and nothing will tell you unless you check the count yourself.

Practical rule: only concat SEGS collections that came from the exact same source image (or images of identical dimensions). If you're combining detections from two different detector runs, make sure both ran against the same-sized input.

The inputs and output

  • segs1 (SEGS) - the first collection. The schema shows this as the only strictly-required input.
  • A second SEGS input (segs2) is how you actually merge two collections, per the README's own description of what the node does - connect it the same way you'd connect any second input on these combining-style Impact nodes.

Output is a single SEGS - segs1's elements, plus segs2's elements if (and only if) the shapes matched.

Where it fits

Right after two (or more) separate detector passes over the same image, before a single shared Detailer step. It's the "combine, then process once" move - cheaper than running the whole detect/crop/resample/paste loop separately for each detector, and it means a single SEGSPaste composites everything back at once instead of layering two separate paste operations.

Installing it

No separate install - comes with the pack. Via ComfyUI Manager: search ComfyUI Impact Pack, Install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
cd ComfyUI-Impact-Pack
pip install -r requirements.txt

(portable: python_embeded\python.exe -m pip install -r requirements.txt), restart. No models needed for this node itself - the shape mismatch behavior is baked into the pack's Python, not something you configure.

Common issues

Detections that seem to have vanished after a concat are the classic symptom of the source-shape mismatch above - check that before looking anywhere else. This corner of the pack (SEGS-level manipulation, as opposed to just running FaceDetailer end to end) is genuinely obscure territory; most people never build a workflow that needs to hand-merge two detector outputs, so don't expect to find much community troubleshooting if you hit something unusual here. Preview both SEGS inputs separately with SEGSPreview before and after the concat - it's the fastest way to confirm the merge actually kept what you expected it to.

CategoryImpactPack/Util

Inputs (1)

NameTypeDefaultDescription
segs1SEGS

Outputs (1)

NameTypeDescription
SEGSSEGS