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

Latent Clear State Info

Wiping RES4LYF's stashed metadata off a latent

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

RES4LYF's sampler nodes do more than just denoise - the README describes latent image guides, cropped guide regions, and unsampling/resampling workflows, and to make all of that work across a chain of nodes, the pack attaches extra bookkeeping ("state info") to the latent object itself, alongside the actual tensor. That's how a downstream node knows what region was guided, or what an earlier step in an unsampling chain already did. Latent Clear State Info is the node that strips that bookkeeping back off, handing you a plain latent with no RES4LYF metadata attached.

You reach for it when you want to reuse a latent in a fresh context without dragging along leftover state from wherever it came from - starting a brand-new generation from an old output, feeding a latent into a different guide setup than the one that produced it, or just cleaning things up if a chained sampler is behaving oddly and you suspect stale state info is the reason.

This node, its sibling Latent CropGuides State Info, and Latent Display State Info form a small family: one manages guide-crop state, one inspects it, and this one wipes it. The pack doesn't spell out the internals of what's actually stored, but the pattern across all three nodes is consistent enough to be confident about the intent.

Inputs and output

  • latent (LATENT) - required, the latent to clear.
  • Output: latent (LATENT) - the same tensor, state info stripped.

Nothing else to configure - it's a pass-through with a side effect on the metadata, not the pixel or tensor content itself.

Installing it

Bundled with the full RES4LYF pack:

  • ComfyUI Manager - search "RES4LYF," install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF, then cd RES4LYF && pip install -r requirements.txt, restart.

No extra downloads.

Common issues

Not sure if there's actually anything to clear. If your latent came straight from a fresh EmptyLatentImage and never passed through a RES4LYF guide or unsampling node, there's likely no state info attached in the first place - this node is a safe no-op in that case, not something that'll break a clean latent.

A chained sampler behaves unexpectedly after reusing an old latent. This is the classic symptom this node exists for - if you're feeding the output of one guided run into a new, unrelated pass and getting odd cropping or guide behavior you didn't ask for, try clearing state info first before debugging further downstream.

Wondering what state was actually there. Pair this with Latent Display State Info first if you want to see what's attached before wiping it - that node prints the state as a string so you can confirm what you're clearing rather than clearing blind.

CategoryRES4LYF/latents

Inputs (1)

NameTypeDefaultDescription
latentLATENT

Outputs (1)

NameTypeDescription
latentLATENT