Nodes/ComfyUI-Interactive/Interactive Switch
ComfyUI Node

Interactive Switch

Collect your InteractiveSelector picks into one output

By lquesada·Created 2 years ago·Updated about a year ago· 52
Interactive Switch
  • selector1
  • selector2
  • selector3
  • selector4
  • selector5
  • selector6
  • selector7
  • selector8
  • images

InteractiveSwitch is the other half of the pack's core pair, and on its own it does basically nothing - it's a receiver, not a decision-maker. It sits downstream of one or more InteractiveSelector nodes, waits until you've clicked one of them, and then passes that selector's image on to the rest of your workflow. The actual "pause and let me choose" experience happens at the selector; the switch is what turns several possible choices back into a single path so the rest of your graph doesn't need to know how many branches there were.

This is the pattern behind ComfyUI-Interactive's whole pitch: build a few candidate branches (different LoRAs, different seeds, different post-processing), run them all up to this point, then let a human - you - pick the winner without re-queuing the whole prompt.

How it works

Wire up to eight InteractiveSelector nodes into a switch's eight selector slots. Each selector shows its own image with its own button. Click the one you want; the switch detects which of its connected selectors has selected = true and forwards that selector's image out through its images output. Nothing downstream of the switch fires until a choice has actually been made - that's what makes this "interactive" rather than just "conditional."

If you only wire in a single selector, the switch becomes a plain gate: click that one selector to let the path through, leave it unclicked and the switch - and everything after it - just doesn't run. That's the "block a section of the workflow until I approve it" use case, and it was added deliberately in a later update to the pack.

The inputs and outputs that matter

  • selector1 through selector8 (all optional, type interactive_images) - these only accept the output of InteractiveSelector nodes, not a generic IMAGE. You don't have to fill all eight; wire in as many branches as you're actually choosing between.
  • images (IMAGE, output) - whichever selector was clicked, forwarded downstream. Plug this into whatever the rest of your workflow expects an image from - a save node, an upscaler, another sampler.

If you need more than just the image to travel with the choice - a matching latent, mask, or a string/int/float that goes with that particular branch - that's what InteractiveSwitchWithParameters (paired with InteractiveSelectorWithParameters) is for; this plain version only ever carries the image.

How to install it

Via ComfyUI Manager, search "ComfyUI-Interactive" and install. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/lquesada/ComfyUI-Interactive

Restart ComfyUI after either method. No extra Python packages, no model files - it's UI and graph logic only.

Common issues & troubleshooting

The switch just sits there and nothing downstream ever runs. That's expected until one of its connected selectors gets clicked - this node is designed to hold execution open. If you're testing and want it to just pass something through automatically, click a selector first, or reconsider whether you actually need the interactive pause for that spot in your workflow.

Auto-queue keeps stomping my selection. The pack needs auto-enqueue disabled and the queue empty to behave - with auto-queue on, ComfyUI keeps firing new runs and the pause-for-input behavior can't hold state cleanly between clicks.

Connecting through "Anything Everywhere" nodes breaks it. The README calls this out directly: routing selector→switch links through cg-use-everywhere nodes can stop the switch from correctly reading which selector was chosen. Keep a real, direct-or-indirect wire between them even if you're using Anything Everywhere elsewhere in the graph.

Only some of my eight selectors show up as choices. Check that each is actually feeding its interactive_images output into a distinct selectorN slot on the switch - an unconnected selector, or one plugged into the wrong slot, just won't be part of that switch's decision.

Categoryinteractive

Inputs (8)

NameTypeDefaultDescription
selector1optinteractive_images
selector2optinteractive_images
selector3optinteractive_images
selector4optinteractive_images
selector5optinteractive_images
selector6optinteractive_images
selector7optinteractive_images
selector8optinteractive_images

Outputs (1)

NameTypeDescription
imagesIMAGE