Skip to content

bench_serving

Benchmark online serving for diffusion models (Image/Video Generation).

Example usage

launch a server and benchmark on it

T2V or T2I or any other multimodal generation model

fastvideo serve --model-path Wan-AI/Wan2.1-T2V-1.3B-Diffusers --port 8000

benchmark it and make sure the port is the same as the server's port

fastvideo bench --dataset vbench --num-prompts 20 --port 8000

Classes

fastvideo.entrypoints.cli.bench_serving.VBenchDataset

VBenchDataset(args, api_url: str, model: str)

Bases: BaseDataset

Dataset loader for VBench prompts. Supports t2v, i2v.

Source code in fastvideo/entrypoints/cli/bench_serving.py
def __init__(self, args, api_url: str, model: str):
    super().__init__(args, api_url, model)
    self.cache_dir = os.path.join(os.path.expanduser("~"), ".cache", "fastvideo")
    self.items = self._load_data()

Functions