_.chain
The front door to the whole ovum/underscore suite
- obj
- chain
_.chain is the node you drop down first whenever you want to do real data wrangling with the ovum/underscore family. It takes a plain object - a list, a dict, a tuple - and wraps it in a _.CHAIN so every other _.chunk, _.filter, _.countBy style node can keep working on the same value, one method after another. In the vocabulary of the Underscore.js library this pack is porting to Comfy, chaining is exactly what the library was famous for: instead of filter(countBy(list)) nested inside out, you start a chain, call methods in order, and pull the final value out at the end.
You can't read the value straight out of this node. The output is a _.CHAIN, a wrapper type that only the other ovum/underscore nodes understand. You either keep feeding it into more _. method nodes, or hand it to _.value to unwrap the final result. That's the intended flow: wrap in, chain, unwrap.
How it works
Under the hood each ovum/underscore node is a generated wrapper around underscore3, a Python port of Underscore.js that ships bundled inside the pack. _.chain calls the port's .chain() on a deep copy of whatever you give it:
chain_out = _underscore_factory(copy.deepcopy(obj)).chain()
The deep copy matters more than it looks. Comfy caches node outputs between runs, and a chain pipeline mutates as you go - if the original list were shared, your "clean" input could come back mutated on the next run. Copying first keeps the input pristine. It also means the input object itself is untouched; if you chain and then change your mind, your source list is exactly as you left it.
The inputs that matter
There's exactly one: obj (any type), described by the author as "Object to wrap for chaining." Plug in a LIST, DICT, or really anything JSON-serializable. That's it - no widgets, no options, nothing to misconfigure.
The single output, chain (type _.CHAIN), is only valid as input to the other _. nodes or _.value. Wire it to a plain text or list socket and Comfy will refuse the connection - that's the type safety doing its job.
How to install it
This is part of sfinktah/comfy-ovum (pack title "comfy-ovum"), a grab-bag of personal quality-of-life nodes. Install once and the whole _. suite shows up:
- ComfyUI Manager: search for "comfy-ovum" and install, then restart.
- Manually:
cd ComfyUI/custom_nodes && git clone https://github.com/sfinktah/comfy-ovumand restart.
No model downloads, no CUDA setup. The requirements are light - pillow, numpy, requests and friends - and underscore3 is bundled in the repo, so there's nothing extra to fetch.
One honest caveat
The author's own README calls the underscore nodes "an absolute disaster to use in production" and marks them work-in-progress. They're genuinely handy for data plumbing, but this is the pack's experimental corner. If you're building a workflow you plan to depend on, use the plain list nodes (List Slice, List Concat, and the like also ship here) for the boring stuff and treat _.chain as the place where you experiment. That said, _.chain itself is about as stable as this family gets - wrap, mutate, unwrap, and your inputs never change under you.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| obj | * | Object to wrap for chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| chain | _.CHAIN | — |