Index Of Batch Ovum
IndexOf, the non-deprecated batch flavor — find where an item sits in a list
- py_list
- search_element
- INT
Same trick as the pack's other IndexOf nodes, but this is the version you should actually use when your data arrives as a Comfy-style list: feed it a list and a search value, get back the first matching index, or -1 if there's no match. It's the modern replacement for the deprecated plain IndexOf, and it lives in the ovum/lists/comfy category to signal that it's built to sit directly on Comfy list sockets.
Think of it as JavaScript's Array.prototype.indexOf with Python equality underneath. If your list is ["sunset", "hdr", "sunset"] and you search for "hdr", you get 1. Search "sunset" and you get 0 - first match only.
The inputs that matter
The schema is minimal, and that's the appeal:
py_list- the list to search. Must be an actual Python list; the node raisesValueErrorotherwise.search_element- the value to find. Any type, so wire in a string, an int, even a small dict.start- optional from-index. This is aSTRINGfield (the pack's quirk): blank means 0, a negative value counts from the end and gets clamped to[0, n].
Output is a single INT. Wire it into a comparison to test "is this in the list?" - anything >= 0 means yes - or into an indexing node to grab the found entry from a parallel list.
Why "batch" and which one do I pick
The Batch suffix here mostly tells you which socket semantics the node expects. IndexOfBatchOvum treats the incoming value as the list itself (batch-style, one element per list item), while IndexOfOvum in ovum/lists/python is the flavor that takes a Python list object as a single value. In practice: if you built your list with a list-construction node or it came off a fan-out, use this one; if a node hands you a single py_list object, the python flavor matches better. If you're ever unsure, they're cheap to swap - same inputs, same output, same -1 contract.
One thing to know about every node in this family: they inherit the pack's NewPointer base, which forces IS_CHANGED to NaN, so they never cache and always re-execute. Great for loops where you need fresh answers every tick; slightly annoying if you were hoping ComfyUI would skip a no-op run.
Install
It ships in the comfy-ovum pack, so install once and you're done:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
or search comfy-ovum in ComfyUI Manager, then restart. No models, no keys, no heavy dependencies for this node specifically - the pack's Python deps (requests, pillow, numpy, pymediainfo, aiohttp, etc.) are handled by Manager automatically.
Troubleshooting
ValueError: Input must be a Python list- you connected something that isn't a list, or you expected it to search a Comfy batch tensor. Wire a real list in.- Getting
-1when you're sure the value is there - check thestartfield. It's a string; a stray space or leftover text can shift where the scan begins. Also remember it uses strict Python equality, so2(int) won't match"2"(string). - Workflow wants
IndexOf(no suffix) - that's the deprecated class. Swapping to this node is a straight replacement: same inputs, same output.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| py_list | * | — | |
| search_element | * | — | |
| start | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |