ComfyUI Node Runs on cloud

Edit SEG_ELT

Hand-edit a single detection's mask, bbox, or label

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
Edit SEG_ELT
  • seg_elt
  • cropped_image_opt
  • cropped_mask_opt
  • crop_region_opt
  • bbox_opt
  • control_net_wrapper_opt
  • SEG_ELT
confidence_opt
label_opt

Once you've pulled a SEGS apart with DecomposeSEGS, you're holding individual SEG_ELT pieces - one per detection, each carrying its own cropped image, mask, bounding box, crop region, an optional ControlNet wrapper, a confidence score, and a label. Edit SEG_ELT is how you actually change one of those fields, replacing whichever piece you connect and leaving the rest of the element alone.

It's the same pattern as Impact Pack's basic-pipe editors (EditBasicPipe, EditDetailerPipe): every optional input you leave disconnected passes through from the original element untouched, and anything you do wire in overrides that specific field.

What you can override

  • cropped_image_opt (IMAGE) - replace the cropped image stored on this detection.
  • cropped_mask_opt (MASK) - replace its mask.
  • crop_region_opt (a SEG_ELT_crop_region-typed value - a specialized coordinate type, not a plain number) - replace where this detection's crop sits in the original frame.
  • bbox_opt (SEG_ELT_bbox-typed, same coordinate-type note) - replace the bounding box.
  • control_net_wrapper_opt - replace or attach a ControlNet wrapper associated with this element (the kind ControlNetApply (SEGS) sets up).
  • confidence_opt (FLOAT, range 0–1, step 0.1) - override the detection's confidence score. Useful if you're hand-boosting or hand-demoting a specific detection before it hits a confidence-based filter downstream.
  • label_opt (STRING) - override the label, e.g. relabeling a detection so a downstream SEGS Filter (label) catches or excludes it differently than the original detector assigned.

Note that crop_region_opt and bbox_opt use Impact Pack's own internal coordinate types rather than plain INT or a generic tuple - in practice you'd source these from another SEG_ELT-family node (like From SEG_ELT's crop_region/bbox outputs) rather than typing coordinates in by hand.

The input and output

  • seg_elt (SEG_ELT, required) - the detection element to edit. Get this from DecomposeSEGS on a SEGS.

Output is a single SEG_ELT - the same element with your overrides applied, ready to feed back into Assemble (SEGS) to rejoin it with a SEGS_HEADER and become a normal SEGS again.

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 editing.

Common issues & troubleshooting

Nothing changed on the output. You probably left every optional input disconnected - this node passes the original element straight through unless you actively wire in a replacement for a specific field. Connect at least one of the _opt inputs.

Type mismatch on crop_region_opt or bbox_opt. These aren't generic coordinate inputs - they're Impact Pack's own SEG_ELT_crop_region and SEG_ELT_bbox types. Source them from a matching output elsewhere in the SEG_ELT family (From SEG_ELT's corresponding outputs are the natural source) rather than trying to feed in a plain number or list.

Edited the label but a downstream filter still doesn't catch it. Double-check you fed the edited SEG_ELT back through Assemble (SEGS) before it reaches the filter - editing the element alone doesn't change anything until it's reassembled into a SEGS and passed downstream.

Do you need this at all? For routine changes - relabeling by rule, filtering by confidence threshold, resizing crop regions in bulk - the pack's purpose-built nodes (SEGS Filter (label), SEGS Filter (range), Dilate Mask (SEGS)) are simpler and don't require manually decomposing and reassembling. Reach for Edit SEG_ELT when you need to change one specific field on one specific detection and nothing built-in does exactly that.

CategoryImpactPack/Util

Inputs (8)

NameTypeDefaultDescription
seg_eltSEG_ELT
cropped_image_optoptIMAGE
cropped_mask_optoptMASK
crop_region_optoptSEG_ELT_crop_region
bbox_optoptSEG_ELT_bbox
control_net_wrapper_optoptSEG_ELT_control_net_wrapper
confidence_optoptFLOAT0–1
label_optoptSTRING

Outputs (1)

NameTypeDescription
SEG_ELTSEG_ELT