Ino List Length
The list-count node that doesn't make you wire up a whole branch
- items
- length
"How many images are in this batch?" is a question that comes up constantly in ComfyUI, and the answer is always one integer away - if you have a node that gives it to you. Ino List Length is that node. You plug in any list, and out comes a clean length integer you can wire into a loop counter, a switch, a progress calculation, or just stare at while you debug why your workflow misbehaved.
It's part of ComfyUI Ino Nodes (nobandegani/ComfyUI-InoNodes), the 125+-node V3-schema pack, and sits in the InoListHelper category - the pack's small set of list tools that play nicely together.
How it works
Dead simple under the hood: it takes items (any list type), calls Python's len() on it, and returns that as length. There are no options, no config, no way to mis-set anything. One input, one output. It's about as close to a pure function as a node can get.
Two implementation details worth knowing, both borrowed from how the pack handles lists in the V3 schema:
Noneis treated as empty. If nothing is wired intoitems, or an upstream node passes nothing, you get0rather than a crash. That's friendly for workflows where a list is sometimes empty by design.- It consumes list outputs properly. Because the node is declared list-aware at the schema level, when you feed it a genuine list-output (like the one from
Ino Make Any ListorIno List Append), it measures the whole list as one thing instead of getting confused by the batching behavior that trips up naive nodes.
When you'd use it
The obvious companions are the pack's own list tools: count what Ino Make Any List collected, verify an append worked by checking count, or feed the number into Ino Switch On Int to route on list size. Outside the pack, it's the standard "how big is my batch" check that lets you decide whether to proceed, warn, or take an alternate path.
Note the sibling: Ino Length in the pack's extras category does essentially the same job with a -1 sentinel for non-list inputs. Ino List Length is the version that's strictly list-oriented and returns 0 for nothing - pick whichever failure mode fits your downstream logic.
Installing it
ComfyUI Ino Nodes installs like any custom node pack:
- ComfyUI Manager (easiest): search for "ComfyUI Ino Nodes", install, restart.
- Manual:
Then restart ComfyUI.cd ComfyUI/custom_nodes git clone https://github.com/nobandegani/ComfyUI-InoNodes.git cd ComfyUI-InoNodes pip install -r requirements.txt
The pack needs inopyutils and a reasonably current ComfyUI. It's a niche pack - don't expect to see it in many shared workflows - but when the question is "how big is this list," Ino List Length answers it in one hop.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| items | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| length | INT | — |