Nodes/Comfyroll Studio/πŸ”’ CR Gradient Float
ComfyUI Node Runs on cloud

πŸ”’ CR Gradient Float

Ramp a Number Across an Animation Frame by Frame

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
πŸ”’ CR Gradient Float
    • FLOAT
    • show_help
    β—„start_value1.00β–Ί
    β—„end_value1.00β–Ί
    β—„start_frame0β–Ί
    β—„frame_duration1β–Ί
    β—„current_frame0β–Ί
    β—„gradient_profileβ–Ύβ–Ί

    If you've ever wanted a value to smoothly ramp up (or down) over the course of an animation - CFG creeping from 6 to 9, a ControlNet strength fading out, a denoise value easing across a batch - CR Gradient Float is the node that produces that number for you, one frame at a time.

    How it works. You give it a start_value and an end_value, a start_frame and a frame_duration, and a current_frame. Feed it the frame you're currently rendering (from a batch index, a for-loop counter, whatever's driving your animation), and it works out where that frame sits inside the window from start_frame to start_frame + frame_duration, then returns the interpolated value for that point - start_value right at the start of the window, end_value right at the end, smoothly in between. There's also a gradient_profile selector for the interpolation curve; the option the schema surfaces is Lerp - straight linear interpolation - so treat this as a linear ramp rather than an eased one unless you find other profiles exposed in your version.

    Why it exists rather than just typing numbers. This is a keyframe-scheduling node from the era when animating a Stable Diffusion checkpoint meant manually driving parameters frame by frame - AnimateDiff-style workflows, before native video models made continuous motion something the model handled for you. The pattern is: instead of typing a fixed CFG or strength value into a widget, you compute it fresh for every frame based on where that frame falls on a timeline, and this node is the pure-math building block for that. It's still genuinely useful outside animation too - anywhere you're running a batch and want a parameter to sweep across the batch instead of staying constant.

    Inputs and output that matter. start_value / end_value (the two ends of the ramp), start_frame / frame_duration (the window it ramps across), current_frame (where you are right now), gradient_profile (the curve - Lerp). Output is a single FLOAT, plus the usual show_help string. Its integer sibling, CR Gradient Integer, does the same job for whole numbers when you need something like a pixel dimension or a batch size to ramp instead.

    Install. ComfyUI Manager: search "Comfyroll Studio", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, restart. Nothing to download beyond the node code - it's pure math, no models involved.

    Troubleshooting. The thing that trips people up isn't the math, it's driving current_frame correctly - this node doesn't know what frame you're on unless you wire something in that does, whether that's a frame index from a batch, a loop counter, or a manual widget you bump by hand. If the output never seems to change, check that current_frame is actually connected to something live rather than sitting on its default. Separately, the pack-wide install issue applies here too: Comfyroll's nodes all register from one shared file, and real reports on r/comfyui show a single broken import (Failed to load Graphics nodes / Failed to load Utility nodes) taking out every Comfyroll node at once, including ones you're not using. If nodes go missing after install, redo it with a clean git clone rather than debugging pip.

    Category🧩 Comfyroll Studio/πŸŽ₯ Animation/πŸ”’ Interpolate

    Inputs (6)

    NameTypeDefaultDescription
    start_valueFLOAT1.000–9999β€”
    end_valueFLOAT1.000–9999β€”
    start_frameINT00–9999β€”
    frame_durationINT10–9999β€”
    current_frameINT00–9999β€”
    gradient_profileCOMBO1 options: Lerp

    Outputs (2)

    NameTypeDescription
    FLOATFLOATβ€”
    show_helpSTRINGβ€”