RemRun Toggle
Flip a Subgraph Between Local and Remote
- input_0
- input_1
- input_2
- input_3
- input_4
- input_5
- input_6
- input_7
- input_8
- input_9
- _ignore_
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
Some parts of a split workflow shouldn't run on one side at all. The README's own example is LoRAs: you don't want the remote machine loading a LoRA that only matters locally, and you don't want the local machine loading models the remote path needs. RemRun Toggle is the switch that makes each side skip what it doesn't need.
It's a simple idea with a genuinely clever twist. You drop it in front of a subgraph and set enabled to only_locally or only_remotely. When a Remote Run Input node expands your graph, it flips that value before shipping the subgraph to the remote side. So a toggle set to only_remotely locally arrives at the remote as only_locally - the remote runs it. A toggle set to only_locally arrives flipped to only_remotely, so the remote skips it and only the local side runs that chunk. One switch, and both sides agree without ever coordinating directly.
How it works
Two mechanisms do the work. check_lazy_status makes every input to the toggle lazy when the section is off, so the graph scheduler knows it doesn't need those values. And during graph expansion, the pack rewrites the toggle's enabled value so the remote prompt contains the opposite setting. When the toggle is "off" on a given side, its inputs_when_off setting decides whether its inputs are just lazy or fully disconnected, and when_off decides what its outputs do.
The inputs that matter
enabled-only_locallyoronly_remotely. The whole point of the node.when_off- what happens to the outputs on the side where the section is disabled.passthrough(default) hands the inputs through untouched;block_execution_silentandblock_execution_verboseblock downstream execution;errorraises;return_nonereturns nulls.inputs_when_off-lazyordisconnected, controlling how aggressively the off-side inputs are cut.input_0throughinput_9- the values passing through the switch.
Ten wildcard outputs.
Where it earns its keep
This is the node that makes the pack's LoRA and model-avoidance workflows work. Toggle the sections that load models so each machine only loads what it actually uses - that's real VRAM savings on both ends, and it's the difference between a split workflow that feels elegant and one that chokes both machines. Combined with RemRun Start From Here, you can fine-tune exactly which chunks run where and what gets loaded on each side.
One honest note: with the default passthrough behavior, an "off" toggle is nearly invisible - the values just flow through locally. It's only when you start combining toggles with Start nodes and disconnecting inputs that the subtle behaviors (lazy vs. disconnected, blocked execution) come into play, and at that point the interactions can get genuinely fiddly. Start simple: one toggle, only_remotely, watch the remote console to confirm the flip actually happened.
Same shared install as the rest of the pack, on both machines:
cd ComfyUI/custom_nodes
git clone https://github.com/LatentRat/comfy_remote_run
or via ComfyUI Manager - "comfy_remote_run". Dependencies are websockets and requests, no model files. And as always with remote execution: keep both instances on a network you trust, because ComfyUI's API doesn't authenticate anything by default.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | COMBO | 2 options: only_locally, only_remotely | |
| inputs_when_off | COMBO | lazy | 2 options: lazy, disconnected |
| when_off | COMBO | passthrough | 5 options: error, block_execution_silent, block_execution_verbose, passthrough, return_none |
| input_0opt | * | — | |
| input_1opt | * | — | |
| input_2opt | * | — | |
| input_3opt | * | — | |
| input_4opt | * | — | |
| input_5opt | * | — | |
| input_6opt | * | — | |
| input_7opt | * | — | |
| input_8opt | * | — | |
| input_9opt | * | — | |
| _ignore_opt | INTERNAL | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| * | * | — |
| * | * | — |
| * | * | — |
| * | * | — |
| * | * | — |
| * | * | — |
| * | * | — |
| * | * | — |
| * | * | — |
| * | * | — |