Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text to video

CachedSearch

by Shreshth shreshthsaini/CachedSearch

CachedSearch is an open-weight model for text to video from Shreshth, released under MIT License. Its published files total 469.6 KB.

CachedSearch makes best-of-N seed search cheaper for video diffusion models. It generates every candidate with a training-free cache turned on, scores the cached drafts with a verifier, and regenerates only the winning seed at full compute.

Parameters—
Context—
Weights469.6 KB
Licensemit
AccessOpen weights
Monthly Downloads—

Model Card

By Shreshth, published under mit, revision 914261a0b2d3.

CachedSearch makes best-of-N seed search cheaper for video diffusion models. It generates every candidate with a training-free cache turned on, scores the cached drafts with a verifier, and regenerates only the winning seed at full compute. The method needs no training, so this repository holds no weights. It holds the official implementation: the cachedsearch Python package and two example scripts, copied unchanged from the GitHub repository at commit cc2a637. 1. Generate every candidate with a training-free cache enabled. 2. Score the cached drafts with the verifier the search uses. 3. Select the seed with the highest draft score. 4. Regenerate only that seed at full compute and return…

Read Shreshth's full model card

CachedSearch: Training-Free Cached Exploration for Test-Time Search in Video Diffusion

Paper (arXiv 2607.23159) · Code · Project page · ComfyUI nodes · Diffusers community script

CachedSearch makes best-of-N seed search cheaper for video diffusion models. It generates every candidate with a training-free cache turned on, scores the cached drafts with a verifier, and regenerates only the winning seed at full compute.

The method needs no training, so this repository holds no weights. It holds the official implementation: the cachedsearch Python package and two example scripts, copied unchanged from the GitHub repository at commit cc2a637.

How it works

  1. Generate every candidate with a training-free cache enabled.
  2. Score the cached drafts with the verifier the search uses.
  3. Select the seed with the highest draft score.
  4. Regenerate only that seed at full compute and return it.
drafts = [cached_generate(prompt, seed) for seed in seeds]
winner = seeds[argmax(verifier(video, prompt) for video in drafts)]
return full_generate(prompt, winner)

The sampler is deterministic in the seed, so the delivered video matches what full-compute search returns whenever both pick the same seed. Caching can change which candidate wins. It does not change the quality of the video you get back.

Results reported in the official README:

  • Ranking survives caching: median Spearman rho is 0.905, with 72% top-1 agreement on VBench.
  • Exploring under caching and committing at full compute retains 94.7% of the best-of-8 gain at 63% of the cost.
  • Ranking failures concentrate where candidates are nearly tied, so they cost little.
  • The approach works with any published cache engine and transfers across six models in four families.

Files

Path Contents
cachedsearch/api.py cached_search, cached_search_batch, calibrate_tau
cachedsearch/caching.py CacheConfig, CachedTransformer, wrap_pipeline (the EasyCache-style adaptive cache and a static baseline)
cachedsearch/verifiers.py the default ImageReward verifier
examples/run_wan.py best-of-8 search on Wan2.1
examples/calibrate_new_model.py threshold calibration for a new model family

Install

Install from GitHub:

pip install "git+https://github.com/shreshthsaini/CachedSearch.git@cc2a637c89485af723233aeb8ad76190b572a464"

Or fetch the package from this repository, with no install step:

import sys
from huggingface_hub import snapshot_download

repo_dir = snapshot_download("shreshthsaini/CachedSearch", allow_patterns=["cachedsearch/*"])
sys.path.insert(0, repo_dir)

Requirements: torch, diffusers, numpy, plus whatever your pipeline needs (transformers for the text encoder). The default verifier needs image-reward. Pass your own verifier= to skip that dependency.

Usage

cached_search takes any diffusers video pipeline that exposes .transformer. The verifier is any callable (frames, prompt) -> float where higher is better.

The example below runs on CPU in a few seconds. It uses hf-internal-testing/tiny-wan-pipe, a tiny Wan pipeline with random weights, and a toy verifier. It checks that the search loop and the cache run end to end. The frames are noise and the scores mean nothing.

import sys

import numpy as np
import torch
from diffusers import WanPipeline
from huggingface_hub import snapshot_download

# Skip these two lines if you installed the package with pip.
repo_dir = snapshot_download("shreshthsaini/CachedSearch", allow_patterns=["cachedsearch/*"])
sys.path.insert(0, repo_dir)

from cachedsearch import CacheConfig, cached_search
from cachedsearch.caching import wrap_pipeline

pipe = WanPipeline.from_pretrained("hf-internal-testing/tiny-wan-pipe", torch_dtype=torch.float32)
gen_kwargs = dict(height=32, width=32, num_frames=9, guidance_scale=5.0)


def toy_verifier(frames, prompt):
    # Stand-in scorer so the example runs without ImageReward. Not a quality metric.
    return float(np.asarray(frames).mean())


result = cached_search(
    pipe,
    "a red fox running through deep snow",
    verifier=toy_verifier,
    n=4,             # search width
    tau=0.10,        # caching threshold
    steps=20,
    mode="commit",   # regenerate the winner at full compute
    gen_kwargs=gen_kwargs,
)

print(result.seed)                      # the seed that won
print(result.draft_scores)              # verifier score of every cached draft
print(np.asarray(result.video).shape)   # (9, 32, 32, 3), the full-compute video

# Count how many transformer calls one cached rollout skips.
cache = wrap_pipeline(pipe, CacheConfig(mode="adaptive", tau=0.10, total_steps=20))
cache.reset()
pipe(prompt="a red fox running through deep snow", num_inference_steps=20,
     generator=torch.Generator().manual_seed(0), **gen_kwargs)
print(cache.stats())

Output on CPU with torch 2.14.1 and diffusers 0.41.0:

3
[0.4587..., 0.4588..., 0.4589..., 0.4590...]
(9, 32, 32, 3)
{'transformer0': {'branch0': {'skips': 8, 'computes': 12}, 'branch1': {'skips': 8, 'computes': 12}}}

With these settings the cache skips 8 of 20 transformer calls per classifier-free-guidance branch.

Real models

For a real model, load the checkpoint on a GPU and drop the verifier argument to use ImageReward averaged over 8 frames, the scorer behind the paper's numbers. examples/run_wan.py does this for Wan-AI/Wan2.1-T2V-1.3B-Diffusers:

pip install image-reward imageio imageio-ffmpeg
python examples/run_wan.py --prompt "a red fox running through deep snow"

This script and examples/calibrate_new_model.py are the official ones from the GitHub repository. They need a CUDA GPU and were not rerun when this card was written. Only the CPU example above was.

Thresholds for tested models

The caching threshold tau is the one model-specific number. The table below comes from the official README: the recommended tau is the most aggressive setting that still keeps at least 85% of the search gain in the calibration sweep.

Model Params Family Recommended tau Gain capture Exploration speedup
Wan2.1-T2V-1.3B 1.3B Wan 0.20 88.3% 2.41x
Wan2.1-T2V-14B 14B Wan 0.10 87.5% 2.05x
Wan2.2-TI2V-5B 5B Wan 0.10 86.0% 2.05x
CogVideoX-5B 5B CogVideoX 0.05 85.9% 1.78x
HunyuanVideo 13B HunyuanVideo 0.05 85.1% 1.77x
LTX-Video 2B LTX 0.02 79.6% 1.71x

No threshold measured for LTX-Video reached 85% capture. For a model that is not listed, run examples/calibrate_new_model.py once (about two GPU-hours) and use the threshold it recommends. Do not copy a threshold across model families.

Modes

  • mode="commit" (default): regenerate the winner with caching off. The delivered video is a full-compute sample.
  • mode="keep": return the cached draft of the winner. Cheaper, with mild motion dampening at aggressive thresholds.

Citation

@article{saini2026cachedsearch,
  title         = {CachedSearch: Training-Free Cached Exploration for Test-Time Search in Video Diffusion},
  author        = {Saini, Shreshth and Birkbeck, Neil and Wang, Yilin and Adsumilli, Balu and Bovik, Alan C.},
  year          = {2026},
  eprint        = {2607.23159},
  archivePrefix = {arXiv},
  primaryClass  = {cs.AI}
}

License

MIT. See LICENSE.

Identity and Version

Repository
shreshthsaini/CachedSearch
Publisher
Shreshth
Task
Text to video
Modality
Video
Library
diffusers
Parameters
Not stated by the source
Languages
wan, ltx-video
Revision
914261a0b2d338905a28e93dccc80e25344b453d
First published
2026-10-13
Last updated
2026-10-13

Files and Weights

11 files, 469.6 KB in total.

Configuration6 files · 18.4 KB
Documentation2 files · 9.3 KB
Other2 files · 440.2 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
cachedsearch/__init__.pyConfiguration801 B —
cachedsearch/api.pyConfiguration7.0 KB —
cachedsearch/caching.pyConfiguration5.1 KB —
cachedsearch/verifiers.pyConfiguration1.7 KB —
examples/calibrate_new_model.pyConfiguration1.7 KB —
examples/run_wan.pyConfiguration2.0 KB —
LICENSEDocumentation1.1 KB —
README.mdDocumentation8.2 KB —
assets/fig1_overview.pngOther145.8 KB e02ca2ba73d1
assets/fig2_method.pngOther294.4 KB ccbdd6960a48
.gitattributesRepository1.6 KB —

License and Download

License
mit
Access
Open weights, no gate
Download from Shreshth

Released by Shreshth through its official repository on Hugging Face. Read the license.

Built From

  • Described by arXiv:2607.23159

Questions About CachedSearch

Can I use CachedSearch commercially?

Yes. CachedSearch is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

Model · Text to video

Wan2.2-T2V-A14B-GGUF

QuantStack

This GGUF file is a direct conversion of Wan-AI/Wan2.2-T2V-A14B Since this is a quantized model, all original licensing terms and usage restrictions remain in effect. Usage The model can be used with the ComfyUI custom node ComfyUI-GGUF by city96 Place model files in ComfyUI/models/unet see the GitHub readme for further installation instructions.

Open weights apache-2.0 gguf

Model · Text to video

MiniMax-H3-Turbo-Lora

Larryvrh

A LoRA for MiniMax-H3 that renders joint video + synchronized stereo audio in as few as 4 sampling steps instead of the usual ~20 — a ~5× sampling speedup — and keeps getting better as you add steps. For most work, use minimaxh3turbov4step600ema.safetensors. It's the markedly better micro-detail (faces, fingers, fine texture), and the over-sharpening / plastic look of the earlier v1 (~850) line is fully resolved. v4 introduced a static-frame enhancement — a big win for static and small-motion content. The one trade-off shows up only at 4 steps with large, fast motion, where v4 can produce motion-smear / trailing ghosting (we're actively fixing this). Two things address it: - Use 6–8 steps.…

Open weights apache-2.0 minimax-h3

Model · Text to video

MiniMax-H3-Turbo-Lora-ComfyUI

DRBAPH

This repository contains MiniMax-H3 Turbo and few-step LoRAs converted and optimized for ComfyUI. These LoRAs accelerate MiniMax-H3 video and synchronized-audio generation by reducing the required number of sampling steps. Four HyperFlow 8-step MiniMax-H3 LoRAs are now included. They are derived from the original HyperFlow release by Video Rebirth: HyperFlow is an 8-step MiniMax-H3 LoRA designed for the MiniMax-H3 T2VA, FL2VA and Ref2VA workflows. The upstream HyperFlow implementation uses its own fixed 8-step sigma schedule. For these ComfyUI conversions, the recommended manual sigma sequence is: This is a nine-point sigma sequence defining eight denoising intervals. Use the non-pruned…

Open weights apache-2.0 minimax-h3

Model · Text to video

Sulphur-2-base

Sulphur

Sulphur 2 An uncensored video generation model based on LTX 2.3 supporting both t2v and i2v natively, as well as all of the other ltx 2.3 formats. Follow us on X Join our Discord Support the next version of the project, even just a few dollars would go a long way: Kofi To get started with the model, I recommend downloading either of the dev versions, (fp8mixed or bf16) and downloading the distill lora provided. By the way, I'm aware the workflows contain sulphurfinal right now, just use the lora or use the full models, don't use both at the same time. This model contains a prompt enhancer. The easiest way to get started with the prompt enhancer is by using it on lmstudio. The way to…

Open weights diffusers

Model · Text to video

Wan2.1-VACE-1.3B-GGUF

Sam

Wan2.1 is an open-source suite of video foundation models, compatible with consumer-grade GPUs, that excels in various video generation tasks like text-to-video, image-to-video, and video editing, even supporting visual text generation. Download models using huggingface-cli: You can also download directly from this page. This model is a derivative work of the original model licensed under the Apache 2.0 License, and is therefore distributed under the terms of the same license. Thanks to Patrick Gillespie for creating the ASCII text art tool used in this project https://patorjk.com/software/taag/ Wan-AI for the Wan model https://huggingface.co/Wan-AI/Wan2.1-VACE-1.3B…

Open weights apache-2.0 diffusers

Model · Text to video

Wan2.1-T2V-1.3B-GGUF

Sam

Wan2.1 is an open-source suite of video foundation models, compatible with consumer-grade GPUs, that excels in various video generation tasks like text-to-video, image-to-video, and video editing, even supporting visual text generation. Download models using huggingface-cli: You can also download directly from this page. This model is a derivative work of the original model licensed under the Apache 2.0 License, and is therefore distributed under the terms of the same license. Thanks to Patrick Gillespie for creating the ASCII text art tool used in this project https://patorjk.com/software/taag/ Wan-AI for the Wan model https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B…

Open weights apache-2.0 diffusers