ComfyUI Node

AppendToAnyList

Build a batch of anything without caring what it is

By przewodo·Created about a year ago·Updated 4 months ago· 4
AppendToAnyList
  • any_list
  • any
  • list

Ever had a workflow where you want to feed a set of images, prompts, or latents into one downstream node, and you keep reaching for the wrong tool? That's what this node is for. It's a type-agnostic list builder: you start with a list, add stuff to it, and hand the grown list down the line. The name "Any" isn't marketing - the socket really is the * wildcard type, so it accepts images, strings, numbers, latents, conditioning, whatever you throw at it.

Where you'd actually use this: you're assembling inputs for a batch operation - a video node that wants several reference frames, a prompt queue you're building chunk by chunk, a list of image paths you want to process. Instead of pre-baking a fixed batch, you wire pieces in and let this node accumulate them, and you can chain several of them together like a pipe.

How it works

The mechanism is simple, and worth knowing because it explains a small gotcha. The node holds two inputs - any_list and any - and decides what to do based on what any actually is:

  • If any is a single item, it gets appended to the list.
  • If any is itself a list/array, the whole thing gets merged (extended) into any_list.
  • If any_list is empty or nothing is connected, it starts a fresh list.

So the same node doubles as "add one item" and "concatenate two arrays." The output, named list, is typed * and marked as a list output, which means downstream nodes that accept list inputs (or iterate over a batch) can grab the whole thing in one wire.

The inputs that matter

  • any_list - the existing list to grow. Leave it empty to start fresh, or chain another AppendToAnyList's output into it to keep accumulating.
  • any - the thing to add. Single item or an array; the node can't tell your intention, it just looks at the runtime type.

That's the whole surface. One input list, one item input, one output. It's a genuinely thin node, which is fine - plumbing nodes should be boring.

Installing it

This is part of the ComfyUI-Przewodo-Utils pack, so there's no standalone install. ComfyUI Manager → "Install Custom Nodes" → search ComfyUI-Przewodo-Utils, or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/przewodo/ComfyUI-Przewodo-Utils.git

Then restart ComfyUI. The pack's pyproject.toml declares heavier deps (teacache, comfyui-gguf, wanblockswap, Rife-TensorRT) that the video-sampler side wants - this utility node imports almost nothing, so it loads fine even if those never install.

Where people get tripped up

The one real trap is ComfyUI's list semantics. Because this is a *-typed node, it's easy to assume the output will behave like a core IMAGE batch. It won't always. Some downstream nodes want a proper batched tensor; others want a Python list. If your downstream node complains about types, that's usually the mismatch - check what the receiver actually expects before assuming the list is wrong. Also note the merge-vs-append split: if you feed it a single-element array by accident, you get one item appended (the array), not the element.

It won't change the world, but it's the kind of node that quietly removes five wires of awkwardness from a workflow that otherwise fights you.

CategoryPrzewodoUtils

Inputs (2)

NameTypeDefaultDescription
any_list*The existing list to append/merge to. Can be empty or contain any type of items.
any*Single item to append to the list, or array to merge with the list. If this is a list, all items will be added. If it's a single item, only that item will be appended.

Outputs (1)

NameTypeDescription
list*