Node Chain Extender
Duplicate a node N times and wire the copies together automatically
- count
Some workflows want the same node repeated five times in a row - a filter applied in stages, a prompt-focus pass run twice, a resize chain. Copy-paste gets you there, but then every tweak to the "template" is a round of manual edits across the copies. Node Chain Extender is this pack's experiment at automating the busywork: point it at a node in your graph, tell it how many copies you want, and it duplicates the node and wires the copies together in a chain.
A word up front: this is marked experimental in the pack, and it shows in the way it's controlled. There's no drag-and-drop; you configure it with text. It's a graph-manipulation tool, not a data-processing node, so expect some fiddliness.
How it works
It identifies nodes by their titles, not their types. You give it:
- source_node - the title of the node to use as the template for each chain link.
- end_node - the title of a node that marks where the chain stops; new copies are inserted before it.
- count - how many chained copies to create (1–32).
- connect_slots - which slots to connect between adjacent links, as comma-separated
output:inputpairs, e.g."output:input"to feed one link's output into the next link's input. - gap - pixel spacing between chained nodes in the graph layout (default 20).
- bypass_on_remove - when a chain link gets removed, bypass it instead of hard-deleting (default on, which is the safer behavior for a node you might want back).
- search_from_root - search for the named nodes in the root graph even when this node sits inside a subgraph (default on).
The node itself outputs just count - the actual chaining work happens by manipulating the graph, which is why the frontend half of the pack carries the logic.
The workflow
The practical pattern is: build one instance of the node you want to repeat, give it a distinctive title, place an end node, then configure the Chain Extender and hit run. It lays out the copies with the specified gap and connects the slot pairs you named. Because it works off titles, partial or fuzzy matches can be forgiven - but a typo in a title and it quietly can't find anything, which brings us to the gotchas.
Installing it
Part of the Nifty Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes
or search "Nifty Nodes" in ComfyUI Manager, then restart. No model downloads or heavy dependencies.
Gotchas
- Titles must match. This is the #1 failure point. Rename your template node to something unique first - generic titles like "KSampler" will match the wrong thing or nothing.
- It's experimental. Treat chains built by this node as works-in-progress: save your workflow before running it, because a misconfigured chain rewiring your graph is harder to undo than a wrong number.
- The rest of the pack is built on ComfyUI's newer V3 API, and this node leans on subgraph-aware graph manipulation on top of that - if it misbehaves, make sure you're on an up-to-date ComfyUI. There isn't a large community around this pack yet, so expect to debug with the source and your own experiments.
Honestly, this one is a niche utility. For most people, copy-paste plus a group is faster than teaching a node your node titles. It shines when you genuinely need 8–32 copies and want the connections laid out by hand once.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| count | INT | 11–32 | Number of chained node copies to create (1–32). |
| source_node | STRING | Title of the node to use as the template for each chain link. | |
| end_node | STRING | Title of the node that marks the end of the chain — new copies are inserted before it. | |
| connect_slots | STRING | Comma-separated list of slot name pairs to connect between adjacent chain links, e.g. 'output:input'. | |
| gap | INT | 200–2048 | Pixel gap between adjacent chain nodes in the graph layout. |
| bypass_on_remove | BOOLEAN | true | Bypass removed chain links instead of deleting them outright. |
| search_from_root | BOOLEAN | true | When True, searches for nodes in the root graph even when used inside a subgraph. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| count | INT | — |