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

3
4
5
6
7
8
# set path and first
lightx2v_path=""
model_path=""

# check section
if [ -z "${CUDA_VISIBLE_DEVICES}" ]; then
helloyongyang's avatar
helloyongyang committed
9
    cuda_devices=6
helloyongyang's avatar
helloyongyang committed
10
    echo "Warn: CUDA_VISIBLE_DEVICES is not set, using defalt value: ${cuda_devices}, change at shell script or set env variable."
11
12
    export CUDA_VISIBLE_DEVICES=${cuda_devices}
fi
helloyongyang's avatar
helloyongyang committed
13

14
15
16
17
if [ -z "${lightx2v_path}" ]; then
    echo "Error: lightx2v_path is not set. Please set this variable first."
    exit 1
fi
helloyongyang's avatar
update  
helloyongyang committed
18

19
20
21
22
if [ -z "${model_path}" ]; then
    echo "Error: model_path is not set. Please set this variable first."
    exit 1
fi
helloyongyang's avatar
update  
helloyongyang committed
23

24
25
export TOKENIZERS_PARALLELISM=false

26
export PYTHONPATH=${lightx2v_path}:$PYTHONPATH
helloyongyang's avatar
update  
helloyongyang committed
27

28
export ENABLE_PROFILING_DEBUG=true
helloyongyang's avatar
helloyongyang committed
29
export ENABLE_GRAPH_MODE=false
30

helloyongyang's avatar
helloyongyang committed
31
python -m lightx2v \
helloyongyang's avatar
helloyongyang committed
32
--model_cls hunyuan \
helloyongyang's avatar
helloyongyang committed
33
--task t2v \
helloyongyang's avatar
helloyongyang committed
34
--model_path $model_path \
helloyongyang's avatar
helloyongyang committed
35
--config_json ${lightx2v_path}/configs/hunyuan_t2v.json \
Xinchi Huang's avatar
Xinchi Huang committed
36
--prompt "A cat walks on the grass, realistic style." \
helloyongyang's avatar
helloyongyang committed
37
--save_video_path ./output_lightx2v_hy_t2v.mp4