Nodes/RES4LYF/Latent Transfer State Info
ComfyUI Node Runs on cloud

Latent Transfer State Info

Reattach a chained sampler's hidden state to a new latent

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Latent Transfer State Info
  • latent_to
  • latent_from
  • latent

The simplest of RES4LYF's state-info utilities, and also the least flexible: Latent Transfer State Info takes the full hidden generation state off one latent and copies it wholesale onto another. No selective flags, no per-field toggles - everything RES4LYF's samplers attach to latent_from (step markers, the raw diffusion tensor, the noise schedule) lands on latent_to.

The situation this solves: RES4LYF's samplers can chain across multiple nodes, and the latent passed between chained stages carries more than the visible tensor - it carries where sampling should resume from. But somewhere in a graph, an operation can produce a "clean" latent that's lost that attached state (a node outside this pack that only understands plain tensors, for instance). This node re-attaches it, so the chain can keep going.

How it works

Two LATENT inputs, no other parameters. Whatever internal state lives on latent_from gets copied onto latent_to, and the result comes back out as a single latent carrying latent_to's visible content with latent_from's hidden state riding along.

The inputs and outputs that matter

  • latent_to (required) - the latent that receives the state. Its own visible content is what you'll see if you decode the output.
  • latent_from (required) - the latent whose state gets copied over.
  • Output: latent - latent_to, now carrying latent_from's state.

That's the entire schema - no optional inputs, no fine-grained control. If you need to replace only one piece of state rather than the whole thing, Latent-Replace-State-Info is the node with per-field toggles instead.

How to install it

Via ComfyUI Manager: search "RES4LYF" and install. Manually, from ComfyUI/custom_nodes:

git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt

Activate your venv first if you use one; on a portable install, swap pip for python_embedded\Scripts\pip.exe. Restart ComfyUI afterward.

Common issues & troubleshooting

You wanted latent_to's state to survive too. It doesn't - this is a full overwrite, not a merge. If you only need one field (say, just the noise schedule) replaced while everything else on latent_to stays put, use Latent-Replace-State-Info instead, which gates each field independently.

Neither input actually has RES4LYF state on it. This node only does something meaningful when at least latent_from came out of one of the pack's own sampler nodes. Feeding it two latents from Empty Latent Image or a plain VAE encode won't error, but there's nothing real being transferred.

No community write-ups exist for this node. It's obscure internal plumbing without a public troubleshooting trail. If a chained-sampler workflow using it misbehaves, the RES4LYF README's linked example workflows (start with "intro to clownsampling") are a better reference point than guessing from the node in isolation.

You're not sure why a latent would need its state "reattached" at all. That's the sign this node isn't the one you need yet - it exists specifically for advanced multi-stage sampler chains. On an ordinary single-sampler workflow you'll never touch it.

CategoryRES4LYF/latents

Inputs (2)

NameTypeDefaultDescription
latent_toLATENT
latent_fromLATENT

Outputs (1)

NameTypeDescription
latentLATENT