_.unique
The alias that is uniq, minus the fancy options
- obj
- *
_.unique is _.uniq's alias with the options stripped off. It produces a duplicate-free version of an array, keeping the first occurrence of each value and preserving order - same core behavior - but it only exposes the isSorted fast-path toggle, not the iteratee transformation that _.uniq offers. If you open both nodes side by side you'll see _.unique is the simpler one.
It's part of the auto-generated ovum/underscore family in comfy-ovum, the pack of personal utility nodes by sfinktah. Family reputation first: the README flatly warns these generated wrappers are "an absolute disaster to use in production" and not recommended for live workflows. For a plain dedupe that's overcautious, but you should know the disclaimer is real before you lean on it.
How it works
Every _. method node wraps underscore3, the Python port of Underscore.js that's vendored inside the repo. This one maps to the unique method, which is the port's alias for uniq: walk the list, keep the first occurrence, drop the rest. The isSorted toggle switches to a faster neighbor-comparison algorithm - only meaningful if your list is already sorted; leave it off otherwise.
And yes, the chain mode applies: feed it a _.CHAIN and it continues the chain instead of returning a value. Unwrap at the end with _.value.
Inputs and output
obj- the array to dedupe (type*, optional; also accepts a_.CHAIN).isSorted- BOOLEAN widget, defaultfalse.- Output:
*(a generic type, so downstream won't know it's a list until runtime).
That's the whole surface. If you wanted to dedupe by a key (e.g., unique by filename-extension or by a dict field), this node can't do it - that's the iteratee feature, which lives on _.uniq. Use that one instead.
Install
Manager: search comfy-ovum, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Restart. No model downloads; underscore3 ships inside the repo.
Which one should you pick?
Honestly, pick _.uniq. It's the same node with strictly more options, so there's no real reason to reach for the alias unless you want to be explicit that you're not using an iteratee. _.unique's one advantage is a slightly calmer UI. Neither is a node you build a workflow around - they're glue for cleaning up tag lists and batch paths on the way to a prompt.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. | |
| isSortedopt | BOOLEAN | false | isSorted (boolean) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |