Nodes/comfy-ovum/Unique List Ovum
ComfyUI Node

Unique List Ovum

The dependable Python-list dedupe

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

This is the one you probably want. Unique List Ovum takes a Python list, removes duplicate values while preserving the order of first appearance, and hands back a clean copy - no mutation of your source list, no reordering, no surprises. It's the plainest member of the pack's three-node dedupe trio, and the one that fits the common case: you've got a normal list from a text or list node, you want it deduped.

The trio, for the record: UniqueListOvum (this node, category ovum/lists/python) handles ordinary Python lists; UniqueBatchOvum (category ovum/lists/comfy) handles Comfy batch-style sockets; and UniqueList is the older batch variant the author has marked deprecated. Same underlying logic in all three - the differentiator is which list-shape your graph hands you.

How it works

The engine is simple and worth understanding because it explains why this node handles tricky data: it walks the list and keeps an item only the first time it's seen, using a set for speed. When an item isn't hashable - a dict, a list, a custom object - the set trick fails with a TypeError, and the code catches that and falls back to an equality scan against the result list already built. Net effect: you can dedupe lists of strings, numbers, and unhashable objects, all order-preserving. That's more robust than a naive set(list) approach, which would both crash on unhashables and destroy order.

Input and output

  • py_list - required, type *. The list to dedupe. No other configuration exists.
  • Output: * - the deduped list (typed generically, so downstream sockets won't know it's a list until runtime).

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, nothing special for this node.

Where it fits

Dedupe a tag list before it hits the prompt, clean a list of file paths that a batch generated twice, collapse repeated seeds. It's the kind of node that does one thing quietly and well - which, in a pack where the author himself calls part of the roster "an absolute disaster to use in production," is exactly the vibe you want. If your upstream is a batch socket rather than a plain list, grab UniqueBatchOvum instead; otherwise this is your pick.

Categoryovum/lists/python

Inputs (1)

NameTypeDefaultDescription
py_list*

Outputs (1)

NameTypeDescription
**