Nodes/ComfyUI-RTX-Remix/RTX Remix Switch
ComfyUI Node

RTX Remix Switch

The tiny ternary that unclogs REST workflows

By NVIDIAGameWorks·Created 2 years ago·Updated 6 days ago· 71
RTX Remix Switch
  • if_true
  • if_false
  • *
switchertrue

RTX Remix Switch is a if A else B decision point dressed up as a node. You feed it two values and a boolean, and it passes through the first value when the boolean is true, the second when it's false. That's the whole job, but because its inputs are wildcard-typed, it quietly becomes the most flexible branch node in this pack - and a genuinely handy one.

Where this fits

The pack is NVIDIA GameWorks' bridge between ComfyUI and the RTX Remix Toolkit, NVIDIA's tool for remastering old DirectX 8/9 games with path tracing. Switch belongs to the REST API workflow side (RTX Remix > REST API > common), where ComfyUI drives the toolkit instead of the other way around. It's a logic node, like its siblings String Constant, String to List, and Invert Boolean - none of them touch the API. They exist to make the graph decide things.

What it actually does

Mechanically it's a one-liner: if_true if switcher[0] else if_false. No network call, no toolkit involvement. The switcher input is a plain BOOLEAN widget that defaults to true, so out of the box the node passes if_true; flip the toggle and it passes if_false.

The superpower is the * (any) types on if_true and if_false. Most switch nodes in the ecosystem are string-only or number-only. Here you can branch on strings, integers, or even an image. A common real pattern: hold a fallback texture path in one branch and a path computed elsewhere in the other, and let a tagged boolean (or an RTX Remix Invert Bool) decide which one reaches Set Texture. You can also use it as a master on/off for a value - feed a real value vs. an empty string and let the boolean choose.

One subtlety from the source: the node is declared with list handling, and the switcher is read as switcher[0]. In practice that means it plays fine in batch-mode graphs where values arrive as lists - it doesn't break if a list shows up, which is more than most branch nodes can say.

Inputs and outputs

  • if_true (*) - passed through when switcher is true.
  • if_false (*) - passed through when switcher is false.
  • switcher (BOOLEAN, default true) - the decision.
  • value (*) - whichever branch won.

If this reminds you of rgthree's Context Switch / Any Switch, fair. Those pick the first non-null input among several and live in the graph-management world. This one is dumber on purpose - exactly two branches, explicit boolean, no null detection - which makes it predictable inside a REST pipeline.

Installing the pack

ComfyUI Manager: search "RTX Remix" (or comfyui-rtx_remix), Install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/NVIDIAGameWorks/ComfyUI-RTX-Remix
cd ComfyUI-RTX-Remix
./install.sh   # install.bat on Windows

Restart. Requires ComfyUI v0.3.48+ (V3 node schema). The installer brings huggingface-hub, numpy, OpenEXR, pillow, pinned pydantic, requests, torch - none of which Switch needs at runtime, but the pack ships them as a unit.

Gotchas and troubleshooting

Keep both branches the same type. Because the inputs are wildcards, ComfyUI won't complain at the input side, but a downstream node will if the winning branch is, say, a string when the socket expects an integer. Consistent branches are on you. If you want the switch driven by something dynamic, wire a BOOLEAN in from another node rather than hardcoding the widget mid-run. And remember the ordering rule that trips up everyone new to the REST side: these nodes only execute in the right order if a context wire threads from RTX Remix Start Context through the graph to RTX Remix End Context - a switch with no context chain is a switch that never runs.

CategoryRTXRemix/common

Inputs (3)

NameTypeDefaultDescription
if_true*
if_false*
switcherBOOLEANtrue

Outputs (1)

NameTypeDescription
**