Pyobjects/List Append
Add one item to the end of a list
- py_list
- item
- LIST
The most basic way to grow a list in this pack: take a LIST, take one item of any type, stick the item on the end, hand back the updated list. It's my_list.append(item) as a node.
What it does
Two required inputs - py_list (typed LIST) and item (typed *, so it'll take anything: a string, a number, a dict from JSON Parse, another list, whatever you've got flowing through the graph) - and one output, the updated LIST. Wire the output back into the next node's py_list input and you've got a chain: Create List → Append → Append → Append, building up a collection one value at a time across the graph instead of in a single Python script.
This matters because ComfyUI genuinely doesn't have a native way to accumulate values like this. Most of the graph is built around single values flowing through a DAG - you don't normally get to say "collect these five things into a list as the workflow runs." LogicUtils's list nodes, starting from Append, give you that capability without leaving the graph.
Realistic use: gathering a handful of generated filenames to Dump to JSON at the end, building a list of seeds or prompt fragments you picked up from different branches of a workflow, or assembling a small config object piece by piece before handing it to something that wants a list.
The inputs and outputs that matter
py_list(required,LIST) - the list you're appending to. Has to actually be aLIST-typed output, not a raw string or number - wire it from List Create, another list node, or a JSON Parse result that happens to be an array.item(required, any type) - what you're adding. Any type is fine; it goes on as a single new element, not merged in.- Output:
LIST- the list with your item added.
Installing it
Standard for this pack: ComfyUI Manager → search ComfyUI-LogicUtils → install → restart. Or by hand, cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils then restart ComfyUI. No models, no heavy dependency chain - a Redditor comparing lightweight logic-node options specifically praised this pack for having none, which lines up with what's actually in the repo. There's an install hook behind COMFYUI_LOGICUTILS_AUTO_INSTALL=1 (opt-in) and a hard-off switch, COMFYUI_LOGICUTILS_SKIP_INSTALL=1, but with nothing heavy here you probably won't need either.
Where people get burned
The most common mix-up is Append versus Extend. Append adds your item as a single new element - even if that item happens to be a list itself, it goes in as one nested list, not merged in. If you're trying to combine two existing lists into one flat list, you want List Extend, not this node; feeding a LIST into Append's item port will "work" in the sense that it doesn't error, but you'll end up with a list containing a list, which is rarely what you meant.
Second: py_list genuinely has to be a LIST. If you skip Create List (or any node producing a proper LIST output) and try to wire something else in - a raw string, say - ComfyUI's type checking on the connection will reject it before the workflow even runs, which is the friendly failure mode. The unfriendly one is upstream: build the chain starting from List Create (or a JSON Parse that resolves to an array) and this stays predictable the whole way through.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| py_list | LIST | — | |
| item | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LIST | LIST | — |