Nodes/ComfyUI_RIFE_TensorRT_Auto/RIFE Custom Resolution Config
ComfyUI Node

RIFE Custom Resolution Config

The fine print for RIFE's resolution profile

By silveroxides·Created 9 months ago·Updated 8 months ago· 14
RIFE Custom Resolution Config
    • resolution_config
    min_dim384
    opt_dim720
    max_dim1312

    This one is a small utility, and it's honest about being one. When you build a RIFE TensorRT engine, you have to tell it the resolution range it's being compiled for: a minimum, an optimal (the size it's actually tuned to), and a maximum. The presets on the loader node cover this for you - small, medium, large - but when your video is an odd size or you want to squeeze VRAM, that's where RIFE Custom Resolution Config comes in.

    It just builds that range by hand and passes it along. Nothing else.

    How it works

    TensorRT engines get an optimization profile, and inference runs fastest at the profile's opt dimension - that's the shape the compiler tunes kernels for. Frames between min and max work but may run slower; frames outside the range trigger the pack's automatic tiling, which is slower still. So this node exists to make the profile match your actual footage instead of hoping a preset covers it.

    You feed it three integers, all in the range 64–4096 with a step of 8 (TensorRT likes multiples of 8 - another reason this is a config node rather than a text field):

    • min_dim - default 384. The smallest frame dimension the engine must accept.
    • opt_dim - default 720. Your most common resolution. This is the important one: set it to what you actually render.
    • max_dim - default 1312. The largest dimension you'll throw at it.

    The single output, resolution_config, connects to the AutoLoadRifeTensorrtModel node's optional custom_config input - but only if you also set that loader's resolution_profile to custom. That's the coupling, and it's easy to miss: setting the profile to custom without connecting this node just makes the loader fall back to its default range (384–720–1312, roughly small-plus-medium).

    Why you'd bother

    Two real reasons. First, VRAM: a tighter range means a smaller, faster-to-build engine and less memory at runtime. If your footage is always 1024x576, why compile support for 1920 wide? Second, speed: keeping opt_dim at your real output resolution gets you the tuned, fastest path instead of the generic one.

    For most people, honestly, the presets are enough. Reach for this when you know your resolution is unusual, when you're fighting VRAM on a smaller card, or when you want to prove to yourself that the 4-minute engine build was actually worth it. The whole pack is CC BY-NC-SA licensed, same as the rest - fine for personal use.

    Installing

    It ships in the ComfyUI-RIFE-TensorRT-Auto pack, so:

    cd ComfyUI/custom_nodes
    git clone https://github.com/huchukato/ComfyUI-RIFE-TensorRT-Auto.git
    

    or search ComfyUI-RIFE-TensorRT-Auto in ComfyUI Manager, then restart. Like the other two nodes, the pack needs the NVIDIA CUDA Toolkit installed on the system - it auto-installs the matching TensorRT wheels on first load, but the toolkit itself is on you.

    Categorytensorrt

    Inputs (3)

    NameTypeDefaultDescription
    min_dimINT38464–4096Minimum resolution dimension
    opt_dimINT72064–4096Optimal resolution dimension (most common)
    max_dimINT131264–4096Maximum resolution dimension

    Outputs (1)

    NameTypeDescription
    resolution_configRIFE_RESOLUTION_CONFIG