ComfyUI Node

Euler_A2_Sampler

Euler a, but it rolls the dice twice and averages

By Anzhc·Created 5 months ago·Updated 5 months ago· 7
Euler_A2_Sampler
    • SAMPLER
    eta1.00
    s_noise1.00
    extrapolation0.425

    Euler A2 is what you get when someone looks at Euler a's biggest flaw - the per-step noise that makes it creative but grainy and stubbornly non-reproducible - and thinks "just draw two noise samples and split the difference." It's an ancestral sampler, so it keeps the fresh-noise-at-every-step spirit of Euler a, but instead of one random draw it averages two, then pushes the result a bit further along their shared direction. The idea is less stochastic than Euler a without being as flat as plain Euler.

    Honest disclosure before you get excited: this is a tiny, obscure pack. One node, one commit, a README that is literally two images and nothing else. Euler A2 gets essentially zero hits in the wider community, so you won't find a million word-of-mouth settings threads. You'll be tuning it yourself. The silver lining is that the code is short, readable, and completely self-contained - the README's silence doesn't cost you much.

    What it actually does

    Dive into the source and you'll find one function, sample_euler_a2, wrapped in a node that spits out a SAMPLER object. Per step it does the standard ancestral dance - denoise, step down the sigma ladder, re-noise - with one twist. Where stock euler_ancestral injects a single noise sample, this one draws two independent ones, builds a full path from each, and sets x = 0.5 * (path_1 + path_2). Averaging two independent Gaussians halves the noise variance, which is the whole trick: you keep the exploratory ancestral behavior but the image stops jittering as much between steps. Then the extrapolation knob pushes the averaged result further along the mean noise direction, as if to say "a little more of that, please."

    One side effect worth knowing: the pack registers euler_a2 into ComfyUI's global sampler list on import. So after install you'll also see it in a plain KSampler's sampler dropdown - with the hardcoded defaults. The node exists so you can actually reach the three knobs.

    The three inputs that matter

    All three are FLOATs, and this is one of those rare nodes where every input is worth touching:

    • eta (default 1.0) - the ancestral step-size control. At 1.0 you get the classic Euler-a behavior. Crank it toward 0 and you slide toward plain deterministic Euler; push it past 1 and you're removing more noise per step and re-adding more, which gets aggressive fast.
    • s_noise (default 1.0) - a straight multiplier on the injected noise. 0 makes the whole thing deterministic, so the averaging and extrapolation stop mattering and it collapses to Euler. Higher values restore the wildness you just averaged away.
    • extrapolation (default 0.425) - how far past the averaged path you push along the shared noise direction. This is the signature A2 move. The default is the author's own tuning from those README images; negative values push the other way, toward the average.

    The single output is a SAMPLER object. It doesn't take a model, sigmas, or latents itself - that's the custom-sampling pattern. Wire the SAMPLER into a SamplerCustomAdvanced node (or its cousins in the sampling/custom_sampling family), feed that model/positive/negative/sigmas, and decode the result as usual.

    Install

    Dead simple, because there are no dependencies to speak of - no requirements.txt, no model downloads, just Python over ComfyUI's internals:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Anzhc/Euler_A2_Sampler-ComfyUI
    

    Then restart ComfyUI (the sampler is registered at import time, so a full restart matters, not just a reload). Or use ComfyUI Manager and search for Euler_A2_Sampler-ComfyUI.

    Where people get burned

    Since there's almost no community lore on this one, the real traps are the generic ancestral-sampler ones, plus a couple of repo-specific facts:

    • It's non-converging. Same seed, same image - yes. But add steps and the image changes instead of refining, and you can't A/B two settings on a fixed seed the way you can with DPM++ 2M or plain Euler. Judge changes by vibe and batches, not single-seed diffs.
    • The internals are fragile by design. It reaches into comfy.k_diffusion.sampling and mutates ComfyUI's global sampler registry. That's the standard pattern for custom sampler packs, and it's exactly what breaks when ComfyUI refactors sampling internals. If a ComfyUI update suddenly makes this node error at load, that's the likely culprit.
    • On flow-matching models (Flux, Z-Image, Anima), ancestral Euler-family samplers are fine but the scheduler matters: stick with conservative ones like beta or simple, and don't drag in Karras.
    • The documentation is nonexistent. Two images, no license, no description. If defaults misbehave, the source (nodes.py, ~120 lines) is genuinely readable - worth an open before you blame the sampler.

    It won't replace your daily driver, and it's not going to dethrone the RES4LYF packs on the sampler leaderboard. But if you like Euler a's personality and wish it would stop fidgeting, this is a fun, honest experiment - and the extrapolation knob is something no stock sampler gives you.

    Categorysampling/custom_sampling/samplers

    Inputs (3)

    NameTypeDefaultDescription
    etaFLOAT1.000–100
    s_noiseFLOAT1.000–100
    extrapolationFLOAT0.425-10–10

    Outputs (1)

    NameTypeDescription
    SAMPLERSAMPLER