Assemble (SEGS)
Rebuild a SEGS object from a header and a decomposed element
- seg_header
- seg_elt
- SEGS
This is the reassembly half of Impact Pack's "SEGS_ELT Manipulation" pair. DecomposeSEGS takes a SEGS apart into a SEGS_HEADER plus its individual SEG_ELT pieces so you can inspect or edit them directly; Assemble (SEGS) puts one back together, joining a header and an element back into a proper SEGS object your other nodes can consume.
The README flags this whole family as experimental, and the intended workflow is: decompose a SEGS, read out or edit specific fields on the individual SEG_ELT (with From SEG_ELT or Edit SEG_ELT), then assemble the result back into a SEGS so it flows normally into a detailer, a filter, or a paste node again. This node is that last step.
How it works
seg_header carries the SEGS-level metadata (things like the overall source shape that every SEG within a SEGS shares) that isn't part of any individual detection. seg_elt is one detection - a bounding box, mask, confidence, and label bundle, potentially one you just edited with Edit SEG_ELT. The node combines the two back into a standard SEGS.
Worth noting from the schema: it takes exactly one seg_elt, not a list of them. If you decomposed a SEGS with multiple detections and edited several, you'd need to assemble each element back individually (or use SEGSConcat afterward to merge multiple single-element SEGS back into one multi-element SEGS) - this node's job is joining one header to one element, not batch-reassembling a whole set in a single call.
The inputs and output
seg_header(SEGS_HEADER, required) - the header carried alongside the original SEGS, typically obtained fromDecomposeSEGSon the source SEGS you're rebuilding.seg_elt(SEG_ELT, required) - the single detection element to wrap into the output SEGS.
Output is a single SEGS - containing that one element, paired with the given header, ready for anything downstream that expects a normal SEGS (a detailer, SEGSPaste, a filter node).
How to install it
Via ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack
cd comfyui-impact-pack
python -m pip install -r requirements.txt # ComfyUI's python; python_embeded on portable
then restart. No models - pure data-structure plumbing.
Common issues & troubleshooting
Type error connecting seg_header. Make sure it's actually coming from DecomposeSEGS (or another node that emits SEGS_HEADER) - it's a distinct type from SEGS itself and from SEG_ELT, and the three don't interchange.
Only one detection survived after decompose-edit-assemble. Expected, given the one-element-in-one-out shape of this node - if your original SEGS had several detections, you edited more than one, and you only ran them through a single Assemble call, you've only rebuilt one of them. Assemble each edited element separately and recombine with SEGSConcat if you need the full set back together.
Not sure you need this level of manual control. This whole decompose/edit/assemble path is the README's own "experimental" corner, meant for cases where you need to hand-edit something about a specific detection that no purpose-built filter node already covers (a specific bbox coordinate, a specific label). For routine filtering - by label, by size, by confidence - the pack's dedicated SEGS Filter nodes are simpler and don't require this manual round-trip.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seg_header | SEGS_HEADER | — | |
| seg_elt | SEG_ELT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SEGS | SEGS | — |