Nodes/ComfyUI/SamplerLMS
ComfyUI Node Runs on cloud

SamplerLMS

The old default that lost its crown — and why

By Comfy-Org·Created 4 years ago·Updated about an hour ago· 129,943
SamplerLMS
    • SAMPLER
    order4

    SamplerLMS is Linear Multistep Sampling - the k_lms from the early Stable Diffusion days, resurrected as a custom-sampling building block. If you've been around since 2022 you remember it as one of the go-to samplers. If you started with ComfyUI in the last couple of years, you've probably never touched it, and honestly, that's fair. It's not broken; it's just been outclassed. This one's for compatibility with old workflows, for curiosity, and for the rare case where a shared graph explicitly asks for it.

    How it works

    Most samplers estimate the next step from the current point alone. LMS instead keeps a short memory: it remembers the last order denoising directions and fits a linear multistep through them, using linear_multistep_coeff to weight each remembered direction. More history means each step is a better-informed estimate, so it gets more out of fewer steps than plain Euler.

    That's what the single input controls:

    • order (default 4, 1-100) - how many previous steps it remembers. The default 4 is the sweet spot; bumping it to 8-10 buys you marginal accuracy for a little more compute and, past a point, some instability. Leave it alone unless you're experimenting.

    Output is one SAMPLER, wired into SamplerCustomAdvanced. It's deterministic and it converges - same seed gives the same image, and extra steps stop changing things. That makes it genuinely useful for the debugging discipline of changing one variable on a fixed seed.

    The history bit

    LMS was a workhorse in mid-2022, but the community moved on fast. A well-upvoted sampler comparison from that era ends with someone announcing "I'm ditching k_lms, what a waste of cycles" - Euler and DDIM converged quicker at low step counts, and then DPM++ 2M showed up and became the SD 1.5/SDXL default that LMS never was. The sampler knowledge base now lists DPM++ 2M Karras as the DDPM-style default, with LMS sitting in the long tail. None of that means it's bad - it's just the sampler equivalent of a perfectly serviceable car nobody buys anymore.

    Where people get burned

    • Don't expect magic at 4 steps. LMS is fine at low step counts but it's not a distilled-model schedule; on a Turbo/Lightning checkpoint you'll get the usual oversaturated artifacts. Use the schedule those models were trained with.
    • Very high order can wobble. The multistep memory assumes a smooth trajectory; push it to 20+ and the fit can ring. There's a reason the default is 4.
    • Check it's actually doing what you want. Because it converges, two images with the same seed but different step counts should look similar - if they diverge wildly, something else in your graph (noise, scheduler) changed, and LMS will happily tell you the truth about that.

    Ships with ComfyUI core, nothing to install. You'll likely never make it your daily driver, but it's a good, honest, deterministic reference sampler to have around.

    Categorymodel/sampling/samplers

    Inputs (1)

    NameTypeDefaultDescription
    orderINT41–100

    Outputs (1)

    NameTypeDescription
    SAMPLERSAMPLER