β Create empty object
Your starting point for building lists and dicts by hand
- Object
Sometimes you don't want to gather values - you want to build a container and fill it in later. That's the whole job of "β Create empty object": a dropdown with two choices, list and dict, and out comes [] or {}. Nothing else. No inputs, no widgets, just an empty Python container on a *-typed Object socket.
By itself it looks almost pointless. Its purpose is that in FlowNodes, containers are things you can grow with write operations, and this node is the blank slate every accumulation pattern starts from.
The pattern: empty object + write operations
The intended workflow, straight from the README's structure: create an empty list or dict, then mutate it with π Generic operation (write) nodes - f.append(s) to push onto a list, f[s] = t to set a dict key, setattr for object attributes. Because those write nodes return the same mutated object, you can chain them, and because Python passes objects by reference, every downstream node sees the accumulated result.
This is also how you populate the πΊ persistent dict across runs: Create empty object (dict) is your starting {}, you write values into it, and Get persistent dict reads it back on the next run.
A concrete example: you want to assemble a dict of {name: seed} pairs from several runs. Create an empty dict, wire it into the First socket of a Generic operation (write) with f[s] = t, feed the key and value in, and the same dict object comes out with one more entry each time you chain another write node.
Flow matters here
This is one of the FlowNodes cases where ordering is not optional. A write node mutates in place, and if ComfyUI executes two writes out of order - or skips one because caching thinks nothing changed - your dict silently ends up wrong. So the house style is: Create empty object β write nodes all sharing the same flow line β π Merge flow (bottleneck) after the last write to seal the order. The write nodes carry Flow in and out specifically so you can chain them deterministically.
Install
Part of the FlowNodes pack. Install the pack, get the node:
cd ComfyUI/custom_nodes
git clone https://github.com/gitmylo/FlowNodes
# restart ComfyUI
or ComfyUI Manager β search FlowNodes β install. No Python dependencies, no models. It's a young WIP pack, so if you hit oddities, the GitHub issues page is the channel.
Troubleshooting
- "Empty" output isn't empty - this node genuinely returns a fresh
[]or{}every run. If it looks populated, you're reading a mutated object that a write node returned, not the empty one. - Writes land in the wrong order - you skipped the flow wiring. Chain
Flowthrough the write nodes and close with a flow merge. - Only
listanddictin the dropdown - correct, that's all it supports. The README says so: "Currently supports dicts and lists." If you need another container type, that's what Execute Python is for. - Need a non-empty starting point? This node is empty-only by design. For a prepopulated container, use π Create batch (list) or build it inside an Execute Python script.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| Type | COMBO | 2 options: list, dict |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Object | * | β |