Nodes/Comfy_HunyuanImage3/Hunyuan VRAM Calculator V2
ComfyUI Node

Hunyuan VRAM Calculator V2

A budget report before you spend the first second generating

By EricRollei·Created 10 months ago·Updated 4 months ago· 65
Hunyuan VRAM Calculator V2
    • report
    • recommended_blocks
    • recommended_vae
    model_nameHunyuanImage-3-NF4
    resolution1024x1024 (1:1 Square)
    reserve_vram_gb0.0

    "Hunyuan VRAM Calculator V2" is a planning tool, not a generation tool: it tells you how much VRAM a given Hunyuan model and resolution will need, and what settings to use, before you commit to a run. Given how brutal HunyuanImage-3.0's memory footprint is - 45GB for NF4, 85GB for INT8, 160GB for BF16 - "check before you spend four minutes OOMing" is a genuinely useful feature rather than a gimmick.

    It's part of the pack's V2 family, which means it talks to the same memory-budget machinery as the Unified Generate V2 node. When you run it, it estimates the model's weight footprint, estimates the inference cost at your chosen resolution, and produces a recommendation.

    What it takes and gives

    Inputs:

    • model_name - a dropdown of your detected model folders; quant type (NF4/INT8/BF16) is auto-detected from the name, which is what drives the weight estimate.
    • resolution - the preset you plan to render at (40 choices, same list as the V2 nodes).
    • reserve_vram_gb - optional, how much VRAM you need to leave for downstream nodes.

    Outputs:

    • report - a STRING with the full breakdown: current VRAM state, estimated model size, estimated inference cost, and a recommended configuration.
    • recommended_blocks - an INT: how many transformer blocks to swap (the value you'd feed into a blocks_to_swap input).
    • recommended_vae - a STRING: where the VAE should live (auto / always_gpu / managed).

    That last output pairing is the practical payoff: it hands you the exact settings to punch into Hunyuan Generate with Latent or Unified V2 rather than guessing at block swap.

    When to use it

    • You're unsure whether a resolution fits your card before waiting for a generation to fail.
    • You want a defensible blocks_to_swap value for a given model/resolution combo.
    • You're comparing NF4 vs INT8 to see what actually fits your VRAM.

    For a quick mental model: inference cost scales with megapixels (the README's rule of thumb is ~15GB/MP at the high end), and the VAE decode plus activations need headroom on top of the model weights - which is why reserve_memory_gb exists here.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/EricRollei/Comfy_HunyuanImage3
    cd Comfy_HunyuanImage3
    pip install -r requirements.txt
    

    Restart ComfyUI, or use ComfyUI Manager (search "Comfy_HunyuanImage3"). It reads model folders from ComfyUI/models/, so drop your weights in there first or the dropdown will just show the defaults.

    The honest caveat

    Estimates are estimates. The calculator runs the same MemoryBudget math the generators use, so it's grounded in the actual code - but your GPU's real numbers (other apps stealing VRAM, driver overhead, a browser eating 2GB) aren't in the equation. Treat the output as a budget baseline, then confirm with the Generate (Telemetry) node's status output on a real run. Also worth knowing: the pack's low-VRAM path deliberately doesn't route through this calculator's block-swap defaults - the NF4 Low VRAM+ loader has its own auto strategy, so don't override its blocks_to_swap with a recommendation meant for the V2 path.

    CategoryHunyuan/V2

    Inputs (3)

    NameTypeDefaultDescription
    model_nameCOMBOHunyuanImage-3-NF4Model folder. Quant type is auto-detected from name.
    resolutionCOMBO1024x1024 (1:1 Square)40 options: Auto (model predicts), 768x1360 (9:16 Portrait), 832x1248 (2:3 Portrait), 864x1216 (5:7 Portrait), 880x1184 (3:4 Portrait), 912x1152 (4:5 Portrait), +34
    reserve_vram_gboptFLOAT0.00–48

    Outputs (3)

    NameTypeDescription
    reportSTRING
    recommended_blocksINT
    recommended_vaeSTRING