Nodes/ComfyUI-RvTools_v2/Cache Args Switch
ComfyUI Node

Cache Args Switch

A/B Test Your Wan Cache Settings Without Rewiring

By r-vage·Created about a year ago·Updated 5 months ago· 23
Cache Args Switch
  • input1
  • input2
  • cache_args
Input1

If you've ever played with Wan video generation in ComfyUI, you've met the CACHEARGS objects that come out of cache-args setups - bundles of settings that control how the model's cache behaves across a generation. Cache Args Switch is the two-way valve for those bundles: plug two different cache-args sets into it, flip one integer, and pick which one flows through to your Wan workflow. It exists for the same reason every RvTools switch exists: so you can compare configurations by toggling a number instead of redrawing wires.

What it actually is

This is a simple 2-input pass-through. You get:

  • Input (integer, default 1) - the selector. Set it to 1 or 2.
  • input1 / input2 (optional, CACHEARGS type) - the two cache-args bundles you're choosing between. Both are marked forceInput, so they arrive as wires rather than widgets.

The node returns whichever input the selector points at, on a single cache_args output. That output then feeds the cache-args input of your Wan sampling pipeline - the same place a cache-args generator node would normally connect. The mechanism is one if Input == 1: return input1 else: return input2, which is the whole node.

When you'd reach for it

Wan workflows have a real tuning loop around caching: how many steps you cache, whether you cache the model or just the VAE, and where in the denoise schedule the cache kicks in. These aren't settings you want to type in blind, and the typical workflow is to try configuration A, run, try configuration B, run, compare. Cache Args Switch is built for exactly that comparison: build cache set A, build cache set B, wire both in, and flip Input between runs. Same technique people use with the pack's other switches to A/B test models, clips and schedulers.

The one thing to check before you use it: where does the CACHEARGS type actually come from? This node just passes the object through, it doesn't create one - so you need a cache-args generator from a Wan node pack (the type must match CACHEARGS exactly or the wire won't connect). If you're building a Wan pipeline from scratch and don't have a cache-args source yet, that's your missing dependency, not this node's problem.

Installing it

Part of ComfyUI-RvTools_v2 - Manager → search "ComfyUI-RvTools_v2", or:

cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI-RvTools_v2
# restart ComfyUI

No extra dependencies for this node specifically; the Wan cache-args source is your own addition.

Gotchas

The honest caveats, in order of how likely they are to bite you. First, if a shared workflow references Cache Args Switch [RvTools] and Manager can't find it, the workflow is probably built on the old RvTools repo - the author renamed every node with a [RvTools] suffix when he fixed the name clashes, and that's what this pack ships. Second, the README says this pack is unmaintained in favor of ComfyUI_Eclipse. And third, remember the switch passes through whatever it's given - if input1 is None because its source was bypassed, you get None out and the downstream Wan node will fail. Keep at least one input wired to something real, and connect the always-on source to slot 1.

Category🫦 RvTools II/ Switches

Inputs (3)

NameTypeDefaultDescription
InputINT11–2
input1optCACHEARGS
input2optCACHEARGS

Outputs (1)

NameTypeDescription
cache_argsCACHEARGS