Nodes/ComfyUI-LogicUtils/Pyobjects/Create Set
ComfyUI Node

Pyobjects/Create Set

Start an empty Python set inside your ComfyUI graph

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Pyobjects/Create Set
    • SET

    This one does almost nothing by itself, and that's the point. Set Create (SetCreateNode, filed under Pyobjects in the node menu) spits out an empty SET - Python's actual set() object, not a ComfyUI list dressed up to look like one. It's the starting brick for the rest of the LogicUtils set-operations family: Add, Remove, Union, Intersection, Difference, Symmetric Difference, Clear, and Set to List. None of those do anything useful without a SET to work on, and this is where every one of those chains begins.

    ComfyUI-LogicUtils is a grab-bag utility pack from aria1th (GitHub handle for AngelBottomless, the trainer behind Illustrious XL) - a side project, not the main event. It's genuinely obscure: barely any chatter about it on Reddit, no flashy demo videos, just a README that admits "proper documentation is being prepared, however there are too many nodes." What it actually contains is a real, if under-documented, standard-library toolkit ported into graph form: math ops, string/list randomizers, and - this cluster - full set algebra.

    Why a "set" type matters in a graph tool

    ComfyUI's native types are the ones you already know: STRING, INT, LIST, IMAGE. There's no first-class set type, which means anything set-shaped - deduping a batch of tags, finding what's common between two token lists, tracking "already seen" items across a loop - normally gets hand-rolled with string splitting and list comprehensions bolted onto Python-expression nodes. LogicUtils just gives set operations their own node type instead. The tradeoff is that SET only talks to other LogicUtils set nodes - you can't plug it into a node that expects LIST or STRING without going through Set to List first to convert it back to something the rest of ComfyUI understands.

    What it does

    No inputs, no widgets - you just drop it on the canvas. Behind the node it's calling Python's set() constructor with nothing in it. The output is a SET wired into whatever comes next: usually a chain of Set Add nodes to populate it, or straight into a Set Union/Set Intersection node as one of the two operands.

    Inputs and outputs

    • No required or optional inputs.
    • Output: SET - an empty set, ready to be fed into Set Add, Set Union, Set Intersection, Set Difference, Set Symmetric Difference, or Set to List.

    How to install it

    Search "ComfyUI-LogicUtils" in ComfyUI Manager and install - that's the path most people should take. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aria1th/ComfyUI-LogicUtils
    

    Restart ComfyUI afterward either way. There's no model to download; this is pure Python logic running on CPU, so it costs you nothing in VRAM or generation time.

    Common issues & troubleshooting

    "Missing node type: SetCreateNode" after loading someone else's workflow. Same story as any custom node pack - ComfyUI Manager's "Install Missing Custom Nodes" will find and install the whole pack for you from the graph JSON.

    A dependency-related import error on startup. The README notes the pack ships an opt-in auto-installer: set COMFYUI_LOGICUTILS_AUTO_INSTALL=1 as an environment variable before launching ComfyUI if a node in this pack needs something that didn't get pulled in automatically, or COMFYUI_LOGICUTILS_SKIP_INSTALL=1 to force it off if the auto-install itself is causing trouble. SetCreateNode specifically has no external dependencies - it's a bare set() call - so if you hit an import error it's almost certainly coming from one of the pack's other nodes (the WebUI API ones are the likely suspects) rather than this one.

    Nothing seems to happen when you run the graph. That's expected - an empty set with nothing downstream reading it is a no-op by design. Chain a Set Add or two after it, or feed it straight into Set to List to confirm you're getting a real (empty) list out.

    CategoryData

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    SETSET