Nodes/Hunyuan Video Resolutions/HunyuanResolutions
ComfyUI Node

HunyuanResolutions

Pick a video aspect ratio, get two clean ints — that's the whole node

By HellerCommaA·Created 2 years ago·Updated about a year ago· 3
HunyuanResolutions
    • Width
    • Height
    resolution

    The name says "Hunyuan Video Resolutions," and the dropdown is a wall of numbers, but here's the whole node: you pick an aspect ratio, it hands you two integers - Width and Height - and you wire those into your latent. That's it. No API calls, no model files, no VRAM checks, nothing that can quietly break. It's the kind of pack that exists so you stop hand-typing 1216x832 for the hundredth time and typo-ing your way into a wasted ten-minute generation.

    Why it exists

    In a ComfyUI video pipeline, the resolution doesn't live on the sampler - it lives on the latent node (EmptyHunyuanLatentVideo, EmptyLatentVideo, whatever your model uses), and you're keying in numbers blind every time. Miss the model's training bucket and you get tiling, stretched anatomy, or a latent the VAE doesn't like. This node replaces that with a curated dropdown of the standard aspect-ratio buckets.

    Funny thing about the "Hunyuan" in the title: it's a bit of a lie. The resolution list is the classic 256–1728 SDXL-style bucket set that video model workflows all borrow, and the pack's own pyproject.toml describes it as "for Hunyuan and others." It'll feed Wan, LTX, or any model whose latent node takes a width and height. Hunyuan Video itself - Tencent's 13B December-2024 model, now largely overtaken by Wan per our knowledge base - runs natively around 544p/720p and wants 45–60GB of VRAM to do it, so treat the big entries like 1728x576 with respect.

    How it works

    The dropdown holds 46 entries: 43 actual resolutions grouped under three headers, =SQUARE=, =VERTICAL=, =HORIZONTAL=. Pick 1216x832 (3:2), and the generate function splits the label on the space, parses the numbers, floors each to a multiple of 16, and returns the pair.

    Two things worth knowing, both from reading the source rather than the README:

    • The headers are selectable. They're just strings in a combo box, and generate() returns (256, 256) if the choice starts with =. Pick =VERTICAL= by accident and you'll silently render tiny squares. It's the one real footgun, and it's a weird one - the node is otherwise impossible to misclick into trouble.
    • The floor-to-16 is decorative. Every stock resolution is already a multiple of 16 (most are multiples of 32 or 64), so the rounding only matters if a future PR adds a sloppy number. Nice safety net, does nothing today.

    Amusingly, the README's list is already stale: the dropdown has 43 resolutions, and the docs only mention 42 - 768x768 (1:1) snuck into the code after the README was written.

    The inputs that matter

    One input, one output pair:

    • resolution - the enum dropdown. This is the only thing you set.
    • Width, Height - two INT outputs. Wire them into your latent video node's width/height. Don't also type numbers there; the point is a single source of truth.

    Installing it

    Easiest path is ComfyUI Manager: search "Hunyuan Video Resolutions" (or ComfyUI-VideoResolutions) under Install Custom Nodes. It's published to the Comfy Registry, so Manager's "Install Missing Custom Nodes" will also grab it automatically when a workflow asks for it. If you'd rather go manual:

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

    Then restart ComfyUI. That's the whole install - there's no requirements.txt, no dependencies beyond ComfyUI itself, and no model downloads. The whole pack is one 70-line Python file.

    Common issues

    • Picked a section header → 256x256 output. See above. Pick a real resolution.
    • The node won't save you from your GPU. It doesn't check VRAM or your model's native resolution, so a 1024x1024 pick can still OOM or smear. If you're on Hunyuan Video proper, stay in the 544p/720p-class entries.
    • Missing-node errors on load aren't this pack's fault. It has zero dependencies, so if a workflow complains, look at whatever else it imports - this repo just happens to share the name with the error message.
    • It only sets width and height. Frame length, batch size, and fps are set on the latent node and elsewhere. The node knows nothing about time.

    Honest verdict: this is a dumb little quality-of-life node, and you could absolutely live without it - typing 1216x832 by hand costs you nothing. But it installs in ten seconds, has no moving parts, and keeps you inside the buckets your model was actually trained on. If you build video workflows more than twice a week, it earns its corner of the graph.

    CategoryUtilities

    Inputs (1)

    NameTypeDefaultDescription
    resolutionCOMBO46 options: =SQUARE=, 256x256 (1:1), 512x512 (1:1), 768x768 (1:1), 1024x1024 (1:1), =VERTICAL=, +40

    Outputs (2)

    NameTypeDescription
    WidthINT
    HeightINT