start_server.sh 525 Bytes
Newer Older
helloyongyang's avatar
helloyongyang committed
1
2
#!/bin/bash

helloyongyang's avatar
helloyongyang committed
3
4
5
# set path and first
lightx2v_path=
model_path=
helloyongyang's avatar
helloyongyang committed
6

helloyongyang's avatar
helloyongyang committed
7
export CUDA_VISIBLE_DEVICES=0
helloyongyang's avatar
helloyongyang committed
8

helloyongyang's avatar
helloyongyang committed
9
10
# set environment variables
source ${lightx2v_path}/scripts/base/base.sh
PengGao's avatar
PengGao committed
11

gaclove's avatar
gaclove committed
12
13
14
export ENABLE_GRAPH_MODE=false
export TORCH_CUDA_ARCH_LIST="9.0"

PengGao's avatar
PengGao committed
15
# Start API server with distributed inference service
helloyongyang's avatar
helloyongyang committed
16
python -m lightx2v.api_server \
GoatWu's avatar
GoatWu committed
17
--model_cls wan2.1_distill \
PengGao's avatar
PengGao committed
18
--task i2v \
helloyongyang's avatar
helloyongyang committed
19
--model_path $model_path \
GoatWu's avatar
GoatWu committed
20
--config_json ${lightx2v_path}/configs/distill/wan_i2v_distill_4step_cfg.json \
PengGao's avatar
PengGao committed
21
22
23
24
--port 8000 \
--nproc_per_node 1

echo "Service stopped"