DictValues (Yogurt Nodes)
Strip a dict down to its contents — keys optional
- dict_data
- values
DictValues is the mirror image of DictKeys: instead of the names in a dict, it hands you the contents. Feed it a dict and you get a list of every value, keys discarded. When you care about what's stored rather than where it's stored, this is the node that flattens a dict into a form you can iterate over, filter, or feed into list operations.
The classic case: you've got a dict of results keyed by name - {"model_a": 0.92, "model_b": 0.87} - and you want to do something with just the numbers, like find the best one or check whether any exceeded a threshold. Strip the values into a list, pipe them into ListContains or a loop, and you're done. It's also the fast path for "does this dict contain a value anywhere," which you can then confirm with DictContainsValue if you need a boolean rather than the data itself.
One practical note: the values list preserves the dict's iteration order (which for modern Python dicts is insertion order), so if you built the dict deliberately, the list comes back in that same order. Useful when order matters downstream.
How it works
It calls .values() on the dict and, with as_list defaulting to true, wraps it into a plain list. Turn as_list off and you get the raw values view - lighter, but missing list conveniences like indexing and guaranteed len(). For almost everything, keep it on.
Inputs
dict_data- any dict-like object supporting.values().as_list- default true; converts the values view to a list.
Output
values- the list (or view) of values,*-typed.
Install
Ships in ComfyUI-YogurtNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt
Or via ComfyUI Manager (search "YogurtNodes") and restart. Under "Yogurt Nodes" → Logic.
Common issues
- "I need the keys too" - that's
DictKeys, orDictSubsetif you need specific pairs. - "The values are in a weird order" - they follow dict insertion order; if the source dict was built from a set or an unordered parse, the order reflects that.
- "I want them as a list but it's not" -
as_listis off. Flip it.
Thin and unglamorous, but it's the bridge from "dict-shaped data" to "list-shaped operations," which is a crossing you make more often than you'd think in ComfyUI logic.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| dict_data | * | Any dict-like object that supports .values() | |
| as_listopt | BOOLEAN | true | Convert values to list, otherwise return values view |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| values | * | — |