_.same
The fastest way to ask 'is this list all one value?'
- obj
- *
_.same answers a yes/no question about a whole list: do all the elements hold the same value? [5, 5, 5] → true. [5, 5, 6] → false. [] → false, because the author chose to treat "no elements" as "not all the same," which is the technically correct reading of "all" and mildly annoying if you were hoping an empty list would be vacuously true. Now you know.
It's part of the comfy-ovum ovum/underscore family - auto-generated nodes wrapping underscore3, a Python port of Underscore.js bundled inside the pack. This particular method isn't even from classic Underscore.js; it's an addition in the Python port. And yes, before you ask: this whole family is flagged by the author as a work in progress, "not recommended for use in workflows." For a boolean utility this simple, the risk is low, but the label is honest - the wrapper generator has corners.
Why you'd bother
Honestly? This is a validation-and-debugging node. You'd use it when a list of values should all agree - say a batch of seeds, a list of resolution strings, or a set of settings read from multiple sources - and you want a boolean you can feed into a conditional (the pack's own IfElseOvum works nicely with it) to short-circuit or flag when something drifted. It also pairs with a "Show Text"/preview node if you just want a human-readable sanity check mid-run.
Inputs and output
- obj (
*) - the collection to check. It's typed*, so a list of anything comparable works; mixed types like[1, "1"]are not equal, which is usually what you want.
Output is a single * socket carrying a Python boolean. Technically the wrapper returns a bool, but it's not typed BOOLEAN, so treat downstream as tolerant - if a downstream node demands a strict BOOLEAN socket you may need a cast.
The usual family feature applies: pass a _.CHAIN in as obj and the node continues the chain, returning a chain rather than a bare boolean - unwrap with _.value.
Install
# via ComfyUI Manager: search "comfy-ovum"
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
# restart ComfyUI
Pure Python, no model downloads; dependencies (aiohttp, pillow, numpy, requests, etc.) install via Manager, underscore3 is bundled in-repo. If you need the same "are all values identical" check on something this family handles poorly - deeply nested objects, numpy arrays, tensors - do it upstream with a comparison node instead of expecting _.same to be clever about it. It's a simple equality loop, full stop.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |