Nodes/comfyui-sampler-peek/Sampler Peek (Advanced)
ComfyUI Node

Sampler Peek (Advanced)

Extended SamplerCustomAdvanced that decodes intermediate latents using a VAE at specified steps, with optional step-dependent CFG. Useful for visualizing the sampling process or creating step-by-step animations.

By Prohect·Created 2 months ago·Updated 2 months ago· 0
Sampler Peek (Advanced)
  • noise
  • guider
  • sampler
  • sigmas
  • latent_image
  • vae
  • output
  • denoised_output
  • preview_images
  • step_indices
decode_expr
start_step1
end_step0
max_previews0
cfg_expr
Categorysampling/peek

Inputs (11)

NameTypeDefaultDescription
noiseNOISENoise source for sampling
guiderGUIDERGuider (e.g., CFGGuider)
samplerSAMPLERSampler to use
sigmasSIGMASSigmas schedule
latent_imageLATENTLatent image to sample from
vaeVAEVAE model for decoding intermediate latents
decode_exprSTRINGExpression that determines when to decode. Variables: step (1..n), n (total steps). e.g., 'step % 5 == 0'. Empty = every step.
start_stepINT11–10000Only decode at or after this step (1-based)
end_stepINT00–10000Only decode at or before this step. 0 = no limit
max_previewsINT00–10000Max previews to store in RAM. 0 = unlimited
cfg_exproptSTRINGStep-dependent CFG expression. Evaluated at each step to dynamically set the guider CFG. Variables: step, n. e.g., 'clamp(1 + step / n * 7, 1, 8)' for a linear ramp. Empty = use the guider's default CFG.

Outputs (4)

NameTypeDescription
outputLATENTFinal sampled latent (with optional step-dependent CFG applied)
denoised_outputLATENTFinal x0 prediction
preview_imagesIMAGEBatch of decoded preview images from intermediate steps
step_indicesINTStep indices (1-based) for each preview image