ComfyUI Node Runs on cloud

EmptySegs

A SEGS with nothing in it, for when a graph needs one anyway

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

    Exactly what it sounds like. Per the README, "EmptySEGS - Provides an empty SEGS." No inputs, no settings - it just outputs a valid SEGS object with zero detections in it. On its own that's not very interesting, but it's the standard way to hand a SEGS-typed socket a legitimate "nothing" value when your graph needs one to stay valid.

    Where it actually earns its keep

    SEGS sockets in Impact Pack expect a real SEGS object, not a disconnected wire. If you're building a conditional workflow - a Switch (SEGS) that picks between "detected something" and "detected nothing," or a branch that should skip detailing entirely when a detector comes up empty - you need an actual empty SEGS to route into the "nothing" side of that branch, not just an unplugged input. EmptySegs is that value. It pairs naturally with the pack's logic nodes: ImpactIsNotEmptySEGS (checks whether a SEGS has anything in it) and ImpactConditionalBranch for acting on that check, or Count Elts in SEGS if you want the actual count rather than a boolean.

    It's also a reasonable default/placeholder while you're still building a workflow - wire it in temporarily wherever a real detector isn't hooked up yet, so the rest of the graph stays runnable while you finish wiring.

    The input and output

    No inputs at all. The single output is SEGS - an empty one, ready to feed any node that expects the type.

    How to install it

    Ships with the Impact Pack. 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
    pip install -r requirements.txt
    

    then restart. No models - the node has nothing to load.

    Common issues & troubleshooting

    A detailer downstream does nothing when fed this. That's correct behavior, not a bug - a detailer given an empty SEGS has no regions to refine, so it passes the image through unchanged (or produces empty crop lists on the debug variants). If you expected detections and got this instead, the problem is upstream at whatever's supposed to be producing a populated SEGS, not here.

    Trying to merge this with a real SEGS expecting it to add something. It won't - an empty SEGS combined or concatenated with anything just yields the other SEGS unchanged, since there's nothing in it to contribute. If you're using SEGSConcat or a similar merge node, feeding this in is a no-op on that side.

    You actually wanted to filter down to nothing conditionally, not hardcode an empty value. If the "no detections" case should come from real detector output rather than a fixed placeholder, you don't want this node at all - you want a SEGS Filter or the detector's natural empty-result case, with ImpactIsNotEmptySEGS checking it. EmptySegs is for when you need a guaranteed, deliberate "nothing" value, not a computed one.

    CategoryImpactPack/Util

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    SEGSSEGS