Nodes/ComfyUI-XJNodes/Scheduler Adapter
ComfyUI Node

Scheduler Adapter

Stop hand-picking sigmas, let the workflow decide

By alexjx·Created 10 months ago·Updated 4 months ago· 0
Scheduler Adapter
    • scheduler
    scheduler

    The scheduler is the schedule of noise levels (sigmas) your sampler walks down, and it's usually the least-considered setting in a workflow - most people set karras once and move on. But if you're building workflows where the scheduler needs to change based on what's being generated, or you're composing a preset system, you hit the same wall as with samplers: the scheduler is a widget, not a wire. XJSchedulerAdapter is the counterpart to the pack's Sampler Adapter - a dropdown that hands the chosen scheduler out as a value you can route into any KSampler's scheduler input.

    Mechanically it's a straight passthrough. The node pulls ComfyUI's canonical scheduler list straight from comfy.samplers.KSampler.SCHEDULERS, so you get exactly the nine your build ships: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, normal, linear_quadratic, and kl_optimal. Pick one, and the output feeds the scheduler socket. That's the whole thing. No math, no state, no hidden behavior - the value you selected is the value that comes out.

    Inputs and outputs, all of them:

    • scheduler - the nine-option dropdown, in the same order ComfyUI itself lists them.
    • Output: scheduler, a value sized for KSampler / KSamplerAdvanced / SamplerCustomAdvanced's scheduler input.

    When it actually helps: when scheduler choice needs to be data. A common pattern is pairing it with the pack's Sampler Adapter so both sampler and scheduler travel together through a workflow - swap one preset node and the whole sampling character changes. Or you feed a scheduler from metadata back into a regenerated run, which is one of those things that sounds niche until you're doing systematic sweeps and realize the widgets won't cooperate.

    Installing is the same pack-wide story:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexjx/ComfyUI-XJNodes
    

    Restart ComfyUI; the node lives under XJNodes/util. Or use ComfyUI Manager and search "ComfyUI-XJNodes". There are no models to download and no Python dependencies beyond what stock ComfyUI already has - requirements.txt is empty.

    Worth saying plainly: this is a tiny personal-use pack, and the adapter is a convenience, not a necessity. If the only scheduler you ever want is karras, the widget is already right there. But if you're building a workflow where scheduling becomes part of the logic - or you want to see that beta and exponential behave wildly differently at high steps - this is the cleanest way to make it scriptable.

    CategoryXJNodes/util

    Inputs (1)

    NameTypeDefaultDescription
    schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3

    Outputs (1)

    NameTypeDescription
    schedulersimple,sgm_uniform,karras,exponential,ddim_uniform,beta,normal,linear_quadratic,kl_optimal