Nodes/NH-Nodes/Any List Split (NH)
ComfyUI Node

Any List Split (NH)

Your list is one socket away from ten named outputs

By jetthuangai·Created 5 months ago·Updated 21 days ago· 6
Any List Split (NH)
  • items
  • All
  • index 1
  • index 2
  • index 3
  • index 4
  • index 5
  • index 6
  • index 7
  • index 8
  • index 9
  • index 10
index_count4

ComfyUI is genuinely awkward at one thing: taking a list and grabbing item 1, item 2, item 3 out of it as separate wires. You can do it with index nodes, but it means a chain of them and a graph that looks like plumbing. Any List Split (NH) is the shortcut - one input socket, an All output that passes the whole list through, and up to ten indexed outputs (index 1index 10) you can wire straight into wherever they're needed.

It works on any list type - images, latents, strings, whatever. The socket is the * wildcard, so it doesn't care what's inside.

How it works

The node declares itself as a list consumer (INPUT_IS_LIST), so ComfyUI hands it the whole list at once. Then two widgets decide what you get:

  • index_count - how many of the ten indexed outputs are "in play." Set it to 4 and you see index 1 through index 4; the rest are hidden. All is always available regardless.
  • If the list is shorter than index_count, the extra outputs get a blocked signal rather than an error - the downstream node simply doesn't execute. That's the null-output-placeholder trick from ComfyUI's plumbing layer: absent data becomes "don't run," not a crash.

So a batch of 3 images with index_count set to 5 gives you a working index 1–3 and two silently inert outputs. You don't have to trim anything.

Where you'll actually use it

The obvious pattern is feeding discrete slots. Say List Create (NH) holds a list of prompts: split it, wire index 1 into your positive prompt for frame one, index 2 into frame two, and so on. Or split an image batch and route each frame to its own processing branch. It also composes nicely with the pack's Text Split Lines (NH) and List Index (NH) if you need more than ten slots.

Installing

Part of NH-Nodes, so it's the same one-time install as everything else in the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/NH-Nodes.git
cd NH-Nodes
pip install -r requirements.txt

Or install NH-Nodes via ComfyUI Manager and restart. No models, no extra downloads - this is pure list handling.

The one thing to remember: All is a list output, so only feed it to nodes that accept lists. If you wire All into a node expecting a single image, you'll get the list semantics problem rather than an error - and then you'll appreciate that the indexed outputs exist at all.

CategoryNH-Nodes/Batch

Inputs (2)

NameTypeDefaultDescription
items*
index_countINT40–10Number of index outputs to show/use. All is always available.

Outputs (11)

NameTypeDescription
All*
index 1*
index 2*
index 3*
index 4*
index 5*
index 6*
index 7*
index 8*
index 9*
index 10*