ComfyUI Node

SamplerClyb_BDF

A one-eval-per-step sampler with an angle-space trick

By Clybius·Created about a year ago·Updated about a month ago· 13
SamplerClyb_BDF
    • SAMPLER
    scalaratan2sin+projection
    eta1.00
    s_noise1.00

    "BDF" here stands for backward-differentiation-formula-style, which sounds like a textbook you'd rather not open. What it actually means is friendlier than the name: this sampler does roughly one model evaluation per step, then refines the result using a synthetic prediction at a midpoint, and stabilizes the blend with some linear algebra. It's the author's take on getting high-order-solver quality from a near-one-eval-per-step budget on flow models - Chroma, FLUX, SD3.

    How it works

    At each step it works with two predictions:

    1. A denoised estimate at the current sigma - and here's the trick, it caches the previous step's denoised result and reuses it as the "first" prediction instead of re-evaluating the model. That's how the NFE count stays low.
    2. A second, refined prediction obtained by evaluating the model at an intermediate state between the first prediction and the noisy latent.

    Then it merges the two with one of three scalar fusions:

    • projection - projects the half-step prediction onto the line spanned by the refined prediction, forcing them to agree in direction. Cheap, stable, the "boring but reliable" option.
    • atan2sin - blends the two predictions in angle space using atan2(sin(…), cos(…)). This is the Chroma-flavored one; the same family of math shows up in the pack's guidance node.
    • atan2sin+projection (default) - does the angle-space blend then projects it back into the line of the refined prediction. Both stabilizations, and why it's the default: on a test image it's the least likely to drift.

    For flow-matching models the sampler switches to a flow-aware ancestral update (using alpha_ip1/alpha_down/renoise_coeff instead of the classic sigma_up noise injection). It detects flow models automatically from the model's sampling config, so you don't manage that yourself.

    The inputs that matter

    • scalar (default atan2sin+projection) - the fusion mode above. When in doubt, leave it.
    • eta (default 1.0) - ancestral stochasticity. 0 is deterministic; lower values give cleaner, more repeatable output with slightly less variety. This is the knob to reach for first if you're getting noise artifacts.
    • s_noise (default 1.0) - global noise scaling. Leave it unless you know why you're moving it.

    Output is a SAMPLER - wire it into a KSampler's sampler input. The pack also registers it as the string clyb_bdf in the standard KSampler dropdown, so you can use it without the node if you prefer names over cables.

    Installing

    Part of the ComfyUI-ClybsChromaNodes pack; nothing extra to install:

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/Clybius/ComfyUI-ClybsChromaNodes.git
    # restart ComfyUI
    

    Or ComfyUI Manager → search "ComfyUI-ClybsChromaNodes". No model files are downloaded - the pack is pure code by Clybius (the Chroma-GGUF maintainer), aimed at Lodestone Rock's Chroma and compatible flow architectures.

    Common issues

    The default fusion is the safest; switch to projection if atan2sin ever looks over-cooked or structurally weird on a subject-heavy image. And remember the ancestral-sampler rule: with eta above 0 this is not a converging sampler, so adding steps changes the image rather than refining it - change one variable at a time on a fixed seed when you're comparing.

    Categorysampling/custom_sampling/samplers

    Inputs (3)

    NameTypeDefaultDescription
    scalarCOMBOatan2sin+projection3 options: projection, atan2sin, atan2sin+projection
    etaFLOAT1.000–100
    s_noiseFLOAT1.000–100

    Outputs (1)

    NameTypeDescription
    SAMPLERSAMPLER