Nodes/ComfyUI Easy Use/EasyUnSampler
ComfyUI Node Runs on cloud

EasyUnSampler

Img2img with two dials instead of one

By yolain·Created 3 years ago·Updated 12 days ago· 2,647
EasyUnSampler
  • pipe
  • optional_model
  • optional_positive
  • optional_negative
  • optional_latent
  • pipe
  • latent
steps20
end_at_step0
cfg1.00
sampler_name
scheduler
normalize

Regular img2img gives you one knob: denoise strength. Turn it up, more of the source image gets thrown away; turn it down, less does. easy unSampler gives you two - CFG and step count - and that extra dimension is the whole reason to reach for it instead of a plain VAE-encode-into-KSampler pipeline. It runs a sampler backwards: instead of walking noise down to an image, it walks a clean image up into noise, guided by your actual model and prompt rather than a fixed formula. Feed that noise back into a sampler and you land close to your source; nudge the prompt on the way back and you get something structurally similar but shifted by whatever you changed.

Why you'd reach for it

Whenever a single denoise slider feels too blunt. Style transfer while keeping the same pose and composition, restyling a batch of source images consistently, or any workflow where you want fine control over how much structure survives versus how hard the prompt gets to push back. It's also the mechanism behind a lot of the "img2img but better" workflows people share for Flux and Z-Image these days - sometimes under fancier names like RF-inversion - and Easy-Use has had a version of it in the pack for years under this plainer one.

How it works

Diffusion models are trained by taking a clean image, adding noise to it across a schedule, and learning to predict and remove that noise at each step. Unsampling runs that forward-noising process, but conditioned on your prompt - so what comes out isn't random static, it's the noise consistent with your conditioning at whatever point in the schedule you asked for. The two dials interact predictably: CFG near 1 reproduces almost your exact source image, and pushing CFG up lets the prompt influence the output more strongly - same idea with steps/end_at_step, where a smaller step-back keeps more of the original structure intact.

The inputs and outputs that matter

Being an Easy-Use node, it works through the pack's pipe convention: connect the pipe output from a loader like easy a1111Loader or easy fullLoader and it pulls model, positive, negative and latent straight out of it. If you're not using a pipe, wire optional_model, optional_positive, optional_negative and optional_latent directly instead - any of those overrides the matching piece of an incoming pipe too, which is handy if you want to unsample with a different model than the one you'll resample with.

The settings that actually matter:

  • steps (default 20) and end_at_step (default 0) - how far the noising process runs. end_at_step at 0 walks all the way back to pure noise; a higher value stops partway, preserving more of the source structure. This is the value you'll match against your downstream sampler's start step - more on that below.
  • cfg (default 1) - near 1 gives you a faithful round trip; raise it once you understand your baseline and want the prompt to bite harder.
  • sampler_name / scheduler - match whatever you're using on the resampling pass, so the noise you generate is consistent with how it'll be removed.
  • normalize - normalizes the resulting latent; leave it off unless a downstream node specifically expects normalized noise.

Outputs are an updated pipe (with the new noised latent slotted in) and the raw latent on its own - wire either into your next sampler, typically a KSampler (Advanced) with noise-adding turned off.

How to install it

ComfyUI Manager: search ComfyUI Easy Use, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use

Windows: double-click install.bat. Linux/Mac: pip install -r requirements.txt. Restart ComfyUI. Nothing to download and no heavy dependency here - it's the sampler math you already have running backwards, so there's no extra VRAM cost beyond a normal sampling pass.

Common issues & troubleshooting

The recurring point of confusion, and it comes up in threads about unsampling generally, is matching end_at_step to the right value downstream. Because this node runs backwards, its end_at_step lines up with the start step of the KSampler (Advanced) that receives its output - set them equal and you're on solid ground before experimenting further. If you're feeding a raw latent output rather than a pipe, also make sure the receiving sampler isn't adding fresh noise on top of what you just generated; you supplied the noise, so let the sampler use it as-is.

Second: don't expect surgical edits. People who try this for "same image, but change one specific thing" hit the same wall - push the prompt hard enough to change the one detail and you often lose the composition too, or push too gently and get the source back unchanged. This technique suits a global style or mood shift better than a targeted fix; for that, a mask and an inpainting pass will serve you better. And keep cfg and steps matched between the unsample and resample passes for a predictable baseline before you start pushing values around.

CategoryEasyUse/Sampler

Inputs (11)

NameTypeDefaultDescription
stepsINT201–10000
end_at_stepINT00–10000
cfgFLOAT1.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
normalizeCOMBO2 options: disable, enable
pipeoptPIPE_LINE
optional_modeloptMODEL
optional_positiveoptCONDITIONING
optional_negativeoptCONDITIONING
optional_latentoptLATENT

Outputs (2)

NameTypeDescription
pipePIPE_LINE
latentLATENT