Nodes/comfyui-alabo-resolution/Alabo Resolution Preset
ComfyUI Node

Alabo Resolution Preset

The node that keeps your AnimateDiff numbers from silently disagreeing

By AlaboMPJ·Created about a month ago·Updated about a month ago· 0
Alabo Resolution Preset
    • width
    • height
    • frames
    • fps
    • notes
    aspect9:16 portrait
    scale1x
    seconds4.0
    base_short_edge512
    fps24
    rife_multiplier2

    The classic AnimateDiff graph has four numbers that all have to agree: the EmptyLatentImage's width and height, the IPAdapter frame count, and the video frame rate. Change one and either your clip comes out the wrong length or the graph just breaks. Alabo Resolution Preset is a single dropdown that drives all four, so they stop drifting apart the moment you stop paying attention.

    It's a pure math node from the tiny comfyui-alabo-resolution pack. No model, no API, no GPU work - you feed it an aspect ratio and a duration, and it hands you width, height, frames, and fps that are guaranteed consistent with each other.

    Why it exists

    SD1.5 renders best near its training resolution, roughly a 512 short edge. Push native resolution toward 1024 and the model starts repeating features - and on a 16GB card it OOMs. The reliable pattern is to render low and upscale as a separate final pass (the same "more pixels later, not more native res" discipline the upscaling crowd keeps hammering on). This node encodes that: base_short_edge defaults to 512, and the author's note is blunt - keep it low, upscale last.

    How it works

    Pick aspect (16:9, 9:16, 3:4, 4:3, 1.37:1 Academy, 2.35:1 scope, 1:1, 4:5, 21:9), pick scale (0.25x up to 2x), and the node sizes the short edge - width for portrait, height for landscape, both for square - then snaps everything to a multiple of 16, which keeps the latent friendly.

    The part that's actually clever is frames. It's computed as round(seconds * fps / rife_multiplier). That's the latent frame count, before interpolation. If you're running RIFE at 2x, the node renders half the frames and RIFE doubles them back, so your final clip lands on exactly seconds when VHS plays it at fps. The rife_multiplier input has to match whatever your RIFE node is set to - that's the single most common way people burn themselves here. Set it to 2 but have RIFE at 4, and your 4-second clip is suddenly 8 seconds long. The output notes string shows the whole calculation on the canvas, which makes a wrong multiplier instantly visible.

    Inputs that matter

    • aspect - the dropdown, and honestly the main reason this node exists
    • seconds - real clip length; this drives the frame count
    • base_short_edge - keep it 512 unless you have a reason not to
    • fps - playback rate; wire it where the README says
    • rife_multiplier - must match your RIFE VFI node, or the clip length lies

    Wiring it up

    The outputs are typed, so you first have to right-click the destination widgets and pick Convert Widget to Input on each one, then wire: widthEmptyLatentImage.width, heightEmptyLatentImage.height, framesIPAdapterWeights.frames, fpsVHS_VideoCombine.frame_rate. If a wire refuses to connect, that's the step you skipped - on the newer frontend the gesture has moved (you can often drag straight off a widget instead of hunting the right-click menu).

    Install

    ComfyUI Manager will find it if you search "comfyui-alabo-resolution". Or the old-fashioned way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AlaboMPJ/comfyui-alabo-resolution
    

    Then restart ComfyUI. There's no requirements.txt - these are pure-Python nodes with zero extra dependencies, so this is about as clean an install as custom nodes get. MIT licensed.

    Honest caveat: AnimateDiff itself is long superseded by Wan for general video, so this node is aimed at a shrinking niche - the SD1.5 library of checkpoints, LoRAs and ControlNets that still work unchanged with the motion module. If you're in that world, this is genuinely the tidiest way to keep your video numbers honest.

    Categoryalabo/resolution

    Inputs (6)

    NameTypeDefaultDescription
    aspectCOMBO9:16 portrait9 options: 16:9 landscape, 9:16 portrait, 3:4 portrait, 4:3 landscape, 1.37:1 Academy, 2.35:1 scope, +3
    scaleCOMBO1x6 options: 0.25x, 0.5x, 0.75x, 1x, 1.5x, 2x
    secondsFLOAT4.00.5–60Real clip length in seconds. Drives the frame count.
    base_short_edgeINT512256–1024SD1.5 sweet spot is 512. Keep low; upscale last.
    fpsFLOAT241–60Playback frame rate. Wire into VHS_VideoCombine.frame_rate.
    rife_multiplierINT21–8RIFE VFI multiplier. Must match the RIFE node so seconds stay honest.

    Outputs (5)

    NameTypeDescription
    widthINT
    heightINT
    framesINT
    fpsFLOAT
    notesSTRING