Nodes/SimpleSyrup/Noise Inversion Options
ComfyUI Node

Noise Inversion Options

Start from your image's own noise instead of a seed

By Artificial-Sweetener·Created 5 months ago·Updated 3 days ago· 4
Noise Inversion Options
  • options
  • options
◄inversion_methodeuler►
◄inversion_resolution_scale0.50►
◄inversion_steps2►
◄inversion_switch_fraction0.75►
◄inversion_finishing_steps1►

Normally img2img starts from fresh random noise and a partially denoised latent. Noise inversion does the opposite: it walks the denoising process backwards from your image, working out the noise that would have produced it, and hands that to the sampler as the starting point. In the community this is unsampling, or DDIM inversion, and the intuitive version is: instead of subtracting a little predicted noise per step, you add it, until you're standing at a noise level the model can rebuild from.

If you've used the Unsampler node or A1111's Tiled Diffusion noise-inversion option, that's the idea. The reason it's worth a node here is that the expensive version - 20 or 30 full-resolution inversion steps to get a faithful reconstruction - costs roughly as much as the generation itself. SimpleSyrup's default recipe inverts at half resolution for two steps and then finishes at full size for one. Cheap enough to leave on while you experiment.

The source is whatever latent you feed the KSampler - in practice a VAE Encode of the image you're editing. This node itself only carries settings; there's no image input on it.

How it works, and the shape of the recipe

Inversion runs as two stages:

  1. A coarse stage at inversion_resolution_scale of your dimensions (0.5 by default, i.e. quarter the pixels) that walks up to inversion_switch_fraction of the target noise level.
  2. A full-resolution finish of inversion_finishing_steps that takes that state the rest of the way, so the noise you hand the sampler actually matches the latent's real size.

inversion_method is the integrator for both stages, and the only two options are euler (one model evaluation per step) and heun (two, more accurate, twice the price). Every inversion step is a real denoiser pass, which is exactly why the coarse stage exists.

The knobs:

  • inversion_steps - default 2, and 0 disables all inversion, including the finishing stage. So a disabled node passes the chain through untouched rather than doing anything clever.
  • inversion_resolution_scale - 0.01 to 1. Push it to 1 and you're paying full price for fidelity; leave it low and the starting noise is approximate, which is often all you need for texture-preserving img2img.
  • inversion_switch_fraction - where the coarse stage hands over, as a fraction of the target noise level. 0.75 means 75 percent.
  • inversion_finishing_steps - set it to 0 and the whole inversion finishes at the reduced size.

Output is the usual options socket: chain it into another options node or straight into KSampler (SimpleSyrup).

Install

Same pack, same two paths. Manager → Node Pack list → search SimpleSyrup → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Artificial-Sweetener/SimpleSyrup.git
cd SimpleSyrup
python -m pip install -r requirements.txt

Run that pip line with the interpreter ComfyUI itself uses. SimpleSyrup needs a current ComfyUI (v3 extension API) or the nodes won't appear at all.

Where it breaks

  • You need denoise below 1. Inversion only makes sense when you're starting partway into the schedule. On a flow model, a full-noise endpoint raises "Flow noise inversion requires denoise below the full-noise endpoint," and the same check rejects a start sigma of zero. If you want a from-scratch generation, drop the node - it has nothing to invert toward.
  • Not every model works. The sampler requires a flow or EPS-compatible image model and refuses img2img-style sampling objects outright.
  • Don't set a full-size finish with a 100 percent transition. resolution_scale below 1 with finishing_steps greater than 0 and switch_fraction of exactly 1 raises "A full-size finish requires a transition below 100%" - there'd be nothing left for the finish to do.
  • It's not free and it's not cached. Each inversion stage is measured and logged: steps, evaluations, seconds, plus the reconstruction error of the inversion itself. If a run got noticeably slower after you added this node, that's the correct explanation, and euler at a lower resolution_scale is your first lever.
  • Wrong-looking results are usually a denoise problem, not an inversion problem. Inversion gives you fidelity to the source; how much the image is allowed to change is still denoise on the KSampler. Two steps of inversion does not make a 0.9 denoise into a gentle edit.
CategorySimpleSyrup/Sampling/Options

Inputs (6)

NameTypeDefaultDescription
inversion_methodCOMBOeulerApplies to both inversion stages; Euler uses one evaluation per step, Heun uses two for greater accuracy.
inversion_resolution_scaleFLOAT0.500.01–1Scales inversion width and height; 0.5 uses half-sized dimensions for lower cost.
inversion_stepsINT20–64Steps at the selected inversion resolution; 0 disables all inversion, including finishing. More steps cost more model evaluations.
inversion_switch_fractionFLOAT0.750.01–1Noise-level fraction reached before the full-resolution finish; 0.75 means 75%.
inversion_finishing_stepsINT10–64Full-resolution inversion steps after a reduced stage; 0 finishes entirely at reduced size.
optionsoptSIMPLE_SYRUP_SAMPLER_OPTIONSOptional preceding sampler options; bypass this node to omit its contribution.

Outputs (1)

NameTypeDescription
optionsSIMPLE_SYRUP_SAMPLER_OPTIONSCombined sampler options; connect another options node or KSampler.