Nodes/ComfyUI-Magos-Nodes/Wan Ratio & FPS
ComfyUI Node

Wan Ratio & FPS

Wan Ratio & FPS

By MagosDigitalStudio·Created 5 months ago·Updated 4 months ago· 22
Wan Ratio & FPS
    • width
    • height
    • fps
    ratio16:9
    quality720p
    custom_width512
    custom_height512
    fps_preset24
    custom_fps24.000

    Every Wan workflow has that moment where you type 1280x720, hit run, and get "resolution not compatible" (or a video that decodes two frames short). Wan's VAE wants dimensions divisible by 16, and 1080p isn't actually 1920x1080 - it's 1920x1088. The Wan Ratio & FPS node is a tiny calculator that spits out the correct, Mod-16-compliant width and height plus an FPS value, so you stop hand-computing resolutions.

    It's the utility node in Magos Digital Studio's ComfyUI-Magos-Nodes pack. The pack's headline is the DWPose editor/retargeter chain, but this little node is genuinely useful standalone - it's a resolution dashboard for WanAnimate and anything else that wants clean dimensions.

    How it works

    Pick an aspect ratio (16:9, 9:16, 1:1, 4:3, 3:4, 21:9, or Custom), pick a quality tier (480p / 720p / 1080p), and it looks up a hard-coded table of Mod-16-safe resolutions. 16:9 at "720p" gives 1280x720; at "1080p" it gives 1920x1088 (that extra 8 is the Mod-16 rounding, and it's correct - Wan wants it). If you pick Custom, your custom_width/custom_height get auto-rounded down to the nearest multiple of 16, so even a sloppy value like 1337 lands on something the model accepts.

    The FPS side is a separate dropdown (fps_preset: 12, 15, 23.976, 24, 25, 30, 48, 50, 60, or Custom) with a custom_fps override. Outputs are dead simple: width (INT), height (INT), fps (FLOAT).

    Why you'd bother

    The whole thing saves you two minutes of arithmetic, which sounds trivial until you've been burned by a 21:9 ratio at 1080p and can't remember what the mod-16 version is. It also keeps your graph readable - one node with clear widgets instead of a pile of int constants scattered through the workflow.

    A couple of honest caveats:

    • The values are presets, not auto-detected. If your target model needs a specific resolution (some Wan workflows use 832x480 or other oddballs), use Custom or just compute it yourself.
    • It's built around WanAnimate's Mod-16 requirement, but the outputs are plain INT/INT/FLOAT, so they wire into anything that accepts those - a VHS resize node, a latent size node, an LTX or Hunyuan Video workflow. Nothing Wan-specific about the output types.

    Install

    It's part of the pack, so install once, use all six nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MagosDigitalStudio/ComfyUI-Magos-Nodes
    

    Restart ComfyUI. It lives under MAGOS Nodes → Utils. Unlike the pose nodes in this pack, this one needs nothing special - no Kijai dependency required, no model downloads.

    Common issues

    Not much to trip on, honestly. The one thing that catches people: if ratio is set to something other than Custom, your custom_width/custom_height are ignored, so don't edit those and wonder why nothing changed. And remember 1080p isn't 1080 - if you were hard-coding 1920x1080 before, the "1088" output is the node doing its job, not a bug.

    CategoryMAGOS Nodes/Utils

    Inputs (6)

    NameTypeDefaultDescription
    ratioCOMBO16:97 options: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, +1
    qualityCOMBO720p3 options: 480p, 720p, 1080p
    custom_widthINT51264–8192
    custom_heightINT51264–8192
    fps_presetCOMBO2410 options: 12, 15, 23.976, 24, 25, 30, +4
    custom_fpsFLOAT24.0001–120

    Outputs (3)

    NameTypeDescription
    widthINT
    heightINT
    fpsFLOAT