Nodes/ComfyUI-VFI/Calculate Loaded FPS
ComfyUI Node

Calculate Loaded FPS

The fps math node that stops interpolation clips playing in slow motion

By GACLove·Created about a year ago·Updated 11 months ago· 55
Calculate Loaded FPS
    • loaded_fps
    source_fps24.0
    select_every_nth1

    This one's not glamorous, but it fixes the single most common mistake people make around frame interpolation: getting the fps math wrong. Calculate Loaded FPS does exactly one thing - it takes your source video's frame rate and the "select every Nth frame" setting you used when loading it, and hands back the fps of what you actually loaded. loaded_fps = source_fps / select_every_nth. That's the whole node.

    Why that's worth a dedicated node: if you're loading video with VideoHelperSuite's Load Video node - the one most people use - it has a select_every_nth option built in, letting you skip frames on the way in to cut compute on a long clip (the node's own tooltip credits VideoHelperSuite directly for that parameter). But skipping frames changes your effective frame rate, and the loader doesn't hand that adjusted number back to you as something you can wire downstream. Load a 24fps clip with select_every_nth set to 2 and what you actually loaded is 12fps, not 24. Feed the wrong number into an interpolation node's source-fps input, or into your save node's output rate, and everything downstream is quietly off - which is exactly the kind of mismatch that turns a smooth-motion clip into one that plays in slow motion or looks wrong. This node is the pack author acknowledging that trap and just doing the division for you instead of leaving you to eyeball it.

    The inputs and output

    Two required inputs, nothing optional: source_fps - your original video's frame rate - and select_every_nth, the frame-skip value from your loader (default 1, meaning nothing gets skipped). One output: loaded_fps, a FLOAT. Wire it straight into RIFE Interpolation's source_fps input from the same pack - same type, no conversion needed - or into any other downstream node that needs to know your real frame rate.

    How to use it

    Drop it right after your video loader. Set source_fps to the clip's real rate and select_every_nth to whatever you actually set in the loader, then take loaded_fps and pipe it wherever your pipeline needs the true frame rate. It's a two-input glue node, not something you tune - the only work is making sure both numbers match what you actually configured upstream.

    Installing it

    Same pack, same install as RIFE Interpolation - it ships alongside it in GACLove/ComfyUI-VFI, so there's nothing separate to do. Search "ComfyUI-VFI" in ComfyUI Manager, or clone it by hand: cd ComfyUI/custom_nodes && git clone https://github.com/GACLove/ComfyUI-VFI (ignore the placeholder URL in the README's own install snippet - use the real one here), then restart. No model download involved for this specific node; it's pure arithmetic, so it works the moment the pack loads.

    Where people get stuck

    The only real trap is conceptual, not technical: select_every_nth means "keep every Nth frame," not "skip N frames." Leave it at 1 and nothing is skipped - your loaded fps equals your source fps. Set it to 2 and you're keeping half your frames, so loaded fps is halved, and so on. The formula only accounts for that one setting; if your loader is doing some other kind of rate conversion on top of it, this node has no way to know - it's strictly reporting what select_every_nth alone implies, so it's on you to match it to whatever you actually configured upstream. Beyond that there's not much that can go wrong here: two numbers and a division, no GPU, no model, no extra dependencies.

    Categoryimage/animation

    Inputs (2)

    NameTypeDefaultDescription
    source_fpsFLOAT24.00.1–160Source video frame rate
    select_every_nthINT11–100Select every Nth frame (from VideoHelperSuite)

    Outputs (1)

    NameTypeDescription
    loaded_fpsFLOAT