Wan Video Cache Samples (QQ)
Stop re-running the expensive sampler while you tune the prompt
- samples
- samples
The most expensive part of iterating on a Wan workflow isn't the model load or the VAE decode - it's the sampler, running 20–30 steps over 81 frames of latents. WanVideoCacheSamples is the pack's answer to that: it saves the latent samples from an expensive sampler pass to disk so you can reload them later and skip that step entirely. The README frames it as the classic speed-up loop: cache the HIGH-step pass, then re-run only the LOW-step pass while you fiddle with prompts and parameters.
The mechanism is dual-mode, which is the clever part:
- With
samplesconnected - it saves the latents to disk (cache + passthrough; the samples also come out the output unchanged). - Without
samplesconnected - it loads from disk instead, emitting the cached latents as its output.
So one node does both halves of the round-trip. The controls are cache_path (default cache_data), cache_name (default wanvideo_cached_samples.pt), and save_over (default true - overwrite the cache each run). The path gets sanitized in code so it can't escape into an absolute path, and it saves relative to the node's directory by default.
Output is a single samples (LATENT) - wire it into a sampler's input where your previous expensive pass used to feed, and the sampler starts from your cached state instead of from scratch.
Why it's a real time-saver
ComfyUI's cacheable-loaders already handle model and text-encoder loading; this node fills the gap for the latents themselves. The pattern that pays off: you're happy with composition and motion but unhappy with lighting or prompt adherence, so you cache the high-noise pass (or a full-quality pass), then experiment with the low-noise pass / CFG / a lighter sampler at a fraction of the cost. Combined with cached text embeddings (the same philosophy the KB's LoRA essay calls "the single biggest speed lever" in modern workflows), it turns long iteration loops into short ones.
Installing it
Part of siraxe/ComfyUI-WanVideoWrapper_QQ via ComfyUI Manager (search WanVideoWrapper_QQ/SA-Nodes-QQ), or:
cd ComfyUI/custom_nodes
git clone https://github.com/siraxe/ComfyUI-WanVideoWrapper_QQ.git
Restart ComfyUI. No extra dependencies.
Gotchas
- Stale caches are silent liars. With
save_overon, reconnectingsamplesoverwrites; but if you change your latent-generating inputs (resolution, frame count) and load an old cache, the shapes won't match and you'll get errors or nonsense. Name caches by parameter set (myclip_81f.pt) and delete caches when you change the pipeline. - Load-only mode still needs the graph's other nodes - this caches latents, not the whole run. Changing the model or VAE means the cached latents may no longer make sense.
- Pack note: repo renamed to ComfyUI-SA-Nodes-QQ in v1.3.4; delete any stale
wanwrapper_qqfolder incustom_nodesif old workflows reference it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| cache_path | STRING | cache_data | — |
| cache_name | STRING | wanvideo_cached_samples.pt | — |
| save_over | BOOLEAN | true | — |
| samplesopt | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |