Nodes/ComfyUI-Wireless/Set Wireless (Latent)
ComfyUI Node

Set Wireless (Latent)

Move a latent across the graph without the long orange wire

By errew·Created 7 months ago·Updated 7 months ago· 2
Set Wireless (Latent)
  • latent
  • latent
keylatent_var

The orange-port Set node of ComfyUI-Wireless. Set Wireless (Latent) takes a LATENT on its input, stores it in the pack's in-process global dictionary under a key you choose, and passes the latent straight through on its output. A matching Get Wireless (Latent) anywhere on the canvas pulls that same latent back out with no wire between them.

Latents are the case where this node earns its keep most easily. A latent tensor is the big in-between artifact of a generation - sampler produces it, VAE Decode turns it into pixels - and in a workflow with refining, upscaling-in-latent, or multiple passes, that latent often has to travel from a sampler in one corner to a decoder or a second sampler somewhere else. Routing that orange wire across a packed canvas is exactly the spaghetti the pack exists to prevent. Since the value is just a Python object sitting in a dict, there's no serialization and no copy: the "zero latency" line in the README is literally true, and the Get node gets the same object the Set wrote.

As with every node in this family, the hidden link is the double-edged part. Cleaner canvas, yes - but you're trading a visible wire for a name you have to remember, and when a workflow breaks on a missing key, you debug by reading a ValueError instead of following a line. The pack's own answer to that is strict typing: a dedicated LATENT node keeps the orange port and its type matching intact, which is safer than funneling latents through the universal Any variant.

How it works

GlobalStore.set(key, latent) writes into the module-level _GLOBAL_CONTEXT dict, trimming whitespace from the key first (a stray space around your pasted key won't break the pairing). The node returns the latent unchanged - pass-through - so your linear chain keeps flowing, and because it's flagged as an output node it reliably runs when its inputs are ready. That pass-through output is also your ordering lever: leave it connected so ComfyUI knows the Set comes before the Get.

Inputs and outputs

  • key - the channel name (default latent_var). Must match the Get node's key exactly; case-sensitive, outer whitespace trimmed.
  • latent - a LATENT (the {'samples': tensor} dict ComfyUI samplers emit), e.g. from Empty Latent Image or a sampler.

Output: latent (LATENT) - the same latent, passed through. Wire it onward to keep the chain, or leave it dangling if the Get side is all you care about.

Installation

ComfyUI Manager - search "ComfyUI-Wireless" - or manually:

cd ComfyUI/custom_nodes/
git clone https://github.com/errew/ComfyUI-Wireless.git

Restart ComfyUI. The pack's requirements.txt is "Standard Python library only": no dependencies, no models.

Where people get burned

  • Execution order. Nothing but the pass-through wire tells ComfyUI the Get depends on this Set. If Get fires first you get "Key not found"; keep Set's output wired downstream to force the order.
  • Bypassed Set → stale latent. Mute or bypass this node and Get silently returns the latent from the last run rather than erroring. An output that decodes to something "old" with no error is the tell.
  • Shared keys across workflows. The dict is process-global and survives between runs of the same session. If two workflows both use latent_var, they'll step on each other. Restarting ComfyUI clears everything.
CategoryWireless

Inputs (2)

NameTypeDefaultDescription
keySTRINGlatent_var
latentLATENT

Outputs (1)

NameTypeDescription
latentLATENT