Nodes/ComfyWarp/SchedulerFloat
ComfyUI Node

SchedulerFloat

SchedulerFloat

By Sxela·Created 3 years ago·Updated 2 months ago· 49
SchedulerFloat
    • FLOAT
    schedule
    frame_number0
    blend_jsontrue

    Ever tried to animate video frame-by-frame and wished the ControlNet weight could ease off at frame 60, or the denoise could drop when the shot goes static? ComfyUI doesn't give you a keyframe track - every float input wants one number. SchedulerFloat is the keyframe track. Give it the current frame number and a little schedule string, and it hands back the value your schedule says it should be, smoothly interpolated between keyframes. It's the node you steal from ComfyWarp and use everywhere.

    It comes from Sxela's WarpFusion, a Colab video-stylization pipeline that animated SD frame by frame back when that was a heroic thing to do. WarpFusion's scheduler ran the whole show - controlnet weights, sampler settings, prompts - and this is that mechanism ported to ComfyUI. The rest of the pack is about warping frames for consistency; the schedulers are the parts that keep working on any workflow, video or not.

    How it works

    The schedule input is one of three formats, and the node figures out which by how it parses:

    • a single value: 0.7
    • a list of consecutive values: [0.7, 0.65, 0.6, 0.55] (indexed by frame number; past the end it clamps to the last value)
    • a dict of keyframes: {0: 0.8, 30: 0.7, 100: 0.4}

    The dict format is the interesting one. Between two keyframes the node linearly interpolates, exactly like WarpFusion did - so {0: 0.8, 100: 0.4} gives you a smooth ramp over a hundred frames, and you only wrote two numbers. The blend_json toggle (default on) controls that interpolation; flip it off and values between keyframes hold the previous keyframe's value instead of easing.

    One honest warning: the schedule is parsed with Python's eval(). That's fine for your own hand-typed schedules - stick to the three formats above and you're golden - but don't paste arbitrary text from a stranger's workflow without looking at it first.

    The inputs that matter

    • schedule (string, multiline) - your keyframe track. This is the whole game.
    • frame_number (int) - the current frame. Wire this from the pack's FixedQueue current_frame output so it advances as the queue runs.
    • blend_json (bool, default true) - smooth interpolation between keyframes. Leave it on for float params.

    The single output is a FLOAT. That plugs into anything that takes a float: denoise, CFG, ControlNet strength, sampler settings, LoRA weight. The workflow in the pack drives a sampler from it; you can drive a hundred inputs by fanning the output out.

    Installing it

    ComfyWarp installs the normal way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Sxela/ComfyWarp
    

    …then restart ComfyUI (or just use Manager and search "ComfyWarp"). The dependencies are light - opencv-python and scikit-image - and there are no model files to download for the scheduler nodes. Don't bother with the pack's install.bat; it's a legacy self-contained installer from the 2023 era that downloads its own embedded Python and torch. On a modern ComfyUI, Manager or a plain clone is the right move.

    Where people get burned

    The classic one: the node "doesn't work" because frame_number is sitting at its default 0, so it returns the same value for every frame. If your output isn't changing, check that the frame counter is actually wired in. Second classic: a formatting typo in the schedule - a stray brace or a quoted key - makes the eval blow up. Keep it to the three formats above and you're fine. And remember this pack is old and largely unmaintained, so if a ComfyUI update ever breaks it, the schedulers are the most likely part to survive; they're plain Python with no ComfyUI-specific plumbing.

    CategoryWarpFusion

    Inputs (3)

    NameTypeDefaultDescription
    scheduleSTRING
    frame_numberINT00–9999999999
    blend_jsonBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT