Nodes/comfy_remote_run/RemRun Input Graph(s)
ComfyUI Node

RemRun Input Graph(s)

Run Half Your ComfyUI Graph on Another Machine

By LatentRat·Created 2 years ago·Updated 9 months ago· 12
RemRun Input Graph(s)
  • input_0
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • _ignore_
  • out_0
  • out_1
  • out_2
  • out_3
  • out_4
  • out_5
  • out_6
  • out_7
  • out_8
  • out_9
remote_urlhttp://127.0.0.1:8189/
total_timeout90.0
request_timeout45.0
serializationfancy_safetensors
max_size_mb32
gzip_compressionfalse
gzip_level9
lazily_transferfalse
skip_lazy_transfer_under_mb0.3
responsebinary
ws_compressionfalse
forward_progress_messageson
run_outputs_connected_to_inputsignore
inputs_when_locallazy
is_changedauto
run_syncfalse

Here's the situation this node exists for: your local GPU is fine for the cheap stuff, but the VAE decode for a video model eats more VRAM than the inference itself - genuinely true for Hunyuan and Wan. Meanwhile the second box with the big card sits there doing nothing. This is the node that splits the difference. Wire everything you want offloaded into it, and it ships that whole upstream chunk of your graph to a remote ComfyUI instance, runs it there, and hands the results back on its outputs.

That's the headline use case in the pack's own README: offload the text encoder and VAE to the remote machine, and let the local one do the sampling. People have been hunting for "vae decode from other pc" for years, and this is the open-source local way to get it.

How it works

The mechanism is genuinely clever, and worth understanding because it explains the install requirements. When the node executes, it grabs your entire prompt, isolates every node that feeds into it (stopping at any Remote Run Start markers), and replaces itself with an internal RemRun JSON node that:

  1. POSTs the trimmed subgraph to the remote instance's /api/prompt endpoint,
  2. opens a websocket to ws://<remote>/ws,
  3. waits for the serialized result to come back,
  4. deserializes it and returns it on out_0 through out_9.

Which means the remote machine needs this same pack installed, because the subgraph it receives is littered with the internal Serializer/Deserializer nodes that do the actual transfer. "Remote" also doesn't have to mean another computer - the default remote_url is http://127.0.0.1:8189/, i.e. a second ComfyUI instance on the same box. For a real second machine, point it at http://<its-ip>:8188 and make sure that instance is listening on the network.

The inputs that actually matter

  • remote_url - the remote instance. This is the one you must change.
  • serialization - how data travels. fancy_safetensors is the default and is fine for latents, conditioning, and images. unsafe_torch_pt is a plain torch .pt file with the widest compatibility - but it's arbitrary Python pickle, so only point it at a machine you fully trust. safe_torch_pt is a restricted subset of torch save that avoids the worst of that.
  • total_timeout - covers the whole send-and-run. Default 90 seconds; bump it hard for video, which routinely exceeds that. Set to 0 to disable.
  • request_timeout - just the POST of the prompt and data. Default 45s.

Then the tuning knobs most people eventually touch: max_size_mb (default 32) kills the run with a clear error if the serialized payload exceeds it; gzip_compression shrinks fat payloads; lazily_transfer makes big tensors travel only when the remote actually needs them. is_changed in auto mode re-runs the remote prompt when inputs change - you'll know it's misbehaving when the remote doesn't re-run even though you changed an input. Set it to run_every_time if you'd rather be safe than clever.

Install

On both machines:

cd ComfyUI/custom_nodes
git clone https://github.com/LatentRat/comfy_remote_run

Restart, done. ComfyUI Manager works too - search "comfy_remote_run". Dependencies are websockets and requests, no model downloads anywhere.

Common issues

Timeouts are the classic. Video jobs that run fine locally mysteriously die at 90 seconds when routed through this node - raise total_timeout first. Second classic: the run fails with a message about no client connected, because the binary response path needs a live browser session on the local machine, not just an API call. And if you expose either instance to the internet, remember ComfyUI's API is unauthenticated by default - anyone who can reach the port can execute workflows. Keep remote execution on your LAN, or behind something that actually authenticates.

CategoryRemote Run

Inputs (27)

NameTypeDefaultDescription
remote_urlSTRINGhttp://127.0.0.1:8189/ComfyUI instance URL
total_timeoutFLOAT90.00–86400Timeout for everything total (sending prompt and running) in seconds. 0 to disable.
request_timeoutFLOAT45.00.1–86400Prompt & data post timeout in seconds
serializationCOMBOfancy_safetensors3 options: safe_torch_pt, unsafe_torch_pt, fancy_safetensors
input_0opt*
input_1opt*
input_2opt*
input_3opt*
input_4opt*
input_5opt*
input_6opt*
input_7opt*
input_8opt*
input_9opt*
max_size_mboptINT320–8192
gzip_compressionoptBOOLEANfalse
gzip_leveloptINT91–9
lazily_transferoptBOOLEANfalse
skip_lazy_transfer_under_mboptFLOAT0.30–10240Even when lazily transferring inputs is enabled still always transfer inputs smaller than this size in MB directly.
responseoptCOMBObinary2 options: base64_result, binary
ws_compressionoptBOOLEANfalse
forward_progress_messagesoptCOMBOon2 options: on, off
run_outputs_connected_to_inputsoptCOMBOignore2 options: ignore, run
inputs_when_localoptCOMBOlazy2 options: lazy, disconnected
is_changedoptCOMBOauto run_every_time: Always treat as changed and re-run remote prompt every time. auto: When inputs_when_local is set to "disconnected" this should fix it not re-rerunning if the inputs changed. default_behaviour: Only rerun when inputs changed, this will not work correctly when inputs_when_local is "disconnected" as it can't detect changes then.
run_syncoptBOOLEANfalse
_ignore_optINTERNAL

Outputs (10)

NameTypeDescription
out_0*
out_1*
out_2*
out_3*
out_4*
out_5*
out_6*
out_7*
out_8*
out_9*