Nodes/Restart Sampling/RestartScheduler
ComfyUI Node

RestartScheduler

Where restart segments become visible

By ssitu·Created 3 years ago·Updated 9 months ago· 89
RestartScheduler
  • model
  • sigmas_opt
  • SIGMAS
steps20
scheduler
segments[3,2,0.06,0.30],[3,1,0.30,0.59]
restart_scheduler
denoise1.00
start_at_step0
end_at_step10000

The dropdown restart nodes hide all the machinery. If you build in ComfyUI's custom sampling section - SamplerCustom, KSamplerSelect, scheduler nodes wired into SamplerCustomAdvanced - RestartScheduler is the piece that makes restart sampling explicit. It's the scheduler side of the pack's custom-sampling pair (its partner is RestartSampler, below), and it works exactly like the other scheduler nodes you already know: you feed it a model and it hands you SIGMAS. The difference is the sigmas it hands you have restart segments baked in.

Here's the trick that makes the whole design work: a restart segment in a sigma list is just noise levels going back up. A normal schedule only ever decreases - 10, 5, 2, 1, 0. With restarts inserted, it reads 10, 5, ... 0.3, 0.06, then jumps back up to 0.3 and comes down again. RestartScheduler builds that zig-zag for you, and RestartSampler (or any node that can spot the climb) recognizes it and re-injects the matching noise. That's why this node works with the wider custom sampling ecosystem: the segment data travels inside the sigmas, not in some side channel.

The inputs

model, steps, scheduler (the ten-choice main schedule), segments (the [N_Restart, K, t_min, t_max] string, prefilled with the pack default), restart_scheduler (the schedule used inside the restart stretches - the paper used karras), plus denoise, start_at_step, and end_at_step for slicing. The optional sigmas_opt input is the one that changes behavior:

  • Connect sigmas to sigmas_opt and the node uses those as the main schedule - steps and scheduler stop having any effect, which the README states outright.
  • With connected sigmas, denoise can't add or remove steps either. It can only shorten the sigmas you pass in.

So think of sigmas_opt as "give me a main schedule from somewhere else, just inject the restarts." That's the mode to use when your main schedule comes from a custom scheduler node or a distilled-model schedule and you don't want the pack recomputing it.

When you'd actually use this

Only in custom sampling graphs. If you just want restart images without the ceremony, the plain KSampler With Restarts nodes do everything internally. You go to the custom pair when you're already in SamplerCustom-style territory - chaining a specific sampler object, feeding in your own sigmas, or building a workflow that needs the schedule as a first-class object. One nice debugging perk: because the schedule is a visible object here, connecting this node to a sigmas viewer makes the restart zig-zags impossible to miss, which is genuinely educational the first time you see it.

Install is the standard pack routine - no dependencies, no models:

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

Restart ComfyUI (or Manager → search "Restart Sampling"). The node lives under sampling/custom_sampling/schedulers, and it must be paired with RestartSampler on the sampler side - feeding its sigmas to a plain SamplerCustom schedule input won't re-inject noise, since nothing downstream is looking for the climbs.

Categorysampling/custom_sampling/schedulers

Inputs (9)

NameTypeDefaultDescription
modelMODEL
stepsINT201–10000
schedulerCOMBO10 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +4
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
denoiseFLOAT1.000–1
start_at_stepINT00–10000
end_at_stepINT100000–10000
sigmas_optoptSIGMAS

Outputs (1)

NameTypeDescription
SIGMASSIGMAS