_.isUnicode
Same as _.isString — because in Python 3, everything is unicode.
- obj
- *
Here's a node that exists purely out of respect for history. _.isUnicode checks whether the input is a unicode string. In Python 3, the language this pack actually runs on, every string is a unicode string. So this node and _.isString are byte-for-byte the same test, and you'll never need both.
Why the duplicate exists
Underscore.js was written for JavaScript, where String and "unicode string" had a real, meaningful distinction back in the day. The Python port, underscore3, kept the method names faithful to the original - isString and isUnicode both exist in the source. And since sfinktah/comfy-ovum auto-generates a Comfy node for nearly every method on the port, you get both of them in the menu. It's a museum piece, and a harmless one.
How it works
The check is type(obj) is str. One optional input, obj (type *), accepts anything. One output, typed * (ANY) - a runtime bool, but the generator didn't stamp BOOLEAN on this method name, so a strict boolean socket may want a cast. Feed it a plain value, get true/false. Feed it a _.CHAIN from _.chain, get a chain back and resolve with _.value.
What to actually do with it
Pick one and ignore the other. If you're building a branch that asks "is this text?", _.isString reads clearer; _.isUnicode reads like you're nostalgic for Python 2. Either works identically. The one thing I wouldn't do is wire both into a workflow - you gain nothing and lose one node of clarity.
Installing comfy-ovum
ComfyUI Manager: search for comfy-ovum, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
pip install -r comfy-ovum/requirements.txt
Restart and you're done. No model downloads, no CUDA - pure-Python utilities with a few small dependencies. And the family-wide caveat: the README labels these underscore nodes a work in progress and "an absolute disaster to use in production," so treat them as handy helpers in graphs you control rather than the backbone of a shared workflow.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |