EasyUnSampler(unsampler)
EasyUnSampler runs a sampler in reverse to progressively add noise to a latent instead of denoising it.
unsampler
EasyUnSampler runs a sampler in reverse to progressively add noise to a latent instead of denoising it. It is useful for creating noised latents for img2img-style variations, inpainting, analysis, or as the input to another sampling pass.
Description
EasyUnSampler takes the latents, positive/negative conditioning, and model from a pipeline, then walks the sampling process backward for a given number of steps. The result is a more-noised latent that can be passed to a normal sampler, allowing control over the amount of noise reintroduced.
Inputs
-
steps: The number of inverse sampling steps to run. The value should usually match the step count used in the corresponding forward sampling pass.
Default: 20, Min: 1, Max: 10000. -
end_at_step: The step at which the unsampling should stop. A value of
0runs through all steps, producing the most-noised result. A higher value ends the process early, producing a less-noised latent.
Default: 0, Min: 0, Max: 10000. -
cfg: The classifier-free guidance scale used during unsampling. Use
1.0to disable guidance.
Default: 1, Min: 0, Max: 100. -
sampler_name: The sampler to use for the inverse process. This accepts the same sampler names available elsewhere in ComfyUI.
-
scheduler: The scheduler to use for the inverse process. This accepts the same scheduler names available elsewhere in ComfyUI.
-
normalize:
disableorenable. When enabled, the resulting latent is normalized after unsampling. This can help keep the latent values stable before another sampling pass. -
pipe: An optional
PIPE_LINEinput containing the model, conditioning, and latent. If given, its values are used unless overridden by the individual optional inputs below.
Optional. -
optional_model: An optional model to use instead of the one supplied by
pipe.
Optional. -
optional_positive: An optional positive conditioning input to use instead of the one supplied by
pipe.
Optional. -
optional_negative: An optional negative conditioning input to use instead of the one supplied by
pipe.
Optional. -
optional_latent: An optional latent to begin unsampling from instead of the one supplied by
pipe.
Optional.
Outputs
-
PIPE_LINE: The updated pipeline, including the unsampled latent. If a
pipewas provided, it is returned with the new latent and related values. If only individual inputs were provided, a pipeline is assembled from those values. -
LATENT: The resulting unsampled latent.
Usage Notes
- You can supply all values through the
pipeinput, or provideoptional_model,optional_positive,optional_negative, andoptional_latentindividually. When both are supplied, the individual optional inputs take precedence. end_at_step = 0runs the entire unsampling process. To introduce less noise, setend_at_stepto a step number closer to the current state of the latent.- The output
LATENTis typically connected to a normal sampler to continue generating an image from the noised latent. normalizeis useful when the unsampled latent will be used inside another pipeline that assumes normalized latent values.
Comments
Sign in with GitHub to join the discussion.