List Splice Ovum
List Splice Ovum — the maintained in-place list surgeon
- py_list
- insert_list
- *
- *
ListSpliceOvum is the current, non-deprecated version of the pack's splice node: remove a chunk of a list starting at a position, optionally insert new items in its place, and get back both the modified list and the elements you cut. It's JavaScript Array.splice semantics on a Python list, and it's the node to reach for when you need to actually edit a list, not just read from it.
The key word there is edit. Unlike the pack's slice and extend nodes, splice mutates py_list in place. That's not a bug - it's the feature that makes iterative list-processing workflows work - but it's the one thing to remember when you wire it up.
Inputs and output
Straight from the schema:
py_list- the target list, modified in place. Must be a real Python list.start- aSTRINGwidget. Blank → 0. Negative →n + start, clamped to[0, n].delete_count- aSTRING. Blank → delete to the end (n - start). Negative → 0. Clamped to what remains.insert_list- items to insert atstart. Blank → nothing inserted. A list → its items. A single non-list value → wrapped as one element.
Outputs:
*- the same, now-mutated list, so you can thread it forward.*- a list of the removed elements, for when you want to process exactly what got cut.
The semantics that will bite you
- Blank
delete_countdeletes to the end. Leave it empty and you've truncated the list fromstartonward. Type it deliberately. startis clamped, not erroring. Negative values count from the end; out-of-range values clamp. You won't get an out-of-bounds crash, you'll get a silently different splice - verify your math.- In-place mutation is visible everywhere. If the same underlying list also feeds another branch of the graph, that branch sees the splices too. When you want a copy instead, use
ListSliceOvum(non-mutating) or make a copy upstream.
Where it shines
- Consuming lists in loops. Process the first N items, splice them out, pass the shortened list to the next iteration - the "removed" output tells you what you just handled.
- Swapping a section. Remove a bad range of seeds and insert a fresh batch at the same spot in one step.
- Structured queue management. Keep a to-do list in the graph and carve completed work out of it.
Install
Ships in comfy-ovum:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
or ComfyUI Manager → comfy-ovum, then restart. No models, no keys.
Gotchas
Non-list py_list raises ValueError: Input must be a Python list. And if you loaded a workflow referencing ListSplice (no suffix), that's the deprecated class - this node is its drop-in replacement with the same inputs and outputs.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| py_list | * | — | |
| start | STRING | — | |
| delete_count | STRING | — | |
| insert_list | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| * | * | — |
| * | * | — |