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

# ComfySoftSwitchNode - ComfyUI Built-in Node Documentation

> The Soft Switch node selects between two possible input values based on a boolean condition.

The Soft Switch node selects between two possible input values based on a boolean condition. It outputs the value from the `on_true` input when the `switch` is true, and the value from the `on_false` input when the `switch` is false. This node is designed to be lazy, meaning it only evaluates the input that is needed based on the switch state.

## Inputs

| Parameter  | Description                                                                                                                                                  | Data Type   | Required | Range                        |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | -------- | ---------------------------- |
| `switch`   | The boolean condition that determines which input to pass through. When true, the `on_true` input is selected. When false, the `on_false` input is selected. | BOOLEAN     | Yes      | True or False                |
| `on_false` | The value to output when the `switch` condition is false. This input is optional, but at least one of `on_false` or `on_true` must be connected.             | MATCH\_TYPE | No       | Same data type as `on_true`  |
| `on_true`  | The value to output when the `switch` condition is true. This input is optional, but at least one of `on_false` or `on_true` must be connected.              | MATCH\_TYPE | No       | Same data type as `on_false` |

**Note:** The `on_false` and `on_true` inputs must be of the same data type, as defined by the node's internal template. At least one of these two inputs must be connected for the node to function. Because the node is lazy, when only one input is connected, the node always outputs that input's value regardless of the `switch` state.

## Outputs

| Output Name | Description                                                                                                                                                                                                 | Data Type   |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `output`    | The selected value. It matches the data type of the connected `on_false` or `on_true` input. When both inputs are connected, it outputs `on_true` if `switch` is true, and `on_false` if `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/ComfySoftSwitchNode/en.md)

***

**Source fingerprint (SHA-256):** `7bf4bed69d8fd8c360e971ab8068382cd8ebaa02004d5df44312977a7309ae00`
