Files
1hew-ComfyUI-1hewNodes/web/docs/1hew_AnySwitchSelect/en.md
T
1hew 2328bc0460 v3.7.0 feat(nodes): 添加 Image Resize Square 并优化逻辑节点空输入处理
新增通用方形尺寸节点,并让多个 logic 节点在未连接输入时直接返回稳定结果,减少工作流等待与空输入异常。

Made-with: Cursor
2026-04-03 23:58:52 +08:00

1.5 KiB

Any Switch Select - Indexed Pass-Through (1…10)

Node Purpose: Any Switch Select chooses one of up to ten inputs by integer select, emits the chosen value, and also returns the effective clamped select. It uses lazy evaluation so only the selected input branch is computed.

Inputs

Name Port Type Default Range Description
select - INT 1 1-10 Input number to emit; 1 maps to input_1.
input_1…input_10 optional ANY (*) - - Candidate inputs; only the selected one is evaluated lazily.

Outputs

Name Type Description
output ANY (*) Selected input value.
select INT Effective clamped select value used for routing.

Features

  • Select range: select is clamped to [1, 10].
  • Lazy ports: evaluation is restricted to the selected input.
  • Robust behavior: emits None immediately if the selected input is not connected, without waiting for that branch.
  • Consistent naming: node, file, and parameter names all use select.

Typical Usage

  • Mode multiplexer: route to one of many alternative subgraphs with a single select.
  • Parameter bank: choose between preset values or resources by index.
  • Presence-based routing: combine with Any Empty Int to derive select values.

Notes & Tips

  • Provide the specific input_k that matches select; otherwise output will be None.
  • Out-of-range values are automatically corrected before routing.