_.identity
The node that hands your data right back
- obj
- args
- *
_.identity doesn't do anything, and that's the whole point. Feed it any object and it hands you back the exact same object. It's the "identity function" from functional programming - the default iteratee that Underscore.js reaches for when you don't pass it a function - repackaged as a ComfyUI node with a _. name.
You're probably not going to build a production pipeline around it. But it earns its place in the ovum/underscore family as the safest possible test object: wire it anywhere you want to see what a value is without transforming it, or use it as a chain-compatible hop while you're still sketching a graph.
How it works
Under the hood, every one of these _. nodes is auto-generated from underscore3, a Python port of Underscore.js bundled inside the pack. The method itself is about as minimal as code gets:
def identity(self, *args):
return self._wrap(self.obj)
It wraps your input object and returns it unchanged. The node's run unwraps that wrapper, so what comes out the * output is literally the same Python object that went in.
The fun part is chain compatibility. Its primary obj input also accepts a _.CHAIN produced by the pack's _.chain node. Feed _.identity a chain and it hands the chain back, so you can drop it in the middle of a _.chain → method → _.value pipeline as a no-op and keep chaining.
The inputs that matter
There are only two, both optional:
- obj - the primary input. Anything goes, since it's typed
*. This is also where you'd attach a_.CHAINto continue a chain. - args - leftover from the varargs plumbing of the generator. The tooltip says to use a JSON array (like
[1,2,3]) for multiple values. You can ignore it; identity doesn't consume it in any meaningful way.
Output is a single * - untyped, because the generator couldn't guess what type an "identity" produces. That's fine: whatever you put in, you get back out.
Installing
_.identity ships in comfy-ovum, sfinktah's personal grab-bag of ComfyUI utilities (MIT licensed). The easy path is ComfyUI Manager - search comfy-ovum and install, then restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
then restart ComfyUI. Note you're installing the whole pack, which drags in its requirements.txt - pymediainfo, tomli-w, requests, braceexpand, pillow, numpy, markdown-it-py, aiohttp. The one that bites on Linux is pymediainfo, which wants the system libmediainfo library. The underscore nodes themselves need nothing extra; they run on the underscore3 port bundled right in the repo.
Verdict
The README is blunt that the underscore nodes are a work in progress and "an absolute disaster to use in production." For _.identity specifically, that's overstating it - this one is too simple to break. Just know it's a passthrough. If you genuinely want a do-nothing hop with a defined type, a core reroute or the pack's dedicated passthrough nodes are usually more useful. Reach for _.identity when you want the concept of identity in a chain, not when you need plumbing.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. | |
| argsopt | * | args: JSON allowed for arrays/objects where applicable. For multiple values, provide a JSON array (e.g., [1,2,3]). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |