> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-cms-changelog-node-lifecycle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ComfySwitchNode - ComfyUI Built-in Node Documentation

> The Switch node selects between two possible inputs based on a boolean condition.

The Switch node selects between two possible inputs based on a boolean condition. When `switch` is enabled (true), it passes the `on_true` input through to the output; when disabled (false), it passes `on_false`. Only the selected branch is evaluated, so the other input does not need to be connected.

## Inputs

| Parameter  | Description                                                                                                                                                                     | Data Type   | Required | Range |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------- | ----- |
| `switch`   | A boolean condition that determines which input to pass through. When enabled (true), the `on_true` input is selected. When disabled (false), the `on_false` input is selected. | BOOLEAN     | Yes      |       |
| `on_false` | The data to be passed to the output when the `switch` is disabled (false). This input is only required when the `switch` is false.                                              | MATCH\_TYPE | No       |       |
| `on_true`  | The data to be passed to the output when the `switch` is enabled (true). This input is only required when the `switch` is true.                                                 | MATCH\_TYPE | No       |       |

**Note on Input Requirements:** The `on_false` and `on_true` inputs are conditionally required. The node requests the `on_true` input only when the `switch` is true, and the `on_false` input only when the `switch` is false. Both inputs must be of the same data type and must match the output data type. If the selected input is not connected, the node outputs no value.

## Outputs

| Output Name | Description                                                                                                                                                 | Data Type   |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `output`    | The selected data. This is the value from the `on_true` input when the `switch` is true, or the value from the `on_false` input when the `switch` is false. | 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/ComfySwitchNode/en.md)

***

**Source fingerprint (SHA-256):** `42c442efeda0197d950702c52647233dee1a30216fb07e1ce4bc844784a6c5f2`
