[Internal] Recover List
How a literal list survives inside a function
- values
- *
[Internal] Recover List looks like a joke - one input called values, one output, returns exactly what it got. But it exists to solve a genuinely sneaky problem in ComfyUI Functional's graph-expansion scheme, and understanding it explains a lot about why the pack works the way it does.
When ComfyUI expands a function call, parameters and captured values that are plain Python objects get inlined directly into the graph. That's fine for a number or a tensor, but it breaks for lists. A list can't just be dropped into a node's input spec - ComfyUI would interpret certain shapes as a link to another node, and a literal list would be ambiguous or flat-out wrong. So the graph builder wraps the list in a tuple (the signal that "this is a literal value, not a wire") and routes it through a RecoverList node, whose run method strips the wrapper and hands the real list onward. The name is exactly what it does: it recovers a list value from the internal representation so it can flow into the function body.
This is why the whole pack insists you use LIST values from Basic Data Handling rather than ComfyUI's native Data List sockets. Lists are currency here - every Map, Fold, and Nest trades in them, and captured list parameters (say, a fixed list of prompts captured into a closure) come back through RecoverList nodes the moment the function runs. In practice you'll meet RecoverList in two places: as a node that flashes up inside an expanded function body while you debug, and as an entry in the saved workflow JSON that you should not hand-edit, because the tuple-wrapping it depends on is generated at runtime.
Inputs: one wildcard socket, values (the tuple-wrapped literal list). Output: one wildcard socket with the unwrapped list. That's the entire public surface.
Since it's internal, don't hunt for it in the node menu to add it manually. If you see one in a workflow, it's scaffolding - proof that a list parameter or capture got inlined correctly. If you're having "my list parameter came out empty/wrong" trouble, the fix isn't poking at RecoverList; it's checking that you're passing LIST-typed values in the first place. Feed it a native ComfyUI Data List and you're asking for the graph freeze the README warns about.
Install
It's part of the pack, nothing extra:
cd ComfyUI/custom_nodes && git clone https://github.com/Duanyll/comfyui_functional
then restart ComfyUI, or install Duanyll/comfyui_functional via ComfyUI Manager. No models, no pip dependencies. If your workflows only use the function-definition nodes without lists, you may never see this one - and that's fine, it's working quietly underneath.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| values | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |