-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinference_command_examples.sh
More file actions
70 lines (58 loc) · 2.28 KB
/
inference_command_examples.sh
File metadata and controls
70 lines (58 loc) · 2.28 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# single-gpu run 1.3B (480p)
python infer_multishot.py \
--test_csv_path "toy_cases/test_multishot.csv" \
--output_name "1.3B" \
--model_path_json "checkpoints/model_configs/model_path_1.3B.json" \
--target_width 832 \
--target_height 480
# multi-gpu run 1.3B (480p)
SEQUENCE_PARALLEL_SIZE=4
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun --nproc_per_node=$SEQUENCE_PARALLEL_SIZE infer_multishot.py \
--test_csv_path "toy_cases/test_multishot.csv" \
--output_name "1.3B_usp" \
--model_path_json "checkpoints/model_configs/model_path_1.3B.json" \
--use_usp True \
--target_width 832 \
--target_height 480
# single-gpu run 14B (480p)
python infer_multishot.py \
--test_csv_path "toy_cases/test_multishot.csv" \
--output_name "14B" \
--model_path_json "checkpoints/model_configs/model_path_14B.json" \
--target_width 832 \
--target_height 480
torchrun --nproc_per_node=8 infer_multishot.py \
--test_csv_path "toy_cases/test_multishot.csv" \
--output_name "14B_480" \
--model_path_json "checkpoints/model_configs/model_path_14B.json" \
--target_width 832 \
--target_height 480 \
--use_usp True
# single-gpu run 14B (720p)
python infer_multishot.py \
--test_csv_path "toy_cases/test_multishot.csv" \
--output_name "14B_720" \
--model_path_json "checkpoints/model_configs/model_path_14B.json" \
--target_width 1280 \
--target_height 720
# multi-gpu run 14B (720p)
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun --nproc_per_node=4 infer_multishot.py \
--test_csv_path "toy_cases/test_multishot.csv" \
--output_name "14B_720" \
--model_path_json "checkpoints/model_configs/model_path_14B.json" \
--target_width 1280 \
--target_height 720 \
--use_usp True
torchrun --nproc_per_node=8 infer_multishot.py \
--test_csv_path "toy_cases/test_multishot.csv" \
--output_name "14B_720" \
--model_path_json "checkpoints/model_configs/model_path_14B.json" \
--target_width 1280 \
--target_height 720 \
--use_usp True
# Example for Inference with Customized Multi-Shot Prompts
python infer_multishot_with_recaption_example.py \
--output_name "1.3B_customized_input" \
--model_path_json "checkpoints/model_configs/model_path_1.3B.json" \
--target_width 832 \
--target_height 480