Nodes/ComfyUI-TaylorSeer/WanvideoBlockSwap
ComfyUI Node

WanvideoBlockSwap

Keep Wan 2.x rendering when VRAM runs dry

By philipy1219·Created about a year ago·Updated 7 months ago· 60
WanvideoBlockSwap
    • block_swap_args
    double_block_swap0

    Wan 2.1/2.2 video is the reason many people buy bigger GPUs. An 81-frame clip through the 14B model is a lot of attention and a lot of VRAM, and adding TaylorSeerLite's cache on top - even a near-zero-VRAM one - is enough to push a 12GB card over the edge. WanvideoBlockSwap is the trim that frees the memory: it offloads the leading transformer blocks of the Wan DiT to the CPU so your render fits.

    As with every BlockSwap node in this pack, you're trading VRAM for wall-clock time. The offloaded blocks must shuffle between devices each run, so the speedup Lite would otherwise give you shrinks in proportion to how much you swap. It's the "make it fit" knob, not the "make it fast" knob.

    How it works

    Wan's backbone is a stack of transformer blocks, and this node offloads the first N of them:

    • double_block_swap (0–16) - the first N blocks parked off-GPU

    That's the only input - video's DiT doesn't get the separate single-stream stage that Flux and HiDream have, so the two-input dance isn't needed here. The freed amount prints as total_offload_memory: xxx MB when the cache initializes, and the blocks return to the GPU once sampling finishes, so your next (non-video) workflow isn't slowed down.

    Same house rule as its siblings: this node only emits a block_swap_args output. Wire it into TaylorSeerLite's optional block_swap_args input with model_type set to wanvideo. On its own it does nothing.

    What to set

    Video is memory-hungry, so don't be timid - but don't zero the card's compute either. Start around 4 blocks and read the total_offload_memory line. Wan at 720p with a long clip is where this earns its keep; if you find yourself swapping half the network to boot, cut resolution or frame count before you butcher speed further. The README's 3x Wan figure is measured without heavy blockswap, so the more you offload, the further that headline number drifts.

    Install

    Same pack, no extra dependencies, no model files:

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

    Restart ComfyUI or install through Manager (search "ComfyUI-TaylorSeer"). Keep ComfyUI newer than commit c496e53; this pack patches ComfyUI's model internals, which change between releases.

    Troubleshooting

    • Nothing offloads - block_swap_args isn't reaching a TaylorSeerLite node, or model_type isn't wanvideo. Both must be correct.
    • Still OOM at high res - blockswap is a trim, not a miracle. Lower the resolution/frame count first, then swap blocks to reclaim the rest.
    • Render got much slower - over-swapped. Pull double_block_swap down until the total_offload_memory freed is just enough headroom; you want the smallest offload that fits.
    CategoryTaylorSeer

    Inputs (1)

    NameTypeDefaultDescription
    double_block_swapINT00–16Double block swap.

    Outputs (1)

    NameTypeDescription
    block_swap_argsBLOCKSWAPARGS