WAN Cache Args Multi-Switch
Pick your TeaCache profile on the fly
- input1
- input2
- input3
- input4
- input5
- cache_args
This is a first-non-None switch for CACHEARGS - and if you don't know what CACHEARGS are, that's the real story here. These sockets come from Kijai's ComfyUI-WanVideoWrapper, the community's primary third-party wrapper for Wan video. CACHEARGS is the TeaCache configuration: the temporal-cache acceleration that skips redundant computation across similar frames. TeaCache is one of the biggest speed wins in local Wan - one community benchmark went from 40 minutes for an 81-frame 720p render down to about 5:30 with TeaCache, SageAttention and torch.compile - so it's not a corner of the workflow; it's the thing making Wan usable on a single GPU.
The node itself is dead simple, like every multi-switch in this pack: up to five input1–input5 CACHEARGS sockets, and it returns the first one that isn't None. No widget to flip - you choose by bypassing inputs. Wire different TeaCache args in, bypass the ones you don't want this run, and the surviving first slot wins. The README pattern applies: put the bypassable options in the early slots and your always-on default last, because an always-enabled source in slot 1 is never None and will silently shadow everything after it.
Why would you want different cache profiles to switch between? TeaCache has a threshold parameter - higher threshold, bigger speedup, more quality loss. The community consensus is that TeaCache's face consistency costs you, so a sensible setup is: a fast branch with an aggressive threshold for iteration, a clean branch with a conservative one (or none) for final output, and this switch picking between them. Add the Purge_VRAM toggle (the only required widget, default off) if you want the switch to unload all models from VRAM before it runs - useful when branches pull different models.
Output is a single cache_args socket that feeds the WanVideoWrapper sampler's cache-args input. That's the whole lifecycle: wrapper produces CACHEARGS → this switch routes → sampler consumes.
Installing it
The switch ships in ComfyUI-RvTools_v2 (Manager → search ComfyUI-RvTools_v2, or git clone https://github.com/r-vage/ComfyUI-RvTools_v2 into custom_nodes, restart). But it's only half the story: you also need ComfyUI-WanVideoWrapper installed or these sockets won't exist to wire into. The pack's own requirements don't mention it, because the switch doesn't import it - the types just have to exist in your node environment. No model downloads for the switch itself.
The pack is unmaintained (README → ComfyUI_Eclipse). The [RvTools] suffix is from v2's rename after v1's repo vanished.
Common issues
- Sockets are dead / node won't load - WanVideoWrapper isn't installed. It's the implicit dependency for every WAN-type node in this pack.
- "Missing Input" error - all five slots bypassed or empty. Keep a default wired in the last slot.
- TeaCache making faces weird - that's the threshold, not the switch. Dial the cache args' threshold down for final renders.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| Purge_VRAM | BOOLEAN | false | — |
| input1opt | CACHEARGS | — | |
| input2opt | CACHEARGS | — | |
| input3opt | CACHEARGS | — | |
| input4opt | CACHEARGS | — | |
| input5opt | CACHEARGS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cache_args | CACHEARGS | — |