Nodes/ComfyUI_Mira/4 Bools from List
ComfyUI Node

4 Bools from List

Unpack four booleans

By mirabarukaso·Created 2 years ago·Updated 5 days ago· 206
4 Bools from List
  • bool_list
  • bool_0
  • bool_1
  • bool_2
  • bool_3
Start_At_Index0
NOT_Modefalse

4 Bools from List is the middle child of Mira's Boolean List Interpreter family. It takes a BOOLEAN_LIST and breaks out four booleans as separate outputs, starting from an index you choose. Reach for it when you packed a bundle of toggles up front and now need four of them, individually wired, at the point where the workflow actually branches.

It's a Logic node in ComfyUI_Mira, mirabarukaso's utility pack, and it's the counterpart to a list-producing node like 8 Bools or Even or Odd List. The design idea is the same across the whole pack: carry your yes/no decisions on one tidy wire, then fan them back out only where they're consumed. Four outputs is a common sweet spot - enough to drive a handful of toggles, few enough to keep the node compact.

How it works

Give it a list and a Start_At_Index, and it reads four consecutive entries starting there, exposing them as bool_0 through bool_3. So with Start_At_Index at 0 you get elements 0-3; set it to 2 and you get elements 2-5 instead. NOT_Mode inverts all four outputs at once, which is handy when the downstream logic wants the opposite polarity to what's stored in the list.

Inputs and outputs that matter

  • bool_list - the BOOLEAN_LIST source, usually 8 Bools or Even or Odd List.
  • Start_At_Index - the first element to read; the node takes four from there. Zero-based.
  • NOT_Mode - off passes the values through; on inverts all four.

Outputs are bool_0, bool_1, bool_2, bool_3 - four individual BOOLEANs. Wire each into whatever it gates: region toggles, bypass switches, function selectors.

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, pip install -r requirements.txt inside the folder, then restart. No models to fetch.

Common issues

The gotcha is running off the end of the list. This node always wants four entries, so if you point Start_At_Index near the tail of a short list, some of bool_0-bool_3 have nothing to read. Make sure the list is long enough for the window you're asking for - a 4-entry list read from index 0 is exactly full; from index 2 it isn't.

Two smaller things: the outputs are zero-based (bool_0 is the first), while a source like 8 Bools labels its switches from bool_1, so mind the naming offset. And if all four outputs seem inverted from what you set, NOT_Mode is on. If you need more than four at once, step up to the 8-output interpreter; if you only need one, drop down to the single. This node is just the four-wide slice of the same tool.

CategoryMira/Logic

Inputs (3)

NameTypeDefaultDescription
bool_listBOOLEAN_LIST
Start_At_IndexINT0
NOT_ModeBOOLEANfalse

Outputs (4)

NameTypeDescription
bool_0BOOLEAN
bool_1BOOLEAN
bool_2BOOLEAN
bool_3BOOLEAN