File size: 758 Bytes
1d0c0cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

set -euo pipefail

BUNDLE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FASTVIDEO_ROOT="${FASTVIDEO_ROOT:-}"

if [[ -z "${FASTVIDEO_ROOT}" ]]; then
    echo "FASTVIDEO_ROOT is not set."
    echo "Set it to a FastVideo source checkout or installed package root, for example:"
    echo "  FASTVIDEO_ROOT=/path/to/FastVideo bash standalone_inference/run.sh"
    exit 1
fi

python "${BUNDLE_ROOT}/install_overlay.py" --fastvideo-root "${FASTVIDEO_ROOT}"

export PYTHONPATH="${FASTVIDEO_ROOT}/fastvideo-kernel/python:${FASTVIDEO_ROOT}/fastvideo-kernel:${PYTHONPATH:-}"
export FASTVIDEO_ATTENTION_BACKEND=SPARSE_FP4_OURS_P_ATTN
export FASTVIDEO_SPARSE_FP4_USE_HIGH_PREC_O=1

cd "${FASTVIDEO_ROOT}"
python "${BUNDLE_ROOT}/run_inference.py" "$@"