Nodes/comfy-ovum/List Values
ComfyUI Node

List Values

List Values — the sibling to List Keys that fetches a dict's values

By sfinktah·Created about a year ago·Updated 10 months ago· 7
List Values
  • obj
  • values

listValues is the companion to listKeys: give it a dict and it returns the values; give it a list or tuple and it returns a copy of those elements; give it anything else and it politely returns an empty list. Two tiny nodes, one job done - turning Python structures into fan-out-able lists so you can iterate over them in the graph.

The logic, straight from the source:

  • dictlist(dict.values()) - the values in the same order as the keys.
  • list or tuplelist(obj[:]) - a shallow copy of the elements.
  • anything else → an empty list, gracefully.

The copy behavior for lists is worth noticing: it returns list(obj[:]), a fresh list object, not the original reference. That matters in this pack, because a few of its other nodes (looking at you, ListSplice) mutate lists in place - copying through listValues is a cheap way to detach a branch from future mutations.

Why you reach for it

Python dicts show up in ComfyUI more than beginners expect - embedded workflow metadata, IMAGE_EX context objects, API payloads, the pack's own New Multi-type Dictionary. When you need to do something with every value in one of those, listValues converts the dict to a list you can loop, join, or fan out.

The standard pairing is keys and values in lockstep:

  • listKeys(obj)["prompt", "workflow", "seed"]
  • listValues(obj)[<the prompt>, <the workflow dict>, 12345]

Drive a loop over the key list, and use Get by Index against the value list to fetch the matching entry. It also works as a "flatten one level" helper: if a node hands you a list and you just want a stable copy in list form, this gives it to you without fuss.

Install

Part of 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

The output socket is a single * holding a list object. If a downstream node expects batch-style items instead of one list value, you may need a passthrough/cast node from this pack to adjust the list treatment. And if you feed it a string expecting characters or a "length," you'll get [] - it doesn't error, it just silently returns nothing, which reads as "no values" in the graph.

Categoryovum/loop

Inputs (1)

NameTypeDefaultDescription
obj*

Outputs (1)

NameTypeDescription
values*