Nodes/ComfyUI-YogurtNodes/ToList (Yogurt Nodes)
ComfyUI Node

ToList (Yogurt Nodes)

The type-coercion node that makes stubborn data fit the list sockets

By yogurt7771·Created 2 years ago·Updated 9 days ago· 1
ToList (Yogurt Nodes)
  • data
  • list_result

Some nodes give you a tuple. Some give you a set. Some hand you a generator that technically is iterable but refuses to sit in a socket that wants a list. ComfyUI's * typing is forgiving, but not that forgiving - and the pack's own list nodes (YogurtListLength, YogurtListIndex, YogurtListJoin, the whole family) expect proper list-shaped data. YogurtToList is the two-second fix: "Convert any iterable to a list," which is the entire description and the entire feature set.

What it is

One required input, data, typed *. One output, list_result, also *. Whatever iterable you shove in - a tuple, a set, the result of a YogurtStringSplit, a range-like object - comes out as a real Python list. There are no options to fiddle with, no toggles, no defaults to misread. It is aggressively boring, and that's the point.

Why a node this dumb earns its place

Type friction is one of the most common little failures in ComfyUI, and it's the kind that produces confusing "can't connect" errors rather than a clear message. You split a string, you get back a list, but the node you're wiring into was built by someone who declared its input as a strict list type, and the connection just... won't snap. Sticking YogurtToList between the two forces the shape and moves on with your life.

It's also the normalizer at the end of a messy chain: YogurtToDict gives you dict-shaped data, YogurtStringSplit gives you split data, and when you want to hand any of it to something that's picky about receiving a list, this is the converter. Think of it as the pack's version of a type cast - you reach for it not because it's exciting, but because it's exactly what an uncooperative socket needs.

Installing it

It ships in the Yogurt Nodes pack under YogurtNodes/Logic. One install:

cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt

Or ComfyUI Manager, search "ComfyUI-YogurtNodes," install, restart. No models, no keys, no dependencies beyond the pack's shared setup.

Common issues

There's genuinely not much to break here. The one thing to know: data accepts any iterable, but a non-iterable single value isn't magically wrapped - if you feed it a plain string, you get a list of characters, because a string is iterable and that's what iterating it means. If that's not what you wanted (and usually it isn't), convert the string to a one-element list upstream, e.g. via YogurtStringSplit with a separator, or just feed the intended iterable.

CategoryYogurtNodes/Logic

Inputs (1)

NameTypeDefaultDescription
data*Any iterable data to convert to list

Outputs (1)

NameTypeDescription
list_result*