Nodes/comfy-ovum/From Batch Type Node Ovum
ComfyUI Node

From Batch Type Node Ovum

Reshape a list into tuple, set, or dict

By sfinktah·Created about a year ago·Updated 10 months ago· 7
From Batch Type Node Ovum
  • py_list
  • *
target_typelist

One list in, your choice of container out. From Batch Type Node Ovum takes a Python list and converts it to a tuple, set, dict, or dict-from-pairs - the ComfyUI-flavored member of a small family of converters in the comfy-ovum pack. It lives under ovum/lists/comfy, which is its way of saying "I play by ComfyUI's batch-ish list rules," for when you're working near the list/batch boundary of the graph.

The point of a converter like this is that different downstream nodes have different opinions about what a collection should look like. Some want a tuple because they treat pairs as immutable records. Some want a set so duplicates vanish and membership checks are fast. Some want a dict so you can look things up by key. Rather than reshaping data in a custom scripting node, you drop this in and flip a dropdown.

The inputs that matter

  • py_list - the source LIST. It must actually be a list; passing something else raises a clear error.
  • target_type - the dropdown with five options:
    • list - pass-through (identity)
    • tuple - (a, b, c, ...)
    • set - deduplicated set
    • dict - index→value mapping, so [a, b, c] becomes {0: a, 1: b, 2: c}
    • dict_pairs - expects a list of [key, value] pairs and builds a real keyed dict

The output is a single * socket, which is this pack's way of letting the type flex to whatever you selected. The node also marks itself as an output node, so it works fine as a terminal in a workflow - you can see the converted value in its widget area.

Which variant do you actually want?

The pack ships three near-identical converters, and choosing the right one is the only real trap here:

  • From Batch Type Node Ovum (this one) - ovum/lists/comfy, the batch-aware sibling
  • From List Type Node Ovum - ovum/lists/python, the plain-Python-list version
  • From List Type Node - ovum/lists/any, a deprecated batch variant kept for legacy workflows (its class name literally ends in DEPRECATED)

If you're building new workflows, use the two Ovum-named ones and avoid the bare From List Type Node. Between batch and Python flavors, match the socket family you're feeding - batch-flavored sockets upstream generally want the comfy variant.

Installing it

Part of sfinktah/comfy-ovum:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

or search comfy-ovum in ComfyUI Manager, then restart. No models.

Gotchas

dict_pairs is the finicky one: every element must be a two-element list or tuple, or it raises a descriptive error. And converting to a set loses order and duplicates - if order matters downstream, don't reach for set. Otherwise this is a boring, dependable shape-shifter.

Categoryovum/lists/comfy

Inputs (2)

NameTypeDefaultDescription
py_listLIST
target_typeCOMBOlist5 options: list, set, dict, dict_pairs, tuple

Outputs (1)

NameTypeDescription
**