Nodes/ComfyUI Rogala Nodes/LtxResolutionSelector
ComfyUI Node

LtxResolutionSelector

Stop doing LTX 2.3's divisibility math in your head

By Rogala·Created 6 months ago·Updated 4 months ago· 20
LtxResolutionSelector
    • width
    • height
    • length
    • fps
    modeDev (no upscale)
    dev_target960x544 (Landscape)
    upscale_target1920x1080 (Landscape)
    fps24.00
    duration_sec5

    LTX Video 2.3 is genuinely great at what it does, but it has a hard constraint that turns every resolution decision into homework: width and height must be divisible by 32, and the frame count must be divisible by 8 plus 1. Feed it off-grid values and it fails rather than rounding - the model card is explicit about this. LtxResolutionSelector is the node that does that arithmetic for you, and it also handles the sneaky part: when you're using the distilled upscaling workflow, the input resolution you set is not the output resolution you get.

    It's a tiny utility node from the ComfyUI-rogala pack, built to feed the pack's own FMLFLTX + SamplerLTXV pipeline, but there's no reason you can't use it to size any LTX 2.3 graph. You set the clip's duration and target resolution; it hands you the exact width, height, and frame length the model wants.

    How it works

    Three modes, and the distinction matters:

    • Dev (no upscale) - picks a standard LTX Dev resolution from a preset list and rounds up to the nearest multiple of 32. If you ask for 1920x1080 (Landscape) you get 1920x1088, because 1080 isn't a multiple of 32 and the model won't negotiate.
    • x1.5 Distilled - returns the input size that lands on your chosen target after a 1.5x latent upscale.
    • x2 Distilled - same idea for a 2x upscale.

    That last pair is the actual value. The LTX-2.3 distilled workflow renders low then upscales in a refinement pass, so if your final target is 1080p you don't feed the sampler 1080p - you feed it roughly half that. Get that wrong by hand and you're either wasting VRAM or upscaling from a resolution that makes the refinement pass pointless.

    Inputs and outputs

    The inputs are self-documenting: mode (the three options above), dev_target (14 presets for non-upscaled work), upscale_target (8 presets for distilled modes, landscape and portrait), fps (1–120), and duration_sec (1–300) for the clip length.

    Outputs are four bare numbers: width, height, length, and a passthrough fps. Frame count follows 1 + 8 × round(fps × sec / 8), which is exactly the divisible-by-8-plus-1 rule. Wire all four into FMLFLTX's width, height, length, and fps pins and you never touch the math again.

    Concrete example from the README: 5 seconds at 1920x1080 with x2 Distilled, 24 fps → the node outputs width=960, height=544, length=121, fps=24. The sampler runs at 960x544, upscales to your 1080p target.

    Installing it

    Part of ComfyUI-rogala:

    cd ComfyUI/custom_nodes
    git clone https://github.com/rogala/ComfyUI-rogala
    

    Restart, then find it under rogala → Video → LTX Resolution Selector. ComfyUI Manager works too - search "rogala". No dependencies or downloads.

    Where people get burned

    The trap is assuming the Dev presets are the exact pixel values you asked for. The node rounds up to a multiple of 32, so 1920x1080 becomes 1920x1088 and 1280x720 becomes 1280x736. That's correct behavior for LTX - the model wants valid dimensions - but if you're feeding a fixed-size downstream node that expects exact 1080p, decode and check. And if you switch models mid-project, remember the distilled workflow is a two-stage pipeline: your visible output resolution is the upscale_target, not the width/height the selector emits. Mix those up and the refinement pass in SamplerLTXV will quietly do nothing interesting.

    Categoryrogala/Video

    Inputs (5)

    NameTypeDefaultDescription
    modeCOMBODev (no upscale)Rendering mode: Dev uses standard sizes; Distilled modes return the correct input size for the chosen upscale factor.
    dev_targetCOMBO960x544 (Landscape)Target resolution for Dev (no upscale) mode.
    upscale_targetCOMBO1920x1080 (Landscape)Desired output resolution for x1.5 or x2 Distilled mode.
    fpsFLOAT24.001–120Frames per second — used to calculate frame count and passed through to output.
    duration_secINT51–300Clip duration in seconds — used to calculate frame count.

    Outputs (4)

    NameTypeDescription
    widthINT
    heightINT
    lengthINT
    fpsFLOAT