Nodes/comfy-ovum/Unique Batch Ovum
ComfyUI Node

Unique Batch Ovum

Dedupe a batch, order preserved

By sfinktah·Created about a year ago·Updated 10 months ago· 7
Unique Batch Ovum
  • py_list
  • *

Somewhere between a Python list and Comfy's internal batch representation sits this node. Unique Batch Ovum removes duplicate values from a batch while preserving the order of first appearance - and unlike a plain set(), it doesn't scramble your sequence, which matters when the order of your items is carrying information.

It's one of three near-identical dedupe nodes in sfinktah's comfy-ovum pack, and the naming tells you which slot each fills: UniqueBatchOvum (this one, category ovum/lists/comfy) is the "batch" flavor, UniqueListOvum (category ovum/lists/python) is the plain Python-list flavor, and UniqueList is the older, now-deprecated batch variant. They share the same dedupe engine, so the real question is which one matches the list-shape your upstream node hands you.

How it works

The node takes one input, py_list, and runs an order-preserving dedupe: it walks the list, adds each item to a "seen" set the first time it appears, and keeps it; later duplicates are dropped. The interesting bit is what happens when an item isn't hashable - a dict or list element, say. Hashing fails, so the node falls back to an equality scan against the result list it's already built. That's the safety net that lets it dedupe lists of arbitrary Python objects, not just strings and ints.

The Comfy-side distinction is INPUT_IS_LIST/OUTPUT_IS_LIST being set, meaning Comfy treats the socket as a batch input/output - this is the node you reach for when you're wired into batch-style data flows and the graph engine is passing you a list-of-values on a single connection.

Input and output

  • py_list - required, type *. The list to dedupe. There's nothing else to configure.
  • Output: *, marked as a list.

Install

ComfyUI Manager: search comfy-ovum, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

Restart. No model downloads; the pack's requirements are the standard utility stack (requests, pillow, numpy, aiohttp…), nothing special for this node.

Which dedupe should you use?

Honestly, the differences are mostly about socket semantics, not results. If your upstream hands you a "batch" (Comfy's list-input convention), this node is the match. If you're holding a plain Python list, UniqueListOvum is the tidier fit. And if you find UniqueList in an old workflow, know that it's marked deprecated in the source - swap it for one of these two and move on. Any of the three will get you a duplicate-free, order-preserving list; pick by what your graph's sockets expect.

Categoryovum/lists/comfy

Inputs (1)

NameTypeDefaultDescription
py_list*

Outputs (1)

NameTypeDescription
**