> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# EndLoop - ComfyUI Built-in Node Documentation

> End Loop marks the end of a loop block.

End Loop marks the end of a loop block. It collects the value produced by the last node in the loop body and returns either only the final iteration or every iteration, depending on the `accumulate` setting, while also passing a value back to Start Loop so the next iteration can begin.

## Inputs

| Parameter              | Description                                                                                                                                            | Data Type | Required | Range                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | -------- | -------------------------------------- |
| `output_value`         | Value returned by End Loop. It returns the final iteration or all iterations according to accumulate.                                                  | ANY       | No       | Any value type                         |
| `next_iteration_value` | Value sent from End Loop back to Start Loop for the next iteration.                                                                                    | ANY       | No       | Any value type                         |
| `accumulate`           | Return output\_value from every iteration when enabled; otherwise return only the final iteration.                                                     | BOOLEAN   | No       | `true`<br />`false` (default: `false`) |
| `terminations`         | Connect outputs that must execute on every iteration. Their values are not returned. Growable slots named `termination_1`, `termination_2`, and so on. | ANY       | No       | 0 to 50 slots                          |

Note: `terminations` is a growable list of slots with a minimum of 0 and a maximum of 50 connections. Values connected here force execution on every iteration but are not part of the returned result.

Note: This node is an input list node, so its inputs receive the collected values from every loop iteration.

## Outputs

| Output Name | Description                                                                                              | Data Type  |
| ----------- | -------------------------------------------------------------------------------------------------------- | ---------- |
| `outputs`   | The final iteration's output\_value, or values accumulated across iterations when accumulate is enabled. | ANY (list) |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/EndLoop/en.md)

***

**Source fingerprint (SHA-256):** `142840dca7f238eb00c72074d265478c548ad5c047e05744d0c3715e452f795a`
