Mpi Boolean
One boolean, three types — the adapter that unblocks stubborn wires
- boolean
- int
- float
ComfyUI is strict about types in a way that keeps tripping people up: a node that expects an INT socket will sometimes refuse a BOOLEAN wire, even though you can see the value you want is there. Mpi Boolean is the little adapter that fixes that. You feed it one boolean and it hands you three outputs - the boolean itself, plus the same value as an INT and as a FLOAT. true becomes 1 and 1.0; false becomes 0 and 0.0.
That's the entire job, and it's a genuinely useful one in the plumbing layer. ComfyUI's logic nodes are almost all boolean-native, but the rest of the ecosystem isn't. A switch might want an integer index, a math node wants a float, a progress node wants a number. Rather than hand-rolling conversion or fighting the type system, you stick Mpi Boolean between the logic and the numeric consumer. The boolean widget defaults to true, so you can also use it as a plain source node - a global "use hires fix or not" flag that fans out to one boolean consumer and one numeric consumer from a single switch.
The pack actually ships a whole family of these pass-through converters - MpiFloat, MpiInt, MpiString, MpiText, MpiSimpleBoolean - so this isn't a one-off. Mpi Boolean is the version that does the boolean-to-everything trick, and it's the one you reach for when the value starts life as a boolean. One thing to note: the inputs and outputs here are plain widget and plain wire - there's no forceInput magic forcing the boolean to be wire-driven, though you can convert the widget to an input as usual if you want it driven by another node.
Where does it actually matter? Two patterns. First, type mediation: your workflow has a boolean result (say, from Mpi Any Checker's has_value or MpiBooleanCompare) and it needs to drive something numeric. Convert, done. Second, fan-out: you want a single flag to control both a boolean gate and a numeric parameter - a "this is a detail pass" flag that both mutes a branch and scales a strength. One boolean in, three typed outs, no per-connection fiddling.
The honest caveat is that it doesn't do anything you couldn't do with ComfyUI's built-in convert-to-input mechanics plus a primitive. What it buys you is a one-node, explicit, non-magical answer that's the same every time - which is worth more than it sounds when you're debugging why a socket won't take a wire at 1 a.m.
Install is pack-standard and quick: ComfyUI Manager → search ComfyUi-MpiNodes → install, or clone it yourself:
cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
Restart, and it's under MpiNodes/Logic. No requirements file, no model downloads - this is a pure-Python utility pack, the same one that backs the open-source Cubric Vision app. If you're reading this because a saved workflow uses it, you almost certainly already have it installed.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| boolean | BOOLEAN | — |
| int | INT | — |
| float | FLOAT | — |