ComfyUI Node

RemRun JSON

Fire a Whole Workflow at the Remote Machine

By LatentRat·Created 2 years ago·Updated 9 months ago· 12
RemRun JSON
  • input_0
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
remote_urlhttp://127.0.0.1:8189/
total_timeout90.0
request_timeout45.0
serializationfancy_safetensors
JSON
max_size_mb32
gzip_compressionfalse
gzip_level9
lazily_transferfalse
skip_lazy_transfer_under_mb0.3
responsebinary
ws_compressionfalse
forward_progress_messageson
is_changedfalse

The visual way to use this pack is RemRun Input Graph(s) - wire nodes into it and let it figure out what to ship. RemRun JSON is the same idea one level down: instead of pointing at nodes in your graph, you hand it a complete workflow JSON and it runs that on the remote instance. If the Input node is the friendly wrapper, this is the engine underneath it. The Input node literally builds a RemRun JSON node behind the scenes when you hit run.

So when would you touch it directly? When your workflow is already JSON. You've got an exported API-format workflow from the remote machine, or you're scripting runs and want to construct prompts programmatically rather than drag wires around. It's also the escape hatch when the visual graph can't express what you want - the JSON is the ground truth.

How it works

You paste the workflow JSON into the JSON string input. The node parses it, then walks the JSON looking for the pack's internal Deserializer nodes - if your JSON contains one with a deserializer_config, the node serializes the matching input_N values locally, stuffs them into the JSON, and optionally gzips them. It then POSTs the whole thing to the remote's /api/prompt, opens a websocket, waits for the serialized output, and hands it back on its outputs.

Crucially, the JSON must contain a RAT_RemoteRunSerializerOut node for results to come back at all - the node checks for exactly one of those and raises an error otherwise. That's why hand-rolling this from scratch is not the beginner path. If you're writing JSON by hand, the pattern to copy is: a Serializer node at the output end, Deserializer nodes where you want local data injected, and an extra_output_ids list for side branches you also want to run remotely.

The inputs

The usual shared set - remote_url, total_timeout, request_timeout, serialization - plus the required JSON string. Then the tuning knobs: max_size_mb, gzip_compression/gzip_level, lazily_transfer, skip_lazy_transfer_under_mb, response (binary or base64_result), ws_compression, forward_progress_messages, is_changed. Up to ten wildcard inputs, ten wildcard outputs.

The two that matter day one: remote_url (default http://127.0.0.1:8189/, another instance on the same box) and JSON (the workflow). max_size_mb defaults to 32 and will abort the run with a loud error if the serialized payload blows past it - raise it for video latents.

Install and gotchas

Both machines need the pack:

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

restart, and it's in the Remote Run menu (or use ComfyUI Manager, "comfy_remote_run"). Only websockets and requests are needed.

The failure modes are mostly JSON-shaped. Missing or duplicate Serializer node in the JSON → hard error, by design. serialization set to something the JSON wasn't built for → deserialization error on the far side. And the same client-connection rule as everywhere in this pack: the binary response path needs a live ComfyUI session on the local machine to receive the websocket message, so pure API automation will want the base64 response or a connected browser. Start with a workflow this pack exported itself rather than one you've written from scratch - you'll save yourself an hour of debugging the invisible bits.

CategoryRemote Run

Inputs (24)

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
JSONSTRING
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
is_changedoptBOOLEANfalse

Outputs (10)

NameTypeDescription
**
**
**
**
**
**
**
**
**
**