KSampler With Restarts (Custom)
Plug your own sampler in
- model
- sampler
- positive
- negative
- latent_image
- output
- denoised_output
Every other restart node in this pack makes you pick your sampler from a dropdown. This one doesn't: like ComfyUI's built-in SamplerCustom, KSampler With Restarts (Custom) takes a SAMPLER object as an input instead of a sampler name. That matters if you've built your sampler of choice with SamplerCustom-style plumbing - say a custom sampler node from another pack - and you want restart behavior wrapped around it without giving up your setup.
The rest of the input list is the Advanced node's: model, seed (noise_seed here, plus add_noise), steps, cfg, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, then the restart trio of segments, restart_scheduler, and chunked_mode. The scheduler dropdown stays a string selection because schedules are still generated internally; only the sampler is handed to you as an object.
One genuinely useful difference: this node outputs two latents, output and denoised_output - the final samples and the denoised estimate - mirroring SamplerCustom. If you've been chaining the denoised output into further processing in your custom sampling graphs, you can keep doing that with restarts enabled.
The caveat that comes with the freedom
The README is upfront about it: "it is possible to input samplers that don't work properly or are incompatible with Restart sampling like SDE and UniPC samplers." With the dropdown nodes the pack can filter to sane choices; here it can't see your object until runtime, so it trusts you. Restart sampling is an ODE technique - it re-injects noise at higher noise levels and expects the sampler to handle that gracefully. SDE samplers add their own noise on top, and UniPC-type high-order samplers aren't designed for noise level jumps, so results can come out degraded or plain wrong without any error. The author's own guidance: this is unlikely to be an improvement over normal sampling with those samplers.
In practice that means: if you feed in an euler- or heun-family sampler (or anything else that treats the sigma schedule as given), you get exactly the restart behavior you'd expect from the dropdown nodes. If you're determined to use dpmpp_2m, leave chunked_mode on - calling it one step at a time loses its second-order state. If you're feeding something exotic, do a side-by-side against the plain node on a fixed seed before you trust it.
Install and get going
Same trivial install as the rest of the pack - no requirements.txt, no model downloads:
cd ComfyUI/custom_nodes
git clone https://github.com/ssitu/ComfyUI_restart_sampling
Restart ComfyUI (or use Manager, search "Restart Sampling"). It's under sampling in the node menu. And if you don't already have a reason to be in custom-sampling territory, the simpler KRestartSampler gives you 90% of this without the SAMPLER plumbing - grab that first.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| add_noise | COMBO | 2 options: enable, disable | |
| noise_seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.000–100 | — |
| sampler | SAMPLER | — | |
| scheduler | COMBO | 10 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +4 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| start_at_step | INT | 00–10000 | — |
| end_at_step | INT | 100000–10000 | — |
| return_with_leftover_noise | COMBO | 2 options: disable, enable | |
| segments | STRING | [3,2,0.06,0.30],[3,1,0.30,0.59] | — |
| restart_scheduler | COMBO | 7 options: normal, karras, exponential, simple, ddim_uniform, sgm_uniform, +1 | |
| chunked_mode | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output | LATENT | — |
| denoised_output | LATENT | — |