LoopEnd
Where your fake loop hands the baton back
- send_to_next_loop
- loop
LoopEnd is the closing bracket of the fake loop that LoopStart opens. ComfyUI can't draw a real cycle in a graph, so these two nodes fake iteration: everything wired between them runs repeatedly, and LoopEnd is where the current pass hands its result back to the start for the next one. It's flagged as an output node, meaning ComfyUI treats it as a terminal - the loop body executes up to it, and the workflow continues past it.
The inputs that matter
Same pattern as its sibling, just two sockets:
loop(LOOP) - connect it to your LoopStart'sloopinput. Together those two wires are what tell ComfyUI which nodes sit inside the loop.send_to_next_loop(true/false) - the value that gets carried back to LoopStart for the next pass. On this plain pair it's a boolean switch, so the loop keeps going while it's true and stops when it isn't. (The SEGIMAGE variant swaps this socket for an actual image - see LoopEnd_SEGIMAGE.)
The wiring pattern is the classic loopback: LoopStart's first_loop gets your starting value; the loop body does something to it - say a KSampler running img2img at moderate denoise; the result feeds into LoopEnd's send_to_next_loop. Next pass, LoopStart uses that returned value instead of first_loop. First iteration in, feedback loop thereafter.
Installing it
Same pack as LoopStart, so one install gets you both. Via ComfyUI Manager, search "mm-comfyui-loopback", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/meshmesh-io/mm-comfyui-loopback
Then restart. No models to download, no pip baggage - it's all graph logic.
Where people get burned
Two things, and one of them is this pack's claim to fame. First: if your ComfyUI node-search box suddenly returns nothing after installing this pack, that's not you - it's a known bug. Back in March 2024 the pack broke the search filter with Uncaught TypeError: ctor.title.toLowerCase is not a function (node titles returned as a list instead of a string). Deleting the extension fixed it.
Second, and more subtle: this is a loopback loop, and loopback has a compounding-cost problem. Every pass that round-trips through a full VAE encode/decode degrades the image a little, so "loop until it's perfect" drifts instead of converging - it accumulates loss with each cycle. Keep loop counts small, or loop in latent space where you can.
Honest framing: this pack is about two years old, effectively unmaintained (the GitHub repo is currently unreachable), and if you met LoopEnd it's almost certainly inside an old downloaded workflow. It works well enough in that role. Just don't build your new pipeline on it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| send_to_next_loop | undefined | — | |
| loop | LOOP | — |
Outputs (0)
No outputs