Sigmas Noise Inversion
The two schedules an unsample-then-resample pass needs
- sigmas
- sigmas_fwd
- sigmas_rev
RES4LYF's flagship img2img trick is noise inversion: instead of just adding fresh noise to an image and denoising it back (the usual img2img approach), you run the image forward through the sampler in reverse - "unsampling" - to recover the noise that would have produced it, then sample forward again from that noise, optionally with a new prompt or guide. Done right, this preserves far more of the original image's structure than a bog-standard denoise pass. Done with mismatched schedules, it does nothing useful at all - which is exactly the problem this node exists to solve.
The node's own description says it plainly: it's for use with unsampling, and you connect its two outputs to the two different stages of that pipeline.
How it works
You give it one sigmas schedule, and it hands back two: sigmas_fwd, which goes to the unsampling node (the first, reverse pass that recovers noise from your image), and sigmas_rev, which goes to the sampling node (the second, forward pass that denoises back into a picture). The two are built to be consistent with each other - mirror images of the same schedule, arranged so that what the first pass undoes, the second pass can properly redo, instead of you having to hand-flip a schedule and hope the math lines up.
This connects directly to how RES4LYF's samplers are set up for the technique: in ClownsharKSampler and SharkSampler, there's a sampler_mode setting with three states - standard for ordinary generation, unsample for the first pass, and resample for the second. Both non-standard modes disable ComfyUI's own noise injection internally, which is essential for the inversion math to hold together. If you're unsampling with no conditioning at all, the pack's own advice is to leave CFG at 1.0 rather than something higher.
The inputs and outputs that matter
One required input, sigmas - your base schedule, generated however you'd normally build one (a scheduler node, or another Sigmas- node in this pack). Two outputs: sigmas_fwd and sigmas_rev, wired respectively into the unsampling sampler and the resampling sampler in your two-stage graph.
Installing it
ComfyUI Manager: search RES4LYF, install, restart. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt
(embedded pip.exe on portable builds). Restart and hard-refresh (F5) afterward.
Where people get tripped up
The single most common mistake is wiring the outputs to the wrong stage, or forgetting to set sampler_mode to match - plug sigmas_fwd into a sampler still set to standard and you're not unsampling at all, you're just running a regular pass with an odd schedule, and the whole technique quietly fails to do what you wanted.
The second is CFG. If you're unsampling without any real conditioning hooked up, leave CFG at 1.0; cranking it up on the unsampling pass fights against the noise-recovery math rather than helping it. Get the mode and the CFG right together, and the two schedules from this node do the rest.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sigmas | SIGMAS | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sigmas_fwd | SIGMAS | — |
| sigmas_rev | SIGMAS | — |