Nodes/ComfyUI-Pixaroma/Duration Pixaroma
ComfyUI Node

Duration Pixaroma

Say '5 seconds', get the exact frame count your video model wants

By pixaroma·Created 5 months ago·Updated 2 days ago· 369
Duration Pixaroma
    • frames
    • seconds

    Video models are fussy about length, and that fussiness is exactly what Duration Pixaroma exists to hide from you. Most of them won't accept just any frame count - MiniMax H3 wants every 17th frame plus 5, Wan and Hunyuan want every 4th frame plus 1, and typing 120 and getting an error on a 24fps clip is the classic way to waste a render. This node replaces the pair of nodes people normally wire up (one holding seconds, one doing the math) with a single box that does the snapping for you.

    The node's description puts the problem bluntly: "5 seconds at 24 frames per second becomes 124 frames, which is really 5.17 seconds." That's not a bug, that's the model's pattern winning. The node shows you the true length before you run, so nothing surprises you at the sampler.

    The two outputs

    • frames (INT) - the frame count to generate, already adjusted to the pattern your model accepts. Wire this into the length/frame-count input of your video node.
    • seconds (FLOAT) - the real duration: frame count divided by frame rate. Wire this into anything that has to line up with the video - most usefully into Load Audio Pixaroma, so the audio you trim is exactly as long as the clip you're about to make.

    Setup

    Open the gear and pick your model from the list; the node handles the frame-rate/step/plus for you. Not listed? You can type the frame rate, step, and offset yourself, or switch to Custom and write your own formula. You also decide what durations are allowed: give it a short list like 3, 5, 10 and you get clickable buttons; give it a range and you get a slider. Two copies on the same canvas can be set up completely differently - handy when you're tuning a single clip's length against a long-running batch.

    Install

    Duration Pixaroma ships with the Pixaroma pack: ComfyUI Manager → search Pixaroma → install → restart, or manually:

    cd ComfyUI/custom_nodes
    git clone https://gitlab.com/pixaroma/comfyui-pixaroma.git
    

    No models, no dependencies, no ffmpeg - it's pure math. If a node looks stale after an update, hard-refresh the browser tab (Ctrl+Shift+R / Cmd+Shift+R) before assuming something broke; cached node visuals are the pack's most common false alarm.

    Where people get burned with video length generally: they fix the number of frames but never feed the real seconds anywhere, then wonder why the audio drifts. Wire seconds into anything audio and the two can't fall out of step.

    Category👑 Pixaroma/🔢 Values

    Inputs (0)

    No inputs

    Outputs (2)

    NameTypeDescription
    framesINTThe number of frames to generate, already adjusted to the pattern your model accepts. Wire this into the length or frame count input of your video node.
    secondsFLOATHow long the video will really be, in seconds. This is the frame count divided by the frame rate, so it matches the picture exactly. Use it for anything that has to line up with the video, such as audio length. It can differ slightly from the number you picked, because rounding to the model's pattern changes the length a little.