Nodes/Comfy_HunyuanImage3/Hunyuan Unload V2
ComfyUI Node

Hunyuan Unload V2

Pick a mode, drop it in, done

By EricRollei·Created 10 months ago·Updated 4 months ago· 65
Hunyuan Unload V2
      unload_typesoft_unload

      The V2 rewrite in this pack replaced a tangle of memory-management nodes with one philosophy: generate nodes carry a post_action dropdown (keep_loaded / soft_unload_to_cpu / full_unload), and the cache system handles the rest. Hunyuan Unload V2 (class HunyuanUnloadV2) is that same philosophy as a standalone utility - the minimal unload node. One dropdown, no outputs, no confirm gates, no nuclear toggles. If you just want a "clean up now" node that matches the pack's modern cache system, this is the one.

      It's worth being clear about what it is not. It's not the nuanced one - the pack still has Hunyuan 3 Unload (with clear_for_downstream for handing off to Flux/SAM2) and Force Unload (Nuclear) (for stuck VRAM and orphaned tensors). Unload V2 is the plain version for when you don't need any of that nuance: you want Hunyuan out of memory, one way or another.

      How it works

      One required input, an unload_type dropdown with exactly two choices:

      • soft_unload (default) - park the model in CPU RAM. Frees VRAM, keeps the weights warm for a fast restore (~10–30s) the next time a loader needs them.
      • full_unload - free VRAM and RAM. The model is gone entirely; the next load is a full disk reload.

      That's the entire control surface. It's an output node with no outputs - you drop it in the graph, set the mode, and queue. Nothing to wire, nothing to misconfigure.

      How to install it

      Same pack, same routine:

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

      Restart ComfyUI and hard-refresh the browser. Or install via ComfyUI Manager (search HunyuanImage).

      Common issues & troubleshooting

      The choice between the two modes is really the whole "issue" surface, so here's the honest guidance:

      • Soft unload is the right default for a working session - successive runs stay fast because the loader restores from RAM. But the parked model occupies 45GB+ of system RAM. On a 64GB box running NF4, that plus OS and ComfyUI overhead gets uncomfortable.
      • Full unload is for when you're genuinely done with Hunyuan or RAM is precious. Your next Hunyuan run pays the full reload cost - minutes on a big model, not seconds.

      One practical gotcha: if you set soft unload but the next run still reloads from disk, check whether your model was loaded with device_map offloading - soft unload needs offload_mode='disabled' (no meta tensors) to work, same requirement as the dedicated Soft Unload node. In that case full_unload is the mode that reliably does what it says. For anything more surgical - clearing downstream models while keeping Hunyuan, or nuking stuck allocations - the other unload nodes in this pack exist for a reason.

      CategoryHunyuan/V2

      Inputs (1)

      NameTypeDefaultDescription
      unload_typeCOMBOsoft_unload2 options: soft_unload, full_unload

      Outputs (0)

      No outputs