List Append Panels
Glue two lists of panels together
- panels
- to_append
- POLYGON
comfyui-panels moves panels around as lists of polygons - that's the output shape of Build Layout Panels and Detect Panels In Image. So sooner or later you'll want to merge lists: combine two pages' worth of panels, add a hand-made panel onto a detected set, or append the panels from one layout to another before processing them as one batch. List Append Panels is the node for that.
It's a list operation, not a geometry operation - the panels themselves are untouched. Both inputs are lists of polygons, and the output is a new list with the second input's panels appended after the first's. The order is the whole point: since the pack's panel lists carry reading order, appending is how you sequence content across page groups. Append panel A's list after panel B's list and the result reads A, then B.
How it works
The source is a couple of lines: deep-copy the first list, extend it with a deep-copy of the second, return the combined list. The deep copies matter in ComfyUI's execution model - it means the output list is independent of the inputs, so later mutations of one branch don't corrupt another branch's data. Both inputs are flagged INPUT_IS_LIST, so they accept multi-item wires as-is.
The inputs and output
panels- the first list (the one that comes first in the output).to_append- the list to add on the end.
Output: one combined POLYGON list.
Installing it
Part of comfyui-panels - Manager, search "comfyui-panels", or:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_panels
Restart, install deps (shapely, matplotlib, opencv-python), no models.
Where people get burned
The only trap is assuming order doesn't matter. It does - appending is not merging, and the output's order is exactly "first list, then second list." If your downstream step relies on reading order or indexes (like List Transfer Panels does with slices), the order you append in is your contract with the rest of the graph. Also note the inputs expect lists, not a single polygon: if you're appending just one panel, you need it wrapped in a list (a single polygon output won't wire straight in as a list here).
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| panels | POLYGON | — | |
| to_append | POLYGON | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| POLYGON | POLYGON | Panels (Shapely Polygons) |