Nodes/Restart Sampling/KSampler With Restarts
ComfyUI Node

KSampler With Restarts

The full knob set, explained

By ssitu·Created 3 years ago·Updated 9 months ago· 89
KSampler With Restarts
  • model
  • positive
  • negative
  • latent_image
  • LATENT
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise1.00
segments[3,2,0.06,0.30],[3,1,0.30,0.59]
restart_scheduler
chunked_modetrue

This is the flagship of the restart sampling pack - the node its README describes first, and the one that gives you every restart control the author exposes. If you've read the Simple variant's writeup, think of this as Simple plus two extra knobs: a separate restart_scheduler and chunked_mode. Everything else - the segments string, the ODE-only constraint, the zero-dependency install - is identical.

The mental model is the same: you denoise normally, and at chosen points in the schedule the node re-noises your latent back to a higher noise level and re-denoises it, forcing the model to re-examine high-noise structure. The segments field defines those points, in [N_Restart, K, t_min, t_max] format, and it comes pre-filled with the sensible default [3,2,0.06,0.30],[3,1,0.30,0.59].

The two extra knobs

restart_scheduler - the scheduler used for the noise schedule inside the restart segments, separate from your main scheduler. The paper's researchers used the Karras scheduler in their experiments, so karras is the historically correct choice here; the Simple node, which reuses the main scheduler for restarts, is the author's pragmatic alternative. Your options: normal, karras, exponential, simple, ddim_uniform, sgm_uniform, simple_test. For a first try, leave it on karras and only touch it if you're chasing a specific look.

chunked_mode - how the sampler is invoked. When it's on (the default), the sampler is called with as many steps as it can run up to the next restart segment. When it's off, the sampler is called one step at a time. Why does that matter? Stateful samplers - second-order ones like dpmpp_2m, plus momentum samplers - carry state from previous steps, and that state is lost when they're called one step at a time. Chunked mode keeps them accurate.

Two honest caveats, both from the author himself. First, a chunked call with a wrapped sampler changes behavior, so results aren't byte-identical between the two modes. Second, if you're tempted to use dpmpp_2m with restarts because chunked mode now handles it: the README says SDE or momentum samplers with restart is likely not an improvement over normal sampling anyway. The technique is built for ODE samplers - euler, heun, dpmpp_2m being the standout name here - and that's where it pays.

The rest of the inputs

model, seed, steps, cfg, positive, negative, latent_image, denoise are all exactly what a KSampler gives you. One difference from the Simple node worth knowing: here the main scheduler dropdown is the full ten-choice list (it adds beta, linear_quadratic, kl_optimal), because the restart stretches have their own scheduler and no longer constrain the main one. Output is a single LATENT, wired into your VAE decoder like any sampler.

Installing and trying it

Same routine as the rest of the pack - no dependencies, no models to download:

cd ComfyUI/custom_nodes
git clone https://github.com/ssitu/ComfyUI_restart_sampling

Restart ComfyUI, or use Manager's Custom Nodes Manager and search "Restart Sampling". The nodes appear under sampling in the node menu.

The fastest way to decide whether this is for you: grab a 20-step euler/karras workflow on an SDXL checkpoint, keep the default segments, and toggle chunked_mode and the restart_scheduler a few times on a fixed seed. If you see a real quality bump for the extra steps, it's earning its place. If not, that's a legitimate finding too - restart sampling is a specific trick, not a free lunch. And if something looks off, COMFYUI_VERBOSE_RESTART_SAMPLING=1 dumps the node's full step plan to the console so you can see exactly where restarts fire.

Categorysampling

Inputs (13)

NameTypeDefaultDescription
modelMODEL
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.000–100
sampler_nameCOMBO24 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +18
schedulerCOMBO10 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +4
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
denoiseFLOAT1.000–1
segmentsSTRING[3,2,0.06,0.30],[3,1,0.30,0.59]
restart_schedulerCOMBO7 options: normal, karras, exponential, simple, ddim_uniform, sgm_uniform, +1
chunked_modeBOOLEANtrue

Outputs (1)

NameTypeDescription
LATENTLATENT