๐บ Int To List Of Bools
A fixed-length boolean mask from a single integer
- booleans
Some routing setups want to know "should I process image 0? image 1? image 2?" as a list of true/false values. Nilor Int To List Of Bools takes a single integer and expands it into exactly that: a list where the first N entries are True and everything after is False. Feed it 3, you get [True, True, True, False, False, ...]. It's the smallest possible idea for a node, and it exists because "a boolean per batch item" is a real socket shape in batch workflows.
How it works
One input, number_of_images (an INT). One output, booleans - a BOOLEAN list. The implementation hides the interesting detail: it builds a fixed-size list (the code's default max_images=10) and sets my_bools[i] = i < number_of_images. So the output length is always 10, and if you ask for more than 10, all 10 come back True and the excess is silently lost. That fixed 10-item ceiling is not exposed as an input - it's baked in.
That's the first thing to know, because it will absolutely bite you. If your batch has 20 images and you feed this node 20, every one of the 10 booleans is True - you can't distinguish item 15 from item 5. This node was clearly written for a workflow capped at 10 items. Verify your batch size before relying on it, or treat it as "the first ten, masked by count."
Where it fits
The intended use is visible in the variable name (number_of_images): you have N images that should be "active" in a batch, and the rest should be skipped or processed differently. Wire the booleans list into nodes that consume per-item booleans - conditional routing, enable/disable masks for a batch pass - and one integer drives the whole switch. It pairs with the pack's other list generators (๐บ List of Ints, ๐บ n Fractions of Int) if you're assembling index/bool logic from raw numbers.
The honest take
This is the thinnest kind of utility node: it's [i < n for i in range(10)] in a costume. You could absolutely do it with a tiny custom script, and the hardcoded 10-item cap is the kind of assumption that quietly breaks workflows written by someone else. But if your batch is exactly 10 or fewer - which the author's own workflow presumably was - it's frictionless and hard to misuse. The main thing to keep in mind is that there's no input for the list length; if you ever find yourself wishing there were, that's the signal this node isn't the right size for your job and you should look at a more general list node instead.
Install
ComfyUI Manager (search "Nilor Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/nilor-corp/nilor-nodes
cd nilor-nodes && pip install -r requirements.txt
Restart ComfyUI; it's under Nilor Nodes ๐บ โ Generators. No dependencies - pure Python list building.
Bottom line
Use it as a compact way to turn "process the first N" into a per-item boolean list, but only when N is safely within 10. Read that cap as a design smell if you're adapting this to a bigger batch pipeline: it'll happily produce a list of Trues and never warn you. For the common small-batch case, it's exactly the right amount of node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| number_of_images | INT | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| booleans | BOOLEAN | โ |