create SET from INTs
Build a duplicate-free pool of integers without thinking about it
- SET
create SET from INTs collects a bunch of integer inputs into a single SET value - a Python set that only ever holds unique members. If you're counting or indexing things in a workflow, this is the fastest way to build a pool of integers with the duplicates silently removed.
Where it earns its keep: workflows where you're juggling step counts, seed ranges, frame numbers, or layer indices and you want to test membership without writing conditionals by hand. Feed the set into this pack's contains to check "is this frame in my keep-list?", length to see how many distinct values you actually have, or sum to total them. Because the set dedupes on the way in, you never have to worry that you counted the same index twice.
Sets are also the right call when you're combining pools from two sources - that's what union and intersection are for, and they only make sense on values that are unique.
How it works
The node takes dynamic integer inputs - item_0 in the schema, plus more that you add as item_1, item_2, … from the node's input menu. Every value is cast to int and added to the set, and the set collapses anything that's already there. That last part is the whole point: 3, 7, 3, 9 becomes {3, 7, 9}.
Two things to keep in mind, both straight out of Python's set semantics:
- Unordered. A set has no "first" or "last" element. If your downstream logic depends on order, this is the wrong tool - that's a LIST job.
- 1 and 1.0 collide. Python treats
1and1.0as the same element, so a stray float from upstream will merge with its integer twin instead of staying separate.
Inputs and output
item_0(INT) - the first integer; additem_1,item_2, … as needed. All optional.- SET (output) - one Python set of integers, ready for the other SET nodes in the pack.
Installing
It's part of Basic data handling by StableLlama. The easy way is ComfyUI Manager - search "Basic data handling", install, restart. Manual install is two commands:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
Then restart ComfyUI. The pack declares zero dependencies, so there's nothing to download beyond the code itself - no models, no heavy pip installs. You won't be the one fighting dependency hell this time.
Common issues
The classic mix-up is treating the SET like a data list. A ComfyUI data list processes each item individually through the nodes it feeds; a SET travels as one object. If a node downstream wants individual items, run the set through convert to Data List first. And if you catch yourself needing the integers back in order, skip the set entirely and use a LIST - the set already threw ordering away.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| item_0opt | INT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SET | SET | — |