Nodes/ComfyCollectorNodes/Float Lerp (CCN)
ComfyUI Node

Float Lerp (CCN)

The boring node that makes sweeps work

By valkymaera·Created 4 months ago·Updated 10 days ago· 1
Float Lerp (CCN)
    • FLOAT
    a0.000
    b1.000
    t0.000

    Float Lerp is a single line of math wearing a ComfyUI skin: a + (b - a) * t. Give it two endpoints and a position along the line, and it hands you the number in between. That's it. It's the sort of node you glance at, say "obviously," and then realize it just unblocked half your automation, because ComfyUI's built-in primitives don't do interpolation for you.

    Three float inputs - a, b, and t - and one FLOAT output. The default values (0, 1, 0) mean it starts life outputting a. Nothing else to configure, no hidden modes.

    Why you'd actually reach for it

    The classic use is sweeping: wire t to a source that changes per run and watch a value glide between two endpoints. Because t is unclamped, values below 0 or above 1 don't stop - they extrapolate past the endpoints. That's usually what you want (nobody wants their easing curve to snap flat at the edges), but keep it in mind when t comes from something noisy.

    Concrete setups:

    • t fed by a Gated Increment or a per-run seed node, with a/b set to a CFG range like 2 and 8 - instant CFG sweep without touching the sampler.
    • a/b as two LoRA strength values, t from a curve sampler - you get a strength that breathes over the run instead of a constant.
    • a/b as two image blend weights (see CCN_ImageBlend) and t from anywhere - a crossfade.

    In the plumbing taxonomy from the knowledge base, this is a pure value node: it exists to turn a boring number into a wire, and to let one changing input drive many downstream values. ComfyUI's own primitive nodes can hold a number, but they can't derive one. That derivation is the entire job here.

    Installing and getting it

    It's in ComfyCollectorNodes, so it arrives with the rest of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/valkymaera/ComfyCollectorNodes
    

    restart ComfyUI, and it shows up under the CCN category with the rest. ComfyUI Manager also finds the pack under ComfyCollectorNodes. No dependencies beyond the pack itself.

    The honest take

    There's nothing special here, and that's the point - it's a 15-second node that you'll end up using constantly because interpolation is everywhere once you look for it. The one thing to watch is the unclamped t: if you feed it a control_after_generate randomize from a seed node, the raw seed can be thousands, and a + (b-a)*t will happily shoot off into absurd territory. Normalize your driver to 0–1 first (or use the curve/CFG guiders in this same pack, which output normalized samples exactly for this purpose), and Float Lerp quietly does its job for the rest of your ComfyUI career.

    CategoryCCN

    Inputs (3)

    NameTypeDefaultDescription
    aFLOAT0.000
    bFLOAT1.000
    tFLOAT0.000

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT