YFanwang commited on
Commit
396e494
·
verified ·
1 Parent(s): e0653b1

Upload VideoX-Fun/evaluation_vbench2.0_rub_binary1_1000.sh

Browse files
VideoX-Fun/evaluation_vbench2.0_rub_binary1_1000.sh ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ echo "正在启动 8 个并行的独立任务,并为每个任务分配不同参数..."
4
+ # echo "等待 1 小时后启动任务..."
5
+ # sleep 3600 # 等待 3600 秒,即 1 小时
6
+ # source activate wan
7
+ export LD_LIBRARY_PATH=/usr/local/cuda/lib64
8
+
9
+ # 1. 在这里预先定义你的参数数组 (a_i)
10
+ # 数组元素的数量应该与你的任务数量(8)相匹配。
11
+ # 参数可以是任何字符串,比如文件名、配置名、数值等。
12
+ save_folder='validation_samples/samples_vbench2_all_wan_aug2'
13
+ sampler_name='Flow'
14
+ num_generated_videos=-1
15
+ prompt_list_path1='/nfs/ywang29/Reward_finetuning/VideoX-Fun/VBench/VBench-2.0/prompts/prompt_aug/Wanx_full_text_aug_part1.txt'
16
+ prompt_list_path2='/nfs/ywang29/Reward_finetuning/VideoX-Fun/VBench/VBench-2.0/prompts/prompt_aug/Wanx_full_text_aug_part2.txt'
17
+
18
+ save_folder_videogen='validation_samples/samples_videogen_eval'
19
+ prompt_list_path3='/nfs/ywang29/Reward_finetuning/VideoX-Fun/VideoGen-Eval.txt'
20
+
21
+ # enable_teacache=False
22
+ # num_inference_steps=50
23
+
24
+
25
+ save_folder_div='validation_samples/samples_vbench2_all_wan_aug2/Diversity'
26
+ prompt_list_path_div='/nfs/ywang29/Reward_finetuning/VideoX-Fun/VBench/VBench-2.0/prompts/prompt_aug/wanx_aug_prompt/Diversity_dup.txt'
27
+
28
+ model_name='rub_binary1'
29
+ steps=1000
30
+
31
+ params=(
32
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed -1 --save_folder ${save_folder}/r1_p1 --prompt_list_path ${prompt_list_path1}"
33
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed -1 --save_folder ${save_folder}/r2_p1 --prompt_list_path ${prompt_list_path1}"
34
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed -1 --save_folder ${save_folder}/r3_p1 --prompt_list_path ${prompt_list_path1}"
35
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed -1 --save_folder ${save_folder}/r1_p2 --prompt_list_path ${prompt_list_path2}"
36
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed -1 --save_folder ${save_folder}/r2_p2 --prompt_list_path ${prompt_list_path2}"
37
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed -1 --save_folder ${save_folder}/r3_p2 --prompt_list_path ${prompt_list_path2}"
38
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed 42 --save_folder ${save_folder_videogen} --prompt_list_path ${prompt_list_path3}"
39
+ "--transformer_path /nfs/ywang29/Reward_finetuning/VideoX-Fun/output_full/output_${model_name}/checkpoint-${steps}/transformer/diffusion_pytorch_model.safetensors --seed -1 --save_folder ${save_folder_div}/r1 --prompt_list_path ${prompt_list_path_div}"
40
+ )
41
+ # 2. 修改循环以遍历数组的索引
42
+ # ${!params[@]} 会获取数组 params 的所有索引 (0 1 2 3 4 5 6 7)
43
+ for i in "${!params[@]}"
44
+ do
45
+ # 从数组中获取当前索引对应的参数值
46
+ current_param="${params[$i]}"
47
+
48
+ # CUDA_VISIBLE_DEVICES=$i 告诉程序只能“看见”并使用第 i 张 GPU
49
+ # python X.py --p "$current_param" 将当前参数传递给脚本
50
+ # & 让命令在后台运行
51
+ echo "启动任务 $i (GPU $i),参数为: $current_param"
52
+ CUDA_VISIBLE_DEVICES=$i python /nfs/ywang29/Reward_finetuning/VideoX-Fun/examples/wan2.1/predict_t2v_val3.py --num_generated_videos $num_generated_videos --sampler_name $sampler_name $current_param &
53
+ done
54
+
55
+ # 'wait' 命令会等待所有后台任务都执行完毕
56
+ echo "所有任务已启动。等待它们全部完成..."
57
+ wait
58
+ echo "所有任务已完成。"
59
+
60
+ python /nfs/ywang29/Reward_finetuning/VideoX-Fun/validation_samples/rename_v1.py --model_name ${model_name} --steps ${steps}
61
+
62
+ source activate vbench2
63
+ cd /nfs/ywang29/Reward_finetuning/VideoX-Fun/VBench/VBench-2.0
64
+ bash ./run_evaluate.sh "wan1.3b_rwft_${model_name}_${steps}_wan_aug1"