Nodes/comfy-ovum/_.isType
ComfyUI Node

_.isType

Is it the type itself, like the class? The obscure cousin of the is-family.

By sfinktah·Created about a year ago·Updated 10 months ago· 7
_.isType
  • obj
  • *

_.isType answers a surprisingly precise question: is the object on its input itself a type - a class - rather than an instance of one? It returns true for int, str, list (the classes, not the values). It returns false for 5, "hi", []. That's the whole job, and it's a much rarer need than the other is* nodes in this family.

What it is

One node in the ovum/underscore family inside sfinktah/comfy-ovum, wrapping the isType method of underscore3, a Python port of Underscore.js. The implementation is type(obj) is type - strict, no subclassing forgiveness. It's the kind of introspection a data-utilities library offers because it's free, and the pack's auto-generator happily turns it into a Comfy node whether you needed it or not.

How it works

One optional input, obj (type *), accepts anything. One output, typed * (ANY) - a runtime bool, though the generator didn't stamp BOOLEAN on this one, so a strict boolean socket may want a cast. Feed a plain value in, get true/false out. Feed a _.CHAIN from _.chain, get a chain back, and resolve the real value with _.value down the line.

When you'd actually reach for it

Normal generation workflows rarely hold a bare class on a wire. Where it earns its keep is the meta territory: the same pack has _.methods (list the callable names on an object) and _.iteratee (build callbacks), and if you're poking at what a *-typed socket is really carrying, _.isType tells you "this is the class itself, not an instance." Combined with _.methods, you can enumerate what's available on an object and then check whether a socket holds the type versus a value. It's a debugging and introspection aid, not a daily driver.

Installing comfy-ovum

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 with a handful of small dependencies. And the standing caveat for this family: the README calls it a work in progress and warns against production use, so treat _.isType as a curiosity with a use case, not a pillar of a serious pipeline.

Categoryovum/underscore

Inputs (1)

NameTypeDefaultDescription
objopt*Primary input object. Also accepts _.CHAIN to continue chaining.

Outputs (1)

NameTypeDescription
**