Boolean list to index string
Turn a list of booleans into the index string the directory loaders actually want
- bool_list
- memory_bool_list
- index_string
The load-by-index nodes in this pack (LoadImagesFromDirByIndexList and LoadImagesFromDirByIndexBatch) take their orders as a comma-separated string like 0,2,5,8,15. This node is the other half of that conversation: it converts a list of booleans into exactly that format. If position 0 is true, position 2 is true, and the rest are false, you get 0,2. It exists to turn "did this image pass my check?" into "load these images."
How it works
The boolean list can arrive as an actual BOOLEAN[] wire input (bool_list) or as a string (bool_list_str). The string parser is forgiving about formats, so all of these mean the same thing:
T,F,T1,0,1true,false,truetruefalsetrue101
True/false is case-insensitive, and it also understands t/f singles. If you feed it a wire list, it uses that; the string is mostly for when the values come from a text field or from a node that only outputs strings.
Then there's the memory half, which is the genuinely unusual bit. memory_bool_list_str and memory_bool_list accumulate onto a list that persists across executions - the node remembers everything you've fed it in previous runs and keeps appending, and the index string reflects the whole accumulated history, not just the current input. That's how you collect "interesting" results across a long batch and only at the end load the survivors. The reset boolean clears the memory, and note it's applied on the following run, not the one you flip it in.
The single output is index_string, ready to wire straight into either load-by-index node's indices input.
Inputs, briefly
Five optional inputs, but the ones you'll actually touch are bool_list or bool_list_str for the current values, and reset when you want the memory cleared. The memory_* variants are for accumulating state across runs, and you'll usually use one or the other - feed it directly when you want to push raw booleans from image-classification logic.
The trap
The memory is class-level state, shared by every instance of this node in your entire ComfyUI session. Drop two copies of this node into the same workflow and they read and write the same memory. If you see index strings that make no sense, a leftover reset=false from an earlier run is the usual suspect - the node keeps whatever you fed it last session. Design around it: one instance, reset it when you start a new pass, and remember it's not per-workflow.
Install and verdict
Same as the rest of the pack: Manager → search "ComfyUI-northTools", or git clone https://github.com/northumber/ComfyUI-northTools into custom_nodes, then restart. No models, no extra pip packages - just the pack.
It's a niche glue node, but if you're building the kind of "process a folder, decide which images mattered, load those" automation this pack is aimed at, it's the piece that connects boolean checks to the loaders. On its own it does very little; wired between a classifier and LoadImagesFromDirByIndexList it's quietly the bridge the whole pipeline depends on.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| bool_list_stropt | STRING | — | |
| bool_listopt | BOOLEAN[] | — | |
| memory_bool_list_stropt | STRING | — | |
| memory_bool_listopt | BOOLEAN[] | — | |
| resetopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| index_string | STRING | — |