Extensions/Auto Switch (ANY) by Steve Lasmin
ComfyUI Extension

Auto Switch (ANY) by Steve Lasmin

Auto Switch (ANY) by Steve Lasmin — A ComfyUI custom node for automatic signal routing between two universal inputs.

By Eklipsis·Created 3 months ago·Updated 3 months ago· 0
Eklipsis/auto_switch_any_by_steve_lasmin
Nodes1
On cloudLocal install
Categoryutils/routing
Stars0
Updated3 months ago
Readme

Auto Switch (ANY) by Steve Lasmin

A ComfyUI custom node that automatically routes a single active signal between two universal inputs.

Node Preview License

Description

Auto Switch (ANY) is a 2×1 auto-routing gate for ComfyUI. It accepts two optional universal (*) inputs and passes through exactly one active signal. If both inputs are active or both are inactive, the node raises a clear runtime error.

This is ideal for workflow branching where you want to quickly switch between two upstream nodes (e.g., different checkpoint loaders, samplers, or conditioning pipelines) by simply bypassing one of them — no manual dropdown required.

Features

  • True universal type — accepts MODEL, CLIP, VAE, LATENT, IMAGE, CONDITIONING, STRING, INT, FLOAT, and any custom type.
  • Auto-routing — detects which upstream node is active and routes it automatically.
  • Collision guard — raises an error if both inputs are active, preventing ambiguous execution.
  • Dead-air guard — raises an error if no input is active, preventing silent failures.
  • Dynamic output type — the frontend extension updates the output slot type to match the active input type for clean graph visualization.

Installation

Method 1: ComfyUI Manager (Recommended)

  1. Open ComfyUI Manager → Click "Install via Git URL"
  2. Paste: https://github.com/Eklipsis/auto_switch_any_by_steve_lasmin
  3. Restart ComfyUI

Method 2: Manual

  1. Navigate to ComfyUI/custom_nodes/
  2. Clone this repository:
    git clone https://github.com/Eklipsis/auto_switch_any_by_steve_lasmin.git
    
  3. Restart ComfyUI

Method 3: ZIP Download

  1. Download the latest release ZIP
  2. Extract into ComfyUI/custom_nodes/auto_switch_any_by_steve_lasmin/
  3. Restart ComfyUI

Usage

  1. Add the node via Add Node → utils/routing → Auto Switch (ANY) by Steve Lasmin
  2. Connect Input A to one upstream node
  3. Connect Input B to another upstream node
  4. Bypass (or disconnect) the node you do not want active
  5. Connect the Output to your downstream node

The node will automatically route the active input. If you accidentally leave both upstream nodes active, the node will stop execution and report a COLLISION error. If both are bypassed, it reports a DEAD AIR error.

File Structure

auto_switch_any_by_steve_lasmin/
├── __init__.py              # Package entry point
├── auto_switch_any.py       # Node logic (backend)
├── js/
│   └── auto_switch_any.js   # Frontend extension (output type sync)
├── pyproject.toml           # Comfy Registry metadata
├── README.md                # This file
└── LICENSE                  # License terms

Author

Steve Lasmin

License

Free to use without modifications.

You may use this node in any personal or commercial project. Modification, redistribution, or derivative works are not permitted without explicit written permission from the author.

See LICENSE for full terms.