> ## 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.

# BranchNode - ComfyUI Built-in Node Documentation

> Branch selects one of several connected inputs by name and passes it through to the output.

Branch selects one of several connected inputs by name and passes it through to the output. It works as a lazy switch: only the selected branch is evaluated, so the other branches can stay unconnected or hold outputs you do not want to compute. Every new connection adds another branch input, inputs can be renamed by double-clicking them, and the active branch is chosen from the `branch` selector.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `autogrow` | The connected branches. Each connection adds a new branch input, up to 32; all branches must use the same data type, which becomes the output type. | AUTOGROW | Yes | 1 to 32 branches |
| `branch` | Name of the branch passed through to the output. The options are the names of the connected branch inputs, and an input can be renamed by double-clicking it. | STRING | Yes | Names of the connected branches |
| `branch_names` | Internal list of the connected branch names, kept in sync by the frontend. It maps the selected name to its branch and is not meant to be edited by hand. | ARRAY | Yes | - |

**Note:** Only the selected branch is requested, so the other branches are not evaluated. The node raises an error when the selected name is not connected.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `output` | The value of the selected branch, passed through unchanged. | MATCH\_TYPE |

> 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/BranchNode/en.md)

***

**Source fingerprint (SHA-256):** `2b4dca360c1b459a9f05eb54fedb7cdea6842fb0c606ee6f937ed00f715ee23a`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.