Latent Extract State Info
Read where a RES4LYF sampler left off
- latent
- sigmas
- sigmas_remaining
- sigma_next
- end_step
- sampler_mode
- completed
RES4LYF latents can carry more than pixels - after a partial sampling pass, they remember where the sampler was: which sigma it stopped at, what schedule it was on, whether it finished. Latent Extract State Info pulls that hidden state back out so you can read it and, crucially, hand it to the next sampler. It's the glue behind the pack's "chainsampler" trick, where you run one sampler for part of the schedule and a different one for the rest.
Why would you split sampling like that? Because different solvers have different strengths at different points in the trajectory - you might want a converging multistep sampler to lock the composition early, then switch to a substep sampler for the detail pass, all on one continuous schedule. To do that cleanly, the second sampler needs to know exactly where the first one stopped: the remaining sigmas, the next sigma, the step index. This node reads all of that from the latent so you don't have to reconstruct it by hand. It's a plumbing/utility node - invisible in the final image, essential to the technique.
How it works
You feed it a LATENT that came out of a RES4LYF sampler mid-schedule. It inspects the state embedded in that latent and breaks it out into separate typed outputs you can wire wherever they're needed.
The inputs and outputs that matter
One input, six outputs. The input:
latent(LATENT) - a partially-sampled RES4LYF latent.
The outputs, all read straight from that state:
sigmas(SIGMAS) - the schedule the latent was sampled on.sigmas_remaining(SIGMAS) - the part of the schedule still to go. This is the one you feed the next sampler to continue where the last left off.sigma_next(SIGMAS) - the exact next sigma value.end_step(INT) - the step index it stopped at.sampler_mode(STRING) - which mode (standard/unsample/resample) it was in.completed(BOOLEAN) - whether the schedule actually finished, handy for a logic branch.
How to install it
ComfyUI Manager: search RES4LYF, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt
then restart and hard-refresh (F5). Nothing to download.
Common issues & troubleshooting
The outputs are empty or wrong. This only works on a latent that actually carries RES4LYF sampler state. Feed it a plain latent from EmptyLatentImage or a VAE encode and there's nothing to extract. The source has to be a partial pass from one of the pack's samplers.
sigmas_remaining doesn't line up when I continue. Make sure the next sampler is set to continue, not restart - feed it sigmas_remaining (not a fresh schedule), keep the same seed/noise handling, and match the sampler mode. Handing it a brand-new full schedule defeats the point.
Not sure if it finished. That's exactly what completed is for - branch on it rather than guessing from the step number.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| sigmas | SIGMAS | — |
| sigmas_remaining | SIGMAS | — |
| sigma_next | SIGMAS | — |
| end_step | INT | — |
| sampler_mode | STRING | — |
| completed | BOOLEAN | — |