Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ci-demos
wan2.1
Commits
6499d200
Commit
6499d200
authored
Jan 31, 2026
by
jerrrrry
Browse files
Update .gitlab-ci.yml
parent
a8de9d8f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
74 deletions
+63
-74
.gitlab-ci.yml
.gitlab-ci.yml
+63
-74
No files found.
.gitlab-ci.yml
View file @
6499d200
...
@@ -67,7 +67,7 @@ benchmark_wan2.1:
...
@@ -67,7 +67,7 @@ benchmark_wan2.1:
fi
fi
-
echo "========================================="
-
echo "========================================="
-
echo "Step 5 Running benchmark tests with
different seeds
"
-
echo "Step 5 Running benchmark tests with
file detection
"
-
echo "========================================="
-
echo "========================================="
# 创建结果目录
# 创建结果目录
-
mkdir -p results
-
mkdir -p results
...
@@ -83,49 +83,36 @@ benchmark_wan2.1:
...
@@ -83,49 +83,36 @@ benchmark_wan2.1:
# 记录开始时间
# 记录开始时间
start_time=$(date +%s)
start_time=$(date +%s)
# 运行测试并捕获输出
# 运行测试
python temp_test1.py 2>&1 | tee results/test1_output.log
python temp_test1.py > results/test1_output.log 2>&1 &
export TEST1_PID=$!
# 记录结束时间和计算执行时间
echo "Waiting for first webp file to be generated..."
end_time=$(date +%s)
# 等待第一个webp文件生成,最多等待10分钟
duration=$((end_time - start_time))
timeout=600
echo "Test 1 execution time $duration seconds" >> results/performance.log
-
echo "========================================="
-
echo "Step 6 Waiting for first test to complete"
-
echo "========================================="
# 等待第一次测试完成,检查output目录中是否有新的webp文件
-
|
echo "Waiting for webp file to be generated..."
timeout=600 # 最多等待10分钟
count=0
count=0
webp_found=false
while [ $count -lt $timeout ]; do
while [ $count -lt $timeout ]; do
# 检查output目录中是否有webp文件
webp_count=$(find output -name "*.webp" -type f | wc -l)
if find output -name "*.webp" -type f | head -1 | grep -q .; then
if [ $webp_count -gt 0 ]; then
echo "Found webp file! First test completed."
echo "First webp file detected! Count: $webp_count"
webp_found=true
break
fi
# 检查是否有错误信息
if grep -q "error\|Error\|ERROR\|failed\|Failed\|FAILED" results/test1_output.log; then
echo "Error detected in test 1 output!"
break
break
fi
fi
sleep 2
echo "Waiting... ($count/$timeout seconds)"
count=$((count+2))
sleep 5
echo "Waiting... ${count}s elapsed, webp count: $webp_count"
count=$((count+5))
done
done
if [ "$webp_found" = false ]; then
if [ $count -eq $timeout ]; then
echo "Warning: No webp file found after waiting $timeout seconds"
echo "Timeout waiting for first webp file"
echo "Output directory contents:"
exit 1
ls -la output/ || echo "Output directory not found"
fi
fi
# 记录结束时间和计算执行时间
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "Test 1 execution time $duration seconds" >> results/performance.log
echo "Test 1 completed in $duration seconds"
# 运行第二次测试(seed=1234567890)
# 运行第二次测试(seed=1234567890)
-
echo "Running second test with seed=1234567890"
-
echo "Running second test with seed=1234567890"
-
|
-
|
...
@@ -135,56 +122,58 @@ benchmark_wan2.1:
...
@@ -135,56 +122,58 @@ benchmark_wan2.1:
# 记录开始时间
# 记录开始时间
start_time=$(date +%s)
start_time=$(date +%s)
# 运行测试并捕获输出
# 运行测试
python temp_test2.py 2>&1 | tee results/test2_output.log
python temp_test2.py > results/test2_output.log 2>&1 &
export TEST2_PID=$!
# 记录结束时间和计算执行时间
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "Test 2 execution time $duration seconds" >> results/performance.log
-
echo "========================================="
-
echo "Step 7 Waiting for second test to complete"
-
echo "========================================="
# 等待第二次测试完成
-
|
echo "Waiting for second webp file to be generated..."
echo "Waiting for second webp file to be generated..."
timeout=600 # 最多等待10分钟
# 等待第二个webp文件生成,最多等待10分钟
timeout=600
count=0
count=0
webp_count_before=$(find output -name "*.webp" -type f | wc -l)
while [ $count -lt $timeout ]; do
while [ $count -lt $timeout ]; do
webp_count_current=$(find output -name "*.webp" -type f | wc -l)
webp_count=$(find output -name "*.webp" -type f | wc -l)
if [ $webp_count -gt 1 ]; then
# 如果webp文件数量增加,说明第二个测试完成了
echo "Second webp file detected! Total count: $webp_count"
if [ $webp_count_current -gt $webp_count_before ]; then
echo "Second webp file found! Second test completed."
break
break
fi
fi
sleep 2
count=$((count+2))
echo "Waiting... ${count}s elapsed, webp count: $webp_count"
done
# 检查是否有错误信息
if [ $count -eq $timeout ]; then
if grep -q "error\|Error\|ERROR\|failed\|Failed\|FAILED" results/test2_output.log; then
echo "Timeout waiting for second webp file"
echo "Error detected in test 2 output!"
exit 1
break
fi
fi
echo "Waiting... ($count/$timeout seconds)"
# 记录结束时间和计算执行时间
sleep 5
end_time=$(date +%s)
count=$((count+5))
duration=$((end_time - start_time))
done
echo "Test 2 execution time $duration seconds" >> results/performance.log
echo "Test 2 completed in $duration seconds"
-
echo "========================================="
-
echo "========================================="
-
echo "Step
8 C
ollecting results"
-
echo "Step
6 Verifying and c
ollecting results"
-
echo "========================================="
-
echo "========================================="
# 查找并复制输出文件
-
|
-
|
# 查找最新的.webp文件
# 验证两个webp文件都已生成
webp_count=$(find output -name "*.webp" -type f | wc -l)
echo "Total webp files found: $webp_count"
if [ $webp_count -lt 2 ]; then
echo "ERROR: Expected 2 webp files, but found $webp_count"
find output -name "*.webp" -type f -ls
exit 1
fi
# 查找并复制最新的两个webp文件
find output -name "*.webp" -type f -exec ls -lt {} + | head -n 2 > results/latest_files.txt
find output -name "*.webp" -type f -exec ls -lt {} + | head -n 2 > results/latest_files.txt
# 复制
最新的两个.webp
文件到结果目录
# 复制文件到结果目录
while read line; do
while read line; do
filepath=$(echo "$line" | awk '{print $NF}')
filepath=$(echo "$line" | awk '{print $NF}')
cp "$filepath" results/
cp "$filepath" results/
echo "Copied: $filepath"
done < results/latest_files.txt
done < results/latest_files.txt
# 创建结果摘要
# 创建结果摘要
...
@@ -194,14 +183,14 @@ benchmark_wan2.1:
...
@@ -194,14 +183,14 @@ benchmark_wan2.1:
echo "" >> results/summary.txt
echo "" >> results/summary.txt
echo "Test 2 (seed=1234567890):" >> results/summary.txt
echo "Test 2 (seed=1234567890):" >> results/summary.txt
grep "Prompt executed in" results/test2_output.log >> results/summary.txt
grep "Prompt executed in" results/test2_output.log >> results/summary.txt
# 显示最终生成的文件数量
total_webp=$(find output -name "*.webp" -type f | wc -l)
echo "" >> results/summary.txt
echo "" >> results/summary.txt
echo "Total webp files generated: $total_webp" >> results/summary.txt
echo "Generated files:" >> results/summary.txt
ls results/*.webp >> results/summary.txt
echo "All tests completed successfully!"
-
echo "========================================="
-
echo "========================================="
-
echo "Step
9
Cleaning up"
-
echo "Step
7
Cleaning up"
-
echo "========================================="
-
echo "========================================="
# 停止ComfyUI服务器
# 停止ComfyUI服务器
-
kill $COMFYUI_PID ||
true
-
kill $COMFYUI_PID ||
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment