Nodes/ComfyUI UX Nodes/Lerp (Float)
ComfyUI Node

Lerp (Float)

Linear interpolation as a wire, not mental math

By Anibaaal·Created 2 years ago·Updated 2 years ago· 2
Lerp (Float)
    • FLOAT
    start0.00
    end1.00
    t0.50

    Lerp is textbook linear interpolation, exposed as a node so you don't have to do the arithmetic yourself: give it a start value, an end value, and a blend factor t between 0 and 1, and it hands back the point that far between them. t = 0 gives you start, t = 1 gives you end, t = 0.5 gives you the exact midpoint, and everything else scales linearly in between.

    The reason this is worth a node rather than just typing the number in yourself is that t doesn't have to be a fixed value you chose ahead of time - it can be wired from somewhere else in the graph. Any time you want a parameter to change smoothly across a sequence instead of sitting at one fixed number for the whole run - denoise strength ramping across a batch of frames, blending two LoRA strengths, animating a CFG value across a video - you need something computing the in-between value at each step. Wire t from a counter, a schedule, or a batch-index node instead of a static widget, and Lerp turns a fixed parameter into an animated one with zero extra logic.

    How it works

    The whole node is one line of math: output = start + (end - start) × t. No branching, no special cases, no surprises - which is exactly what you want from a node you're going to wire into the middle of something more complicated.

    The inputs and outputs that matter

    • start - FLOAT, default 0, range -10000 to 10000. The value at t = 0.
    • end - FLOAT, default 1, same range. The value at t = 1.
    • t - FLOAT, default 0.5, range 0 to 1. The blend factor.
    • Output: a single FLOAT, the interpolated result.

    How to install it

    Part of the six-node ComfyUI UX Nodes pack from Reddit's Anibaaal - better known there for a well-liked Flux photo-realism LoRA than for custom node development, so this reads as small quality-of-life tooling built for personal use rather than a maintained framework. The README is just a bare list of node names, no install section, so the standard path applies: ComfyUI Manager, search ComfyUI UX Nodes, install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Anibaaal/ComfyUI-UX-Nodes
    

    then restart ComfyUI. It's pure arithmetic - nothing to download, no dependencies beyond what ComfyUI already has.

    Common issues & troubleshooting

    t landing outside 0–1 when it's wired from another node. The widget itself is bounded to 0–1, but if you feed t from an upstream node instead of typing it in, nothing stops that value from arriving outside that range. Lerp doesn't clamp - a t below 0 or above 1 extrapolates past start/end rather than erroring, which is easy to miss if you assumed it would clamp automatically. Add a clamp node upstream if you need to guarantee the output stays within startend.

    Wanting a curve, not a straight line. Lerp only knows two points and moves between them at a constant rate - there's no easing built in. If you need an ease-in/ease-out feel or more than two keyframes, you'll want to chain multiple Lerps or reach for a dedicated scheduling/curve node instead of expecting this one to do more than it's built for.

    Categorymath

    Inputs (3)

    NameTypeDefaultDescription
    startFLOAT0.00-10000–10000
    endFLOAT1.00-10000–10000
    tFLOAT0.500–1

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT