ComfyUI Node

Apply ToCa

The zero-knob cache in the pack

By shenduldh·Created 2 years ago·Updated about a year ago· 225
Apply ToCa
  • model
  • MODEL

Every other caching node in this pack hands you a fistful of thresholds, skip-block strings, and schedule windows to tune. Apply ToCa hands you exactly one input: your model. No threshold, no start/end window, no skip lists. That's either refreshingly simple or a black box, depending on how much you like knobs - but it's genuinely how the node is built.

What it is and why you'd reach for it

ToCa - Token-wise Caching, from Shenyi-Z/ToCa, added to this pack in February 2025 per its changelog - takes caching down to a finer grain than the block-level schemes elsewhere in this pack. Where FBCache and MBCache decide "is this whole block's output similar enough to last step to skip recomputing it," token-wise caching operates on individual tokens within the sequence, deciding per-token whether it's changed enough since the last step to be worth recomputing. It's a different axis of the same underlying observation everything in this pack exploits: diffusion models do a lot of repetitive work across steps, and skipping the parts that haven't meaningfully changed is nearly free performance.

If you've tried FBCache or TeaCache and want a different tradeoff to compare against - or just want the simplest possible on/off caching option to drop into a graph without tuning anything - this is that option.

How it works

The node wraps your model with ToCa's caching logic and hands back a patched version. Because there's no exposed threshold or schedule window, whatever sensitivity and scheduling ToCa uses internally is fixed by the implementation rather than left to you - you either apply it or you don't.

The inputs and outputs that matter

There's really only one thing to say here:

  • model - your loaded diffusion model, in. A patched MODEL, out.

That's it. No optional inputs, no tunable parameters exposed on the node itself.

How to install it

  • ComfyUI Manager - search "ComfyUI-Lightning", install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/shenduldh/ComfyUI-Lightning, then restart.

No extra dependencies specific to this node. You need the standard Flux stack from the README to have something for it to patch: flux1-dev.safetensors or flux1-schnell.safetensors in models/diffusion_models, ae.safetensors in models/vae, the flux_text_encoders files in models/clip.

Common issues & troubleshooting

I want to tune how aggressive it is and there's nothing to adjust. That's not a missing feature you're overlooking - the node genuinely exposes no configuration. If you need finer control over the speed/quality tradeoff, that's a reason to use FBCache, MBCache, or TeaCache instead, all of which expose thresholds you can dial.

Quality is worse than I expected with no way to back it off. Since there's no threshold to lower, your only lever is the same as the toggle-based nodes elsewhere in the pack: remove it from the graph and compare against an uncached run. If the quality cost isn't acceptable for your use case, one of the tunable caching nodes will serve you better.

How does it compare to FBCache/MBCache/TeaCache for speed? The pack doesn't publish comparative benchmarks between its own caching options, and results vary by content and resolution - the honest approach is to try it on your actual workflow with a fixed seed and compare against the alternatives yourself, the same way you'd A/B any of the caching nodes here.

CategoryLightning/ToCa

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
MODELMODEL