feat(video-from-script): 将可灵生图切换为多图参考风格接口
将 Kling 图像生成器从单图生图 API 升级为多图参考生图端点,支持风格参考图片功能,并更新降级链顺序
This commit is contained in:
@@ -221,7 +221,7 @@ async function phaseImages(manifest, manifestPath, options) {
|
||||
const { generate: klingGen } = require('./kling-image-generator')
|
||||
const klingOpts = { outputDir: imagesDir, aspectRatio: ratio }
|
||||
if (refs.urls.length > 0) {
|
||||
klingOpts.referenceImageUrl = refs.urls[0]
|
||||
klingOpts.styleImageUrl = refs.urls[0]
|
||||
}
|
||||
log('images', `[${idx}/${items.length}] 可灵生图: ${item.imagePrompt.substring(0, 60)}...`)
|
||||
result = await klingGen(item.imagePrompt, klingOpts)
|
||||
@@ -272,7 +272,7 @@ async function phaseImages(manifest, manifestPath, options) {
|
||||
const { generate: klingGen } = require('./kling-image-generator')
|
||||
lastResult = await klingGen(item.lastFramePrompt, {
|
||||
outputDir: imagesDir,
|
||||
referenceImageUrl: item.url || '',
|
||||
styleImageUrl: item.url || '',
|
||||
aspectRatio: ratio,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user