Nodes/ComfyUI Ino Nodes/Ino Switch On Int
ComfyUI Node

Ino Switch On Int

One int, up to ten pipelines — the batch router

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Switch On Int
  • default
  • input_0
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • output
switch0

The moment you're generating variants - ten prompts, five LoRAs, a handful of different seeds - you need a way to pick which one runs this pass. Ino Switch On Int is that picker: feed it an integer and it routes one of up to ten inputs straight through to a single output. Think of it as a railway switch for your workflow, controlled by a number.

It comes from the ComfyUI Ino Nodes pack (nobandegani/ComfyUI-InoNodes), in the extra/utility category.

The clever part: it works with any type

Most switch nodes are locked to one data type - a string switch, an image switch, a model switch. This one isn't. It's built on ComfyUI's newer MatchType template, which means it adapts to whatever you actually connect: wire in strings, images, model objects, conditioning - it routes them all. That's the grown-up version of the old "anything anywhere" routers, and the type stays honest, so you don't get the debugging nightmares that come from forcing mismatched types.

It also evaluates lazily - only the selected input gets executed. That's a real feature, not a footnote: if input 3 is an expensive node and you're running input 0, the expensive branch never fires. In batch workflows this can be the difference between a fast pass and a full generation for every variant.

Inputs

  • switch - the integer index, from 0. Which input_N gets routed.
  • default - the fallback value, used when the selected input isn't connected.
  • input_0input_9 - up to ten optional candidates. Leave slots empty; the node falls back to default.

One output, matching whatever type you connected. The fallback behavior is the part people underuse: wire default to your most common case and only connect the special cases - you get a router that degrades gracefully instead of erroring when a slot is empty.

Where it fits

Pair it with anything that produces an integer: a batch index, a random int, a counter node, or a seed-driven value. That makes it a natural fit for automated variant grids - one int selects the prompt and the LoRA and the seed block simultaneously, because a single switch routes any type. Note it's flagged experimental in the pack, so treat it as "works well but young" rather than battle-hardened.

Install

# ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
cd ComfyUI-InoNodes
pip install -r requirements.txt

Restart ComfyUI after. No model downloads; requirements.txt installs the pack's core dependency, inopyutils. The MatchType support means this one really does want a modern ComfyUI (V3 schema, v0.18.1+). And the README's manual-install cd comfyui_ino_nodes is a typo - the folder is ComfyUI-InoNodes.

One gotcha: if the selected slot is empty and default isn't connected, you get None out - which will likely error downstream. Connect a sensible default and this node stops surprising you entirely.

CategoryInoExtraNodes

Inputs (12)

NameTypeDefaultDescription
switchINT0
defaultCOMFY_MATCHTYPE_V3
input_0optCOMFY_MATCHTYPE_V3
input_1optCOMFY_MATCHTYPE_V3
input_2optCOMFY_MATCHTYPE_V3
input_3optCOMFY_MATCHTYPE_V3
input_4optCOMFY_MATCHTYPE_V3
input_5optCOMFY_MATCHTYPE_V3
input_6optCOMFY_MATCHTYPE_V3
input_7optCOMFY_MATCHTYPE_V3
input_8optCOMFY_MATCHTYPE_V3
input_9optCOMFY_MATCHTYPE_V3

Outputs (1)

NameTypeDescription
outputCOMFY_MATCHTYPE_V3