Skip to content

Add VBench benchmarking suite and scripts - #475

Open
jitendra-jalwaniya wants to merge 1 commit into
mainfrom
vbench
Open

Add VBench benchmarking suite and scripts#475
jitendra-jalwaniya wants to merge 1 commit into
mainfrom
vbench

Conversation

@jitendra-jalwaniya

@jitendra-jalwaniya jitendra-jalwaniya commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Overview

This PR introduces a standardized benchmarks/ framework to MaxDiffusion, starting with the VBench video-generation benchmark integration. It provides an end-to-end, two-stage evaluation pipeline tailored for Wan text-to-video (T2V) models: generating videos on Google Cloud TPU and evaluating quality dimensions on GPU.


Key Changes

1. Benchmark Framework & Documentation

  • benchmarks/README.md: Establishes the organizational guidelines for adding runnable benchmark suites and evaluation metadata across models.
  • benchmarks/vbench/README.md: Detailed workflow documentation, parameter references, and usage examples for running locally or remotely via SSH.

2. Dataset & Metadata

  • benchmarks/vbench/prompts_110.txt: A curated 110-prompt downsampled subset from the VBench benchmark.
  • benchmarks/vbench/VBench_full_info_sub110.json: Aligned evaluation metadata covering all relevant VBench quality and semantic dimensions corresponding 1-to-1 with the prompt file.

3. Generation & Evaluation Automation

  • benchmarks/vbench/run_tpu_generation.sh:
    • Automates Wan video generation on TPU VMs (local execution or remote via --ssh).
    • Sets recommended inference configurations (e.g., Ulysses custom attention, KV caching, context/data parallelism, bfloat16, experimental scheduler).
    • Handles external disk mounting, Hugging Face caching, multi-seed generation, and uploads results directly to GCS at gs://<bucket>/<run-name>/videos.
  • benchmarks/vbench/run_gpu_eval.sh:
    • Automates VBench evaluation on GPU VMs (local or via --ssh).
    • Clones VBench, sets up dependencies, downloads video outputs from GCS, and runs dimension scoring.
    • Copies results back and uploads to gs://<bucket>/<run-name>/vbench_results (handles SSH credential passthrough without requiring GPU VM GCS service account scopes).
  • benchmarks/vbench/gpu_eval_utils.py:
    • Helper CLI providing dimension extraction, automated upstream VBench patching (PyTorch version checking, distributed rank device mapping), and video naming/symlink formatting matching VBench expectations.

Workflow

[TPU VM] run_tpu_generation.sh
   └─> Generates Wan videos -> uploads to gs://<bucket>/<run-name>/videos
                                      │
                                      ▼
[GPU VM] run_gpu_eval.sh
   └─> Downloads videos -> evaluates VBench metrics -> uploads to gs://<bucket>/<run-name>/vbench_results

How to Test

1. TPU Generation

Direct on TPU or remote via SSH:

bash benchmarks/vbench/run_tpu_generation.sh --ssh \
  GCS_BUCKET=<your-bucket> \
  TPU_NAME=<tpu-vm-name> \
  RUN_NAME=wan-vbench-test

2. GPU Evaluation

Direct on GPU or remote via SSH:

bash benchmarks/vbench/run_gpu_eval.sh --ssh \
  GCS_BUCKET=<your-bucket> \
  GPU_NAME=<gpu-vm-name> \
  RUN_NAME=wan-vbench-test

3. Python Helper Verification

python3 benchmarks/vbench/gpu_eval_utils.py dimensions benchmarks/vbench/VBench_full_info_sub110.json

@github-actions

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a VBench evaluation workflow for MaxDiffusion, specifically tailored for Wan text-to-video models. It adds TPU generation and GPU evaluation scripts, utility helpers, and a downsampled 110-prompt benchmark dataset. The feedback suggests improving the robustness and portability of the scripts by using POSIX-compliant disk space checks, always enforcing virtual environment creation to avoid PEP 668 issues, and explicitly specifying UTF-8 encoding when reading and writing files.

Comment thread benchmarks/vbench/run_tpu_generation.sh Outdated
Comment thread benchmarks/vbench/run_tpu_generation.sh Outdated
Comment thread benchmarks/vbench/gpu_eval_utils.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant