bxbSwitch
One dropdown to stop rewiring your graph for every test
- selected_value
- selected_label
- selected_index
You've got two prompts you keep flip-flopping between, or a checkpoint you want to A/B against a LoRA without rebuilding the graph every time. bxbSwitch is the node that makes that a one-click thing: wire in a handful of candidates, pick one from a dropdown, and that's what flows out. It's the same "any switch" idea as rgthree's Any Switch - a utility node that doesn't generate anything itself, it just decides which of several inputs wins.
It lives in the ComfyUI_Bxb pack, a Chinese-market toolkit for turning workflows into paid mini-programs. But here's the thing worth knowing up front: this specific node is pure local routing. It never talks to the pack's cloud service, so it works whether or not you ever touch the monetization side.
How it actually works
The magic is in how the node grows. When you connect a wire, the node adds a new input slot (input1, input2, …) and the frontend JS turns the select dropdown into a live list of everything you've connected. Wire in two prompts, the dropdown lists two. Wire in four, it lists four. The API schema shows a dropdown with nearly 200 choices, but that's a static artifact - the real list is built on the fly from what's actually attached.
Under the hood it uses lazy evaluation: ComfyUI only computes the input you actually selected, so the other candidates don't burn time. The backend reads your workflow JSON, finds which input the dropdown points at, and routes just that one through. That's why the outputs are dynamic-typed - it can carry images, conditioning, text, latents, nearly anything you throw at it.
The inputs and outputs that matter
select- the dropdown. This is the whole node. Pick which connected input passes through.selected_value(*) - the routed value. Wire this into whatever you were testing.selected_label(STRING) - the name of the input you picked (e.g.input2), if you need it as text elsewhere.selected_index(INT) - a 1-based number for the selected slot, handy for driving a counter or a log.
For a typical workflow you only touch select and selected_value. The label and index outputs are the "sure, someone might want this" bonus.
Installing it
The pack installs the usual way - ComfyUI Manager (search ComfyUI_Bxb) or:
cd ComfyUI/custom_nodes
git clone https://github.com/zhulu111/ComfyUI_Bxb
Then restart ComfyUI. The pack auto-installs its own pip dependencies on first load (aiohttp, websockets, Pillow, requests, numpy and friends), and there are no model files to download - it's all plumbing, no weights.
Common issues
The dropdown looks empty until you connect a wire - that's normal, it only lists connected inputs. The more common gotcha is a stale browser tab: because this node's behavior lives in frontend JS, a hard refresh after a ComfyUI update clears up most "it suddenly looks broken" reports. And if you're dragging in a workflow from the community that already has one of these, it'll only show the inputs that were wired when the workflow was saved - reconnect and the list rebuilds. Where people get burned: expecting it to work like a static multi-input node and then hunting for the slot list before anything is wired up. There's nothing to hunt. Wire it, then pick.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| select | COMBO | 199 options: any_value, any_value, any_value, any_value, any_value, any_value, +193 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| selected_value | * | — |
| selected_label | STRING | — |
| selected_index | INT | — |