D140: harden Wan smoke test defaults
Some checks failed
自动更新代码和重启 / update-and-restart (push) Has been cancelled
CI检查 + 自动部署 / check (push) Has been cancelled
CI检查 + 自动部署 / deploy (push) Has been cancelled

This commit is contained in:
冰朔 2026-06-23 15:27:14 +08:00
parent c077d7d82e
commit 18c7e01a16
7 changed files with 56 additions and 18 deletions

View File

@ -24,5 +24,9 @@ WAN_MAX_POLL_ATTEMPTS=80 # 最多约20分钟
POLL_INTERVAL_MS=5000
MAX_POLL_ATTEMPTS=120
# === 本地剪辑工具 ===
# 如服务器 python3 不在 PATH可指定 OpenCV 所在 Python
PYTHON_BIN=
# === 腾讯文档已通过MCP连接此处仅供参考===
# 剧本存储在腾讯文档铸渊通过MCP connector直读

View File

@ -20,12 +20,10 @@
* 铸渊 ICE-GL-ZY001 · D140
*/
const { execSync, spawnSync } = require('child_process');
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
const PYTHON = '/Users/bingshuolingdianyuanhe/.workbuddy/binaries/python/envs/default/bin/python3';
// ==================== 核心分轨 ====================
/**

View File

@ -26,16 +26,15 @@
* 铸渊 ICE-GL-ZY001 · D140
*/
const { execSync, spawnSync } = require('child_process');
const { spawnSync } = require('child_process');
const fs = require('fs');
const path = require('path');
const { exec } = require('child_process');
// 引入现有引擎
const videoEditor = require('./video-editor');
const { splitAudioStems, suggestMixLevels } = require('./audio-stem-splitter');
const PYTHON = '/Users/bingshuolingdianyuanhe/.workbuddy/binaries/python/envs/default/bin/python3';
const PYTHON = process.env.PYTHON_BIN || process.env.PYTHON || 'python3';
const TRACKER_SCRIPT = path.resolve(__dirname, 'planar-tracker.py');
// 输出路径
@ -372,7 +371,6 @@ function buildAudioConfig({
function runPython(script, args, timeout = 120000) {
return new Promise((resolve, reject) => {
const cmd = [PYTHON, script, ...args];
console.log(` [Python] ${path.basename(script)} ${args.join(' ')}`);
const proc = spawnSync(PYTHON, [script, ...args], {

View File

@ -15,9 +15,9 @@
* const result = await generateWanVideo({ prompt: '一只小猫在月光下奔跑', duration: 5 });
*
* 环境变量放在 video-ai-system/.env:
* ALIYUN_BAILIAN_API_KEY=xxx
* ALIYUN_BAILIAN_API_KEY=
* ALIYUN_BAILIAN_BASE_URL=https://dashscope.aliyuncs.com/api/v1 (默认)
* ALIYUN_BAILIAN_WORKSPACE_ID=xxx (可选·新加坡地域时需要)
* ALIYUN_BAILIAN_WORKSPACE_ID= (可选·新加坡地域时需要)
*/
const fs = require('fs');

View File

@ -1,5 +1,5 @@
{
"generatedAt": "2026-06-23T07:04:19.194Z",
"generatedAt": "2026-06-23T07:26:24.628Z",
"activeLines": [
{
"key": "3d",

View File

@ -1,6 +1,6 @@
# 视频AI系统 · 无成本体检报告
生成时间: 2026-06-23T07:04:19.194Z
生成时间: 2026-06-23T07:26:24.628Z
当前active制作线: 3d(3D漫剧)
剧本MD: 存在

View File

@ -2,31 +2,69 @@
* 万相API测试脚本
* D140 · 铸渊 ICE-GL-ZY001
*
* 验证万相2.7文生视频API是否正常工作
* 用法: node tools/test-wan-api.js
* 验证万相2.7文生视频API配置与参数是否正常
* 默认 dry-run不会提交付费生成任务
*
* 用法:
* node tools/test-wan-api.js
* node tools/test-wan-api.js --paid-once
*/
const { submitT2VTask, queryWanTask, API_KEY, WAN_T2V_SPEC } = require('../engines/wan-api-adapter');
const {
submitT2VTask,
queryWanTask,
API_KEY,
WAN_T2V_SPEC,
BASE_URL,
preflightCheckT2V,
} = require('../engines/wan-api-adapter');
async function main() {
console.log('=== 万相2.7 API 测试 ===\n');
const paidOnce = process.argv.includes('--paid-once');
// 1. 检查密钥
if (!API_KEY) {
console.error('❌ ALIYUN_BAILIAN_API_KEY 未配置');
console.error(' 请在 video-ai-system/.env 中设置');
process.exit(1);
}
console.log('✅ API Key 已配置:', API_KEY.substring(0, 15) + '...');
console.log('✅ API Key 已配置');
console.log('✅ 模型:', WAN_T2V_SPEC.model);
console.log('✅ Base URL:', BASE_URL);
// 2. 提交一个简单的测试任务
// 2. 构造一个简单的测试任务
const testPrompt = '一只小猫在月光下奔跑,毛发随风飘动,背景是星空和湖泊,电影级画面';
console.log('\n📝 测试提示词:', testPrompt);
console.log('⏱ 时长: 5秒 分辨率: 720P 比例: 16:9\n');
const preflight = preflightCheckT2V({
prompt: testPrompt,
duration: 5,
resolution: '720P',
ratio: '16:9',
});
if (!preflight.valid) {
console.error('❌ 预校验失败:', preflight.errors.join('; '));
process.exit(1);
}
if (!paidOnce) {
console.log('✅ 预校验通过');
if (preflight.warnings.length > 0) {
console.log('⚠️ 预校验提醒:', preflight.warnings.join('; '));
}
console.log('\nDRY-RUN未提交真实万相任务不产生费用。');
console.log('如需真实付费烟测,请确认预算后运行: node tools/test-wan-api.js --paid-once');
process.exit(0);
}
console.log('⚠️ --paid-once 已开启:将提交一次真实万相任务,可能产生费用。\n');
try {
const { taskId, preflight } = await submitT2VTask({
const { taskId, preflight: paidPreflight } = await submitT2VTask({
prompt: testPrompt,
duration: 5,
resolution: '720P',
@ -35,7 +73,7 @@ async function main() {
console.log('\n✅ 任务提交成功!');
console.log(' Task ID:', taskId);
console.log(' 预校验:', preflight.valid ? '通过' : '失败');
console.log(' 预校验:', paidPreflight.valid ? '通过' : '失败');
// 3. 轮询查询
console.log('\n⏳ 轮询查询中...\n');