Even or Odd List
A seed into a whole boolean list
- bool_list_Odd_True
- result
Even or Odd checks the parity of one number. Even or Odd List does it digit by digit and hands you a whole BOOLEAN_LIST. Feed it 1234567890 and it walks each digit, marking even digits True and odd digits False, and out comes a list of booleans you can pipe straight into Mira's Boolean List Interpreters. It's how you turn a single seed into a fistful of independent-looking on/off switches.
It's a Logic node in ComfyUI_Mira, mirabarukaso's utility pack, and it's built for exactly one job: seed-driven randomness across several toggles at once. Where the plain Even or Odd gives you one coin flip per run, this gives you several derived from the same number, so a changing seed reshuffles a batch of decisions together. In a multi-region or multi-variant workflow that's a cheap way to get controlled variety.
How it works
The node reads the integer's decimal digits and evaluates each one's parity, producing one boolean per digit - even digit True, odd digit False. The quantity input sets how long you want the list to be, up to 16. Here's the wrinkle worth understanding: if quantity is longer than the number has digits, the node loops back to the low digit to fill the extra slots, and NOT_filling controls how. With NOT_filling off, the filled bits repeat as-is; with it on, the fill alternates between the value and its inverse on each loop, so you don't just get the same short pattern tiled. The result string shows you the actual list that came out.
Inputs and outputs that matter
integer- the source number, ideally a seed so it changes each run.quantity- how many booleans you want (1 to 16). Longer than the digit count triggers filling.NOT_filling- the fill algorithm: off repeats digits as-is, on alternates inverted/as-is on each loop.
Outputs:
bool_list_Odd_True- theBOOLEAN_LIST. Heads up on the polarity: the output name says "Odd_True," but the author's own description of this node says it returnsTruefor even digits andFalsefor odd. The two disagree, so don't trust either blindly - read theresultstring on your actual numbers and confirm which way it goes before you wire it into a switch.result- aSTRINGof the actual result, worth putting on a ShowText node.
Connect bool_list_Odd_True to a Boolean List Interpreter (1, 4, or 8) to pull out the individual switches.
Installing it
ComfyUI Manager: search ComfyUI_Mira in the Custom Nodes Manager, Install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git, then restart ComfyUI. On a load error, run pip install -r requirements.txt in the folder and restart. No models to download.
Common issues
Two things to keep straight. First, the fill behavior only matters when quantity exceeds the number of digits - for a short seed asking for many booleans, NOT_filling is what stops the tail from being a boring repeat, so if your "random" toggles all end up identical past a certain point, turn it on. Second, this is seed-driven, not truly random per-position; the same integer always yields the same list, which is a feature (reproducible) as long as you remember it. If you want it to actually vary, the seed has to actually change.
And the same ComfyUI seed-timing quirk applies as with the rest of the pack: flipping a seed node from fixed back to randomize can lag a queue. Send result to a ShowText node while you're wiring it up - reading the real output list is the fastest way to confirm the parity convention and the fill are doing what you think.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| integer | INT | 12345678900–18446744073709550000 | — |
| quantity | INT | 11–16 | — |
| NOT_filling | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| bool_list_Odd_True | BOOLEAN_LIST | — |
| result | STRING | — |