_.isModule
The check that only fires if someone wires in an imported module
- obj
- *
_.isModule checks whether an object is a Python module - the thing you get when you import numpy and grab the numpy name. It's part of the sfinktah/comfy-ovum pack's ovum/underscore family, the auto-generated wrappers around underscore3 (a Python port of Underscore.js). The check is correct (type(self.obj) is ModuleType), the semantics are clean, and the honest summary is that you will essentially never have a Python module object sitting on a ComfyUI wire.
The family README's warning - work in progress, "not recommended for use in workflows" - is the standard caveat for this auto-generated zoo. _.isModule is one of the nodes that exists because the generator wrapped every method on the underscore3 class, not because someone needed it.
What it does
A module object is an instance of types.ModuleType - created by the import system for every imported file or package. The check type(self.obj) is ModuleType catches exactly that and nothing else:
import os; os→True.- A function, list, string, or class →
False. - A class definition →
False(classes aretype, notModuleType).
The one semi-plausible path to a module in a graph: some custom node packs expose "exports" nodes that hand you library internals - this very pack has an "underscore function" export node that outputs the _ factory, and a pack that exposes module-level functions could theoretically expose a module object. If you're plumbing introspection results around, _.isModule tells you what you're holding. It's a correct answer to a question nobody asks.
Like the rest of the family, it takes a plain value and returns the boolean, or takes a _.CHAIN from _.chain and keeps the chain going.
Inputs and outputs
obj- the only input, type*, optional.- Output - a single
*socket holding a Python bool (the family's generic-typed output quirk).
Where it fits
Debugging and nothing more. If some node hands you an object you can't identify, the _.isX family is a quick type-detection kit - _.isModule rules out "it's a module" so you can move on to the more likely candidates. For real workflow logic, skip it.
Installing it
Install the pack via ComfyUI Manager - search comfy-ovum - or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Restart ComfyUI. No extra dependencies; underscore3 is vendored in the repo.
Gotchas
- It matches only module objects - classes, functions, and packages-as-imported all read differently (a package imported by name is a module, though).
- No real workflow scenario puts a module on a wire. If you find yourself reaching for this, you're debugging something exotic.
- Output wire is
*, notBOOLEAN.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |