Elegant Notes Merge
Turn Scattered Note Tabs Into a List You Can Wire Up
- lists
- named list
- tab names
- tab values
- tab name
- tab value
- count
Elegant Notes on its own is a bit of a cul-de-sac: it spits out a NAMED_LIST and nothing in stock ComfyUI knows what to do with one. Elegant Notes Merge is the node that makes it useful. It takes however many of those lists you feed it, flattens them into one, and then - this is the part that matters - breaks them back out into ordinary STRING values you can actually connect to a CLIP Text Encode, a Save Image prefix, or a filename format box.
Think of the pair as a tiny prompt library: one or more Notes nodes hold the text, Merge decides which tab you want and gives it to you as a plain string. It's the same "one source, many consumers" pattern that drives every value node in ComfyUI's plumbing layer, just for several named values instead of one.
The mechanism, briefly
The lists input is an auto-growing input. Connect a named list and a fresh empty socket appears beneath it, so you can chain Notes → Merge, Notes → Merge, Notes → Merge without ever opening a menu. The pack allows up to 20 of them (list_1 through list_20). Connect down to a lower one and the gap closes.
Merge then concatenates the tabs of every connected list in order into one flat list. Flat is the important word - nothing nests. If two lists both contain a tab called intro, the second becomes intro_2, then intro_3, and so on. Empty tab names become tab1, tab2 by position. So the merge is lossless on values and predictable on names.
One detail from the source that explains some behaviour: this node is declared as an output node. In ComfyUI that means it always executes, even if nothing downstream of it is connected - which is why the tab count row on the node stays live while you're editing instead of only updating after a run.
Inputs and outputs worth caring about
index is the one you'll actually set: it picks which tab the single-value outputs give you, counting from 1. You can type it, or connect it - that's the whole reason an Elegant Random Number exists in this pack, so you can pull a random tab per run.
out_of_range (advanced, hidden behind the cyan ⚙ in the title) decides what an out-of-range index does. It defaults to clamp: below 1 uses the first tab, past the end uses the last. The other options are error (stop with a message naming the count) and wrap (count around). Clamp as a default is the friendly choice and worth keeping unless you're debugging.
Then the six outputs:
named list- everything merged, in the pack'sNAMED_LISTtype, for chaining into another Merge or back into a Notes node.tab namesandtab values- list outputs, in matching order.tab nameandtab value- the single tab atindex.count- how many tabs there are, also drawn on the node.
Those two list outputs are sneakier than they look. A list output makes everything downstream run once per item, which is exactly how a batch loader works with images. Point tab values at a CLIP Text Encode and you've built a prompt-batch loop: one image per tab, no manual flipping.
Installing
Search Elegant Nodes in ComfyUI Manager, install, restart, refresh the browser. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/wipeer/comfyui-elegant-nodes.git
pip install -r comfyui-elegant-nodes/requirements.txt
No models, no downloads, no VRAM. The only external Python dependency is simpleeval, which ComfyUI already ships for its own Math Expression node. You do need ComfyUI 0.4.0+ - the pack is built on the V3 node API and the auto-growing lists input is the feature that requires it, so an older install will break at import rather than degrade politely.
Where people get burned
"There are no tabs" on a run. Merge raises when the merged result is empty, and that happens in three everyday situations: nothing connected to lists, a Notes node with a blank notes widget, or index pointing out of range while out_of_range is set to error. The error message for the range case helpfully tells you how many tabs there are, so read it before assuming the node is broken.
Wrong tab coming out. With clamp as the default, an index of 7 on a 3-tab list quietly gives you tab 3 instead of complaining. That's intended, not a bug - and it will fool you once.
Expecting it to read a file. The Merge node has no idea about the JSON files Elegant Notes can load and save. It reads what's on the connected nodes, which are whatever tabs those nodes currently hold. Editing the file changes nothing until you click Load in the Notes node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| lists | COMFY_AUTOGROW_V3 | Connect named lists here; a new input appears each time you connect the last one. | |
| index | INT | 1-2147483648–2147483647 | Which tab the single tab outputs give, counting from 1. Can be connected. |
| out_of_range | COMBO | clamp | What an index outside the tabs does. error: stop with a message. clamp (default): below 1 uses the first tab, above the last uses the last. wrap: count around (one past the last is the first again). |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| named list | NAMED_LIST | — |
| tab names | STRING | The names of all tabs, in order. |
| tab values | STRING | The values of all tabs, in order. |
| tab name | STRING | The name of the tab at the index. |
| tab value | STRING | The value of the tab at the index. |
| count | INT | How many tabs there are. |