ComfyUI Node

append

Add one item to the end of a data list, return a new list

By StableLlama·Created about a year ago·Updated 4 days ago· 48
append
  • list
  • item
  • list

Lists grow, and in ComfyUI they grow one node at a time. append is the node that adds a single item to the end of a data list and hands back the longer list. It's the smallest member of the pack's Data List family, but it's the one you'll reach for when you're assembling a collection incrementally - collecting results as a batch processes, for instance.

It's part of Basic data handling, StableLlama's zero-dependency utility pack.

How it works

Python's list.append(), but with a ComfyUI twist: instead of mutating a list in place, it returns a new list with the item added, so it plays nicely with the data-flow model of a graph. The node takes a list and an item, appends the item to a copy, and outputs the result as a data list. Because it copies rather than mutates, you can chain several appends in sequence and each stage carries the accumulated items forward.

Both inputs are marked optional and both accept ANY type, so you can append a string to a list of strings, an INT to a list of INTs, or mix types if you're feeling brave.

The inputs and output

  • list (*, optional) - the list to add to.
  • item (*, optional) - the value to append.
  • list (output) - the original list with the item on the end.

Note the output is a data list, not a LIST - downstream nodes will process each element individually, which is the usual reason you're building one of these at all.

Installing it

ComfyUI Manager → search "Basic data handling", or:

cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling

Restart. No dependencies, no models.

Common issues

  • "The item didn't show up." If item is left unconnected, nothing gets appended - the node guards against an empty item. Make sure both wires are actually plugged in.
  • "I want to add a whole list, not one item." That's extend, the sibling node. Append adds one element; extend splices a second list onto the end.
  • "I appended a data list and it nested weirdly." Appending a list as an item puts that list inside the outer list as a single element. If you meant to merge the two, use extend.
CategoryBasic/Data List

Inputs (2)

NameTypeDefaultDescription
listopt*
itemopt*

Outputs (1)

NameTypeDescription
list*