List Insert
Slide an Item Into a ComfyUI List Without Rewiring Everything
- list
- item
- list
- count
ComfyUI lists are fine until you need to put something between two existing items, at which point you discover the only built-in options are "concat at the end" and "rebuild the whole list by hand." List Insert is the node that does the in-between: it pushes an item into a list at a chosen position, no rewiring required. It's a two-input utility from the Kinburg-Nodes pack, aimed at the workflow-builder's daily chore of editing collections by position.
What it takes
list(optional) - the list to insert into. Leave it empty and the node starts a new list fromitem. Works on a ComfyUI list of any type - images, strings, latents, ints.item(optional) - the thing to insert. Feed it a multi-item list and several items go in at once.position- at start, at end, at index, or after index. Index is ignored for start/end.index- the 0-based target for the two index positions. Negative counts from the end, so-1means "before the last item."
Outputs are list (the new list) and count (its length), which is handy when the next node needs to know how many items it's dealing with.
When it's the right tool
The pack draws a clean line between two families, and it's worth respecting. If your items are not same-size images - mixed strings, latents, prompts, whatever - the generic ListInsert is the right node. If you're doing frame-level edits on a single same-size IMAGE batch, use the pack's Image Batch Insert instead (it reconciles different frame sizes losslessly and is built for the [B,H,W,C] tensor case). Both live in the same pack, and picking the wrong one is how you end up with an error about incompatible batch shapes.
The typical workflow use: you've collected a list of prompts or images via the pack's For Each (Collect) + List Output path, and you want to inject a control image or a fixed prompt at a specific slot before feeding the list into a batch operation. Positional editing is the whole job - it's the difference between "put this at index 2" and "rebuild the list."
Install
Part of the Kinburg-Nodes pack: ComfyUI Manager (search "Kinburg-Nodes"), or cd ComfyUI/custom_nodes && git clone https://github.com/Kinburg/Kinburg-Nodes, then restart. No dependencies, no models - pure list plumbing. It's a small node and it knows it; if you only ever append, the core text-concat or batch tools will do, but the moment you need position, this is the one.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| position | COMBO | at end | Where to insert. 'at index' inserts before the item at 'index'; 'after index' inserts after it. 'index' is ignored for start/end. |
| index | INT | 0-100000–100000 | 0-based target position for 'at index' / 'after index'. Negative counts from the end (-1 = last). |
| listopt | * | The list to insert into. Leave empty to start a new list from 'item'. | |
| itemopt | * | Item to insert. Connect a multi-item list to insert several at once. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| list | * | — |
| count | INT | — |