_.curry
Build a specialized function from a general one
- obj
- *
_.curry is functional-programming plumbing that shows up in this pack as a generated wrapper, and its author description is looser than usual: "Create a function bound to a given object (assigning this, and arguments, optionally). Binding with arguments is also known as curry."
That description is really describing bind-style behavior more than the textbook curry - in classic Underscore, _.curry takes a function and returns a curried version you can call with one argument at a time until it has enough to execute. Either way, the throughline is the same: you take a general function and pre-specialize it. Currying is how you turn "a function that needs three arguments" into "a function where the first argument is already fixed," which is the pattern behind reusable iteratees and partial applications.
How it works
Generated wrapper around underscore3, the bundled Python port of Underscore.js. The node exposes only the primary obj input - the underlying curry(context) signature takes a context, but the generated wrapper doesn't surface any extra widgets or sockets for arity or arguments in this build. So the practical surface is: feed it something, get a specialized function back, and the interesting parameters are inside the port's defaults rather than visible on the node.
That's the honest catch with this one. Currying is a power tool when you have a target function to curry - but nothing in this node's inputs lets you specify the function, the argument count, or the fixed values. For most Comfy work, you'll get more mileage from _.partial-style behavior, and within this family the function-specialization ideas are better served by the PY_FUNC-export route where you can define the callable yourself.
Inputs and output
obj(any type) - the primary object/function input. Accepts a_.CHAINto continue a chain.- Output:
*(any type) - the curried/specialized function.
No widgets.
Installing it
Part of sfinktah/comfy-ovum ("comfy-ovum"):
- ComfyUI Manager: search "comfy-ovum", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/sfinktah/comfy-ovum, restart.
No model downloads; light dependencies; underscore3 bundled in the repo.
The honest take
_.curry is the least obviously useful node in this family for a beginner, because currying only pays off in a code-heavy graph that's already passing callables around. Its description also reads like the port's bind behavior, which should tell you how loose the wrappers can get - this is exactly the kind of thing the author's "work in progress, not recommended for production" README note is about. If you're exploring functional patterns in Comfy, fine. If you're trying to get a workflow done, reach for _.partial or the expression route instead and don't feel bad about ignoring this one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |