yitongl commited on
Commit
383bb79
·
verified ·
1 Parent(s): 90aa35e

Remove checkpoint-750 inference script

Browse files
backend_snapshot/scripts/inference/run_sfp4_ours_p_checkpoint_750.sh DELETED
@@ -1,54 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -euo pipefail
4
-
5
- REPO_ROOT="${REPO_ROOT:-/lustre/fsw/portfolios/nvr/projects/nvr_elm_llm/users/yitongl/code/FastVideo}"
6
- MODEL_PATH="${MODEL_PATH:-Wan-AI/Wan2.1-T2V-1.3B-Diffusers}"
7
- HF_REPO="${HF_REPO:-yitongl/sparse_quant_exp}"
8
- CHECKPOINT_DIR="${CHECKPOINT_DIR:-${REPO_ROOT}/checkpoints/hf_download/sparse_quant_exp}"
9
- WEIGHTS_PATH="${WEIGHTS_PATH:-${CHECKPOINT_DIR}/transformer/diffusion_pytorch_model.safetensors}"
10
- OUTPUT_DIR="${OUTPUT_DIR:-${REPO_ROOT}/outputs/sfp4_v4_sparse09_checkpoint_750}"
11
- PROMPT="${PROMPT:-A cinematic shot of a futuristic city street at dusk, reflective pavement, soft volumetric light, detailed motion, stable camera.}"
12
- NEGATIVE_PROMPT="${NEGATIVE_PROMPT:-Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards}"
13
-
14
- cd "${REPO_ROOT}"
15
-
16
- if [[ -f ".venv/bin/activate" ]]; then
17
- source .venv/bin/activate
18
- fi
19
-
20
- export PYTHONPATH="${REPO_ROOT}/fastvideo-kernel/python:${REPO_ROOT}/fastvideo-kernel:${PYTHONPATH:-}"
21
- export FASTVIDEO_ATTENTION_BACKEND=SPARSE_FP4_OURS_P_ATTN
22
- export FASTVIDEO_SPARSE_FP4_USE_HIGH_PREC_O=1
23
-
24
- if [[ ! -f "${WEIGHTS_PATH}" ]]; then
25
- echo "Missing ${WEIGHTS_PATH}"
26
- echo "Download the uploaded transformer weights first:"
27
- echo " hf download ${HF_REPO} --repo-type model --local-dir ${CHECKPOINT_DIR} --include 'transformer/*'"
28
- exit 1
29
- fi
30
-
31
- mkdir -p "${OUTPUT_DIR}"
32
-
33
- fastvideo generate \
34
- --model-path "${MODEL_PATH}" \
35
- --init-weights-from-safetensors "${WEIGHTS_PATH}" \
36
- --sp-size 1 \
37
- --tp-size 1 \
38
- --num-gpus 1 \
39
- --dit-cpu-offload False \
40
- --vae-cpu-offload False \
41
- --text-encoder-cpu-offload True \
42
- --pin-cpu-memory False \
43
- --height 448 \
44
- --width 832 \
45
- --num-frames 77 \
46
- --num-inference-steps 50 \
47
- --fps 16 \
48
- --guidance-scale 5.0 \
49
- --flow-shift 1.0 \
50
- --prompt "${PROMPT}" \
51
- --negative-prompt "${NEGATIVE_PROMPT}" \
52
- --seed 1000 \
53
- --VSA-sparsity 0.9 \
54
- --output-path "${OUTPUT_DIR}/"