File size: 1,064 Bytes
f70ac4f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/usr/bin/env python
"""Download the VBench weights the eight protocol dimensions need.
Everything lands in $VBENCH_CACHE_DIR so the run does not depend on whatever a
user's ~/.cache happens to hold. `local=True` is used wherever VBench supports
it, so CLIP and DINO come from the cache directory too rather than from the clip
package's own download path.
"""
import os
import sys
DIMS = ["subject_consistency", "background_consistency", "motion_smoothness",
"dynamic_degree", "aesthetic_quality", "imaging_quality", "scene",
"overall_consistency"]
def main():
from vbench.utils import init_submodules, CACHE_DIR
print("CACHE_DIR =", CACHE_DIR, flush=True)
for d in DIMS:
print(f"--- {d} ---", flush=True)
try:
got = init_submodules([d], local=True, read_frame=False)
print(f" ok: {got.get(d)}", flush=True)
except Exception as e:
print(f" FAILED: {type(e).__name__}: {e}", flush=True)
print("done", flush=True)
if __name__ == "__main__":
sys.exit(main())
|