Nodes/mm-comfyui-loopback/LoopEnd_SEGIMAGE
ComfyUI Node

LoopEnd_SEGIMAGE

LoopEnd, but it carries actual pixels back

By meshmesh-io·Created 2 years ago·Updated 2 years ago· 1
LoopEnd_SEGIMAGE
  • send_to_next_loop
  • loop
  • image

    The plain LoopEnd passes a true/false switch back to the start of its fake loop. LoopEnd_SEGIMAGE is the same closing bracket, except what it hands back is an actual image - which turns the loop from "iterate while a flag says so" into "feed the last output back in and keep going."

    That's the loopback move, and it's where the SEG in the name comes from: a segmented image, the masked region or crop you're refining. If you're iterating over image segments, this is the end node for the job.

    Inputs that matter

    • send_to_next_loop (IMAGE) - the image carried back to the loop start for the next pass. Wire your previous output here: the refined crop, the last img2img result, whatever the loop should start from next time.
    • loop (LOOP) - the marker wire that connects this node to its LoopStart_SEGIMAGE partner and defines the loop region.
    • image (optional, IMAGE) - a convenience input if you want to pass the segment through directly rather than only through the send-back path.

    Like all LoopEnd nodes it's an output node - the loop terminates here and the workflow continues after it.

    How you'd actually use it

    The pattern: LoopStart_SEGIMAGE feeds an image into the loop body, the body does a refinement pass (a KSampler at low-to-moderate denoise, or a detail pass on the masked segment), and the result goes into send_to_next_loop so the next iteration starts from the improved version. Classic uses are progressive img2img refinement of a face or region, and chained passes where each one cleans up the last. The vocabulary fits the author's other pack, mm-comfyui-megamask - meshmesh-io is a mask-and-segment kind of author - and in the wider ecosystem the segmentation concepts mirror Impact Pack's SEGS.

    Installing and the catch

    Install is the pack-wide story: ComfyUI Manager, search "mm-comfyui-loopback", install, restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/meshmesh-io/mm-comfyui-loopback
    

    No models, no heavy deps. The catch is the same too: this pack is roughly two years old, the repo is currently unreachable, and it's the pack that famously broke ComfyUI's node-search box in early 2024 (ctor.title.toLowerCase is not a function - node titles returned as a list). Works fine for a short refinement loop in an old workflow; don't stake your new setup on it. And keep the loop short - every full VAE round-trip loses a little quality, so "one more pass" has a cost that compounds.

    Categoryloopback

    Inputs (3)

    NameTypeDefaultDescription
    send_to_next_loopIMAGE
    loopLOOP
    imageoptIMAGE

    Outputs (0)

    No outputs