_.mapDeep
Recursive map over nested data — in theory. The schema forgot the function.
- obj
- *
_.mapDeep sounds great on paper: apply a transformation to every leaf of a nested structure - a list of dicts containing lists of dicts - recursively. That's a genuinely useful operation for working with the deep JSON blobs that Comfy workflows love to produce. Here's the thing: right now you can't actually use it, because the node's schema forgot to expose the function.
What it is
Part of the ovum/underscore family in sfinktah/comfy-ovum, wrapping the mapDeep method of underscore3, a Python port of Underscore.js. The underlying implementation is real: it walks the nested tree and calls func(item, key, parent) at every node, optionally renaming keys as it goes. The port can do this. The node, as generated, can't reach it.
The catch
Look at the node's inputs: there's exactly one - obj (type *), the primary object. No iteratee socket, no function widget, no JSON selector. The code generator that builds all the underscore nodes has a whitelist of "iteratee-style methods" - map, filter, max, and friends - that get a proper iteratee input. mapDeep isn't on that whitelist, so its func parameter gets filtered out during node generation. The output is typed * (ANY), and chain mode works - feed it a _.CHAIN and you'll get a chain back. But there's no UI path to actually supply the transformation, which means the node is, in practice, a stub.
This is the README's "work in progress" warning made flesh. The method exists in the library; the node exists in the menu; the wiring that would make them talk to each other doesn't.
What to do about it
Don't plan a workflow around _.mapDeep yet. If you need recursive transforms over nested data, your sane options are the non-recursive _.map (flat lists), or doing the nesting manually with a few passes. Check back after a pack update - this is exactly the kind of gap that gets closed in a changelog, and when it does, this node becomes genuinely interesting.
Installing comfy-ovum
It's still worth having the pack installed. ComfyUI Manager: search for comfy-ovum, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
pip install -r comfy-ovum/requirements.txt
Restart and you're set. No model downloads, no CUDA - pure-Python utilities. Install it for _.map and _.keys; treat _.mapDeep as a "watch this space."
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |