D140: harden Wan smoke test defaults
This commit is contained in:
parent
c077d7d82e
commit
18c7e01a16
@ -24,5 +24,9 @@ WAN_MAX_POLL_ATTEMPTS=80 # 最多约20分钟
|
|||||||
POLL_INTERVAL_MS=5000
|
POLL_INTERVAL_MS=5000
|
||||||
MAX_POLL_ATTEMPTS=120
|
MAX_POLL_ATTEMPTS=120
|
||||||
|
|
||||||
|
# === 本地剪辑工具 ===
|
||||||
|
# 如服务器 python3 不在 PATH,可指定 OpenCV 所在 Python
|
||||||
|
PYTHON_BIN=
|
||||||
|
|
||||||
# === 腾讯文档(已通过MCP连接,此处仅供参考)===
|
# === 腾讯文档(已通过MCP连接,此处仅供参考)===
|
||||||
# 剧本存储在腾讯文档,铸渊通过MCP connector直读
|
# 剧本存储在腾讯文档,铸渊通过MCP connector直读
|
||||||
|
|||||||
@ -20,12 +20,10 @@
|
|||||||
* 铸渊 ICE-GL-ZY001 · D140
|
* 铸渊 ICE-GL-ZY001 · D140
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { execSync, spawnSync } = require('child_process');
|
const { execSync } = require('child_process');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const PYTHON = '/Users/bingshuolingdianyuanhe/.workbuddy/binaries/python/envs/default/bin/python3';
|
|
||||||
|
|
||||||
// ==================== 核心分轨 ====================
|
// ==================== 核心分轨 ====================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -26,16 +26,15 @@
|
|||||||
* 铸渊 ICE-GL-ZY001 · D140
|
* 铸渊 ICE-GL-ZY001 · D140
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { execSync, spawnSync } = require('child_process');
|
const { spawnSync } = require('child_process');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { exec } = require('child_process');
|
|
||||||
|
|
||||||
// 引入现有引擎
|
// 引入现有引擎
|
||||||
const videoEditor = require('./video-editor');
|
const videoEditor = require('./video-editor');
|
||||||
const { splitAudioStems, suggestMixLevels } = require('./audio-stem-splitter');
|
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');
|
const TRACKER_SCRIPT = path.resolve(__dirname, 'planar-tracker.py');
|
||||||
|
|
||||||
// 输出路径
|
// 输出路径
|
||||||
@ -372,7 +371,6 @@ function buildAudioConfig({
|
|||||||
|
|
||||||
function runPython(script, args, timeout = 120000) {
|
function runPython(script, args, timeout = 120000) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const cmd = [PYTHON, script, ...args];
|
|
||||||
console.log(` [Python] ${path.basename(script)} ${args.join(' ')}`);
|
console.log(` [Python] ${path.basename(script)} ${args.join(' ')}`);
|
||||||
|
|
||||||
const proc = spawnSync(PYTHON, [script, ...args], {
|
const proc = spawnSync(PYTHON, [script, ...args], {
|
||||||
|
|||||||
@ -15,9 +15,9 @@
|
|||||||
* const result = await generateWanVideo({ prompt: '一只小猫在月光下奔跑', duration: 5 });
|
* const result = await generateWanVideo({ prompt: '一只小猫在月光下奔跑', duration: 5 });
|
||||||
*
|
*
|
||||||
* 环境变量(放在 video-ai-system/.env):
|
* 环境变量(放在 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_BASE_URL=https://dashscope.aliyuncs.com/api/v1 (默认)
|
||||||
* ALIYUN_BAILIAN_WORKSPACE_ID=xxx (可选·新加坡地域时需要)
|
* ALIYUN_BAILIAN_WORKSPACE_ID= (可选·新加坡地域时需要)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-23T07:04:19.194Z",
|
"generatedAt": "2026-06-23T07:26:24.628Z",
|
||||||
"activeLines": [
|
"activeLines": [
|
||||||
{
|
{
|
||||||
"key": "3d",
|
"key": "3d",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# 视频AI系统 · 无成本体检报告
|
# 视频AI系统 · 无成本体检报告
|
||||||
|
|
||||||
生成时间: 2026-06-23T07:04:19.194Z
|
生成时间: 2026-06-23T07:26:24.628Z
|
||||||
|
|
||||||
当前active制作线: 3d(3D漫剧)
|
当前active制作线: 3d(3D漫剧)
|
||||||
剧本MD: 存在
|
剧本MD: 存在
|
||||||
|
|||||||
@ -2,31 +2,69 @@
|
|||||||
* 万相API测试脚本
|
* 万相API测试脚本
|
||||||
* D140 · 铸渊 ICE-GL-ZY001
|
* D140 · 铸渊 ICE-GL-ZY001
|
||||||
*
|
*
|
||||||
* 验证万相2.7文生视频API是否正常工作
|
* 验证万相2.7文生视频API配置与参数是否正常
|
||||||
* 用法: node tools/test-wan-api.js
|
* 默认 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() {
|
async function main() {
|
||||||
console.log('=== 万相2.7 API 测试 ===\n');
|
console.log('=== 万相2.7 API 测试 ===\n');
|
||||||
|
|
||||||
|
const paidOnce = process.argv.includes('--paid-once');
|
||||||
|
|
||||||
// 1. 检查密钥
|
// 1. 检查密钥
|
||||||
if (!API_KEY) {
|
if (!API_KEY) {
|
||||||
console.error('❌ ALIYUN_BAILIAN_API_KEY 未配置');
|
console.error('❌ ALIYUN_BAILIAN_API_KEY 未配置');
|
||||||
console.error(' 请在 video-ai-system/.env 中设置');
|
console.error(' 请在 video-ai-system/.env 中设置');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
console.log('✅ API Key 已配置:', API_KEY.substring(0, 15) + '...');
|
console.log('✅ API Key 已配置');
|
||||||
console.log('✅ 模型:', WAN_T2V_SPEC.model);
|
console.log('✅ 模型:', WAN_T2V_SPEC.model);
|
||||||
|
console.log('✅ Base URL:', BASE_URL);
|
||||||
|
|
||||||
// 2. 提交一个简单的测试任务
|
// 2. 构造一个简单的测试任务
|
||||||
const testPrompt = '一只小猫在月光下奔跑,毛发随风飘动,背景是星空和湖泊,电影级画面';
|
const testPrompt = '一只小猫在月光下奔跑,毛发随风飘动,背景是星空和湖泊,电影级画面';
|
||||||
console.log('\n📝 测试提示词:', testPrompt);
|
console.log('\n📝 测试提示词:', testPrompt);
|
||||||
console.log('⏱ 时长: 5秒 分辨率: 720P 比例: 16:9\n');
|
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 {
|
try {
|
||||||
const { taskId, preflight } = await submitT2VTask({
|
const { taskId, preflight: paidPreflight } = await submitT2VTask({
|
||||||
prompt: testPrompt,
|
prompt: testPrompt,
|
||||||
duration: 5,
|
duration: 5,
|
||||||
resolution: '720P',
|
resolution: '720P',
|
||||||
@ -35,7 +73,7 @@ async function main() {
|
|||||||
|
|
||||||
console.log('\n✅ 任务提交成功!');
|
console.log('\n✅ 任务提交成功!');
|
||||||
console.log(' Task ID:', taskId);
|
console.log(' Task ID:', taskId);
|
||||||
console.log(' 预校验:', preflight.valid ? '通过' : '失败');
|
console.log(' 预校验:', paidPreflight.valid ? '通过' : '失败');
|
||||||
|
|
||||||
// 3. 轮询查询
|
// 3. 轮询查询
|
||||||
console.log('\n⏳ 轮询查询中...\n');
|
console.log('\n⏳ 轮询查询中...\n');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user