Merge branch '108' of https://github.com/HBAI-Ltd/Toonflow-app into 108
# Conflicts: # src/types/database.d.ts
This commit is contained in:
commit
36f8a125ed
@ -1,5 +1,3 @@
|
|||||||
# 全局美学基础 · 古风甜宠写实超现实主义
|
|
||||||
123
|
|
||||||
123
|
123
|
||||||
1212121212的王师傅水电费第三方水电费
|
1212121212的王师傅水电费第三方水电费
|
||||||
1212121212
|
1212121212
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 272 KiB |
@ -664,7 +664,7 @@ Image [2]: @图2 — [外貌关键描述]
|
|||||||
### 约束
|
### 约束
|
||||||
|
|
||||||
- 前置条件:分镜表已构建完成且用户已确认
|
- 前置条件:分镜表已构建完成且用户已确认
|
||||||
- 你必须使用XML格式写入工作区分镜面板:<storyboardItem videoDesc='视频描述' prompt='提示词内容' track='分组' duration='视频推荐时间' associateAssetsIds="[该分镜所需的资产ID列表]" shouldGenerateImage="是否需要生成分镜图片 true/false, 默认为true" />
|
- 你必须使用XML格式写入工作区分镜面板:<storyboardItem videoDesc='视频描述' prompt='提示词内容' track='分组' duration='视频推荐时间' associateAssetsIds="[该分镜所需的资产ID列表]" shouldGenerateImage="是否需要生成分镜图片 true/false, 默认为true"></storyboardItem>
|
||||||
- 分组总时长约束:每个 `group` 的累计时长不得超过 15 秒
|
- 分组总时长约束:每个 `group` 的累计时长不得超过 15 秒
|
||||||
- 行数一致性约束:分镜面板 `items` 数量必须与 `stoaryTable` 的分镜数据行数量完全一致(不包含表头与分隔行)
|
- 行数一致性约束:分镜面板 `items` 数量必须与 `stoaryTable` 的分镜数据行数量完全一致(不包含表头与分隔行)
|
||||||
- 时长一致性约束:分镜面板 `duration` 必须与 `stoaryTable` 对应行时长完全一致
|
- 时长一致性约束:分镜面板 `duration` 必须与 `stoaryTable` 对应行时长完全一致
|
||||||
|
|||||||
@ -135,7 +135,7 @@ function createSubAgent(parentCtx: AgentContext) {
|
|||||||
"你必须使用如下XML格式写入工作区:\n```",
|
"你必须使用如下XML格式写入工作区:\n```",
|
||||||
"拍摄计划:<scriptPlan>内容</scriptPlan>",
|
"拍摄计划:<scriptPlan>内容</scriptPlan>",
|
||||||
"分镜表:<storyboardTable>内容</storyboardTable>",
|
"分镜表:<storyboardTable>内容</storyboardTable>",
|
||||||
"分镜面板:<storyboardItem videoDesc='视频描述' prompt=提示词内容 track='分组' duration='视频推荐时间' associateAssetsIds='[该分镜所需的资产ID列表]' />",
|
"分镜面板:<storyboardItem videoDesc='视频描述' prompt=提示词内容 track='分组' duration='视频推荐时间' associateAssetsIds='[该分镜所需的资产ID列表]'></storyboardItem>",
|
||||||
"```",
|
"```",
|
||||||
].join("\n");
|
].join("\n");
|
||||||
const projectData = await u.db("o_project").where("id", resTool.data.projectId).first();
|
const projectData = await u.db("o_project").where("id", resTool.data.projectId).first();
|
||||||
|
|||||||
@ -256,11 +256,6 @@ export default async (knex: Knex, forceInit: boolean = false): Promise<void> =>
|
|||||||
- 多条平行事件线时,选对主角影响最大的一条,其余简要带过
|
- 多条平行事件线时,选对主角影响最大的一条,其余简要带过
|
||||||
- 对话密集章节,关注对话推动了什么结果,而非复述对话内容`,
|
- 对话密集章节,关注对话推动了什么结果,而非复述对话内容`,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "资产提示词生成",
|
|
||||||
type: "assetsPromptGeneration",
|
|
||||||
data: "# 资产提示词生成指令 根据提供的项目参数和资产设定,生成符合要求的提示词\n\n请根据以下参数生成提示词:\n\n**基础参数:**\n- 风格: {风格}\n- 小说类型: {小说类型}\n- 小说背景: {小说背景}\n\n**资产设定:**\n- 类型: {角色/场景/道具}\n- 名称:{名称}\n- 描述:{描述}\n\n请严格按照skill规范生成提示词。",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "剧本资产提取",
|
name: "剧本资产提取",
|
||||||
type: "scriptAssetExtraction",
|
type: "scriptAssetExtraction",
|
||||||
@ -355,6 +350,11 @@ description: 专注于从剧本内容中提取所使用的资产(角色、场
|
|||||||
- 场景中的固定陈设不需要单独提取为道具,除非该物件有独立剧情作用
|
- 场景中的固定陈设不需要单独提取为道具,除非该物件有独立剧情作用
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "视频提示词生成",
|
||||||
|
type: "videoPromptGeneration",
|
||||||
|
data: "根据以下提示词生成一个视频提示词",
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -27,18 +27,20 @@ export default router.post(
|
|||||||
const assetsData = await u
|
const assetsData = await u
|
||||||
.db("o_assets")
|
.db("o_assets")
|
||||||
.leftJoin("o_image", "o_assets.imageId", "o_image.id")
|
.leftJoin("o_image", "o_assets.imageId", "o_image.id")
|
||||||
.select("o_assets.*", "o_image.filePath", "o_image.state")
|
.select("o_assets.*", "o_image.filePath", "o_image.state", "o_image.errorReason")
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
.where("o_assets.id", "in", assetIds)
|
.where("o_assets.id", "in", assetIds)
|
||||||
.whereNull("o_assets.assetsId")
|
.andWhere("o_assets.assetsId", null)
|
||||||
.where("o_assets.projectId", projectId);
|
.where("o_assets.projectId", projectId);
|
||||||
|
console.log("%c Line:28 🎂 assetsData", "background:#6ec1c2", assetsData);
|
||||||
|
|
||||||
let childAssetsData = await u
|
let childAssetsData = await u
|
||||||
.db("o_assets")
|
.db("o_assets")
|
||||||
.leftJoin("o_image", "o_assets.imageId", "o_image.id")
|
.leftJoin("o_image", "o_assets.imageId", "o_image.id")
|
||||||
.select("o_assets.*", "o_image.filePath", "o_image.state")
|
.select("o_assets.*", "o_image.filePath", "o_image.state", "o_image.errorReason")
|
||||||
.where("o_assets.projectId", projectId)
|
.where("o_assets.projectId", projectId)
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
.where("o_assets.id", "in", assetIds)
|
.where("o_assets.assetsId", "in", assetIds)
|
||||||
.whereNotNull("o_assets.assetsId");
|
.whereNotNull("o_assets.assetsId");
|
||||||
|
|
||||||
if (!sqlData) {
|
if (!sqlData) {
|
||||||
@ -141,6 +143,8 @@ export default router.post(
|
|||||||
associateAssetsIds: assets2StoryboardMap[i.id!] ?? [],
|
associateAssetsIds: assets2StoryboardMap[i.id!] ?? [],
|
||||||
src: i.filePath,
|
src: i.filePath,
|
||||||
state: i.state,
|
state: i.state,
|
||||||
|
videoDesc: i.videoDesc,
|
||||||
|
shouldGenerateImage: i.shouldGenerateImage,
|
||||||
reason: i?.reason ?? "",
|
reason: i?.reason ?? "",
|
||||||
}))
|
}))
|
||||||
.sort((a, b) => (a.index ?? 0) - (b.index ?? 0));
|
.sort((a, b) => (a.index ?? 0) - (b.index ?? 0));
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export default router.post(
|
|||||||
videoDesc: z.string(),
|
videoDesc: z.string(),
|
||||||
}),
|
}),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
const { id, prompt } = req.body;
|
const { id, prompt, videoDesc } = req.body;
|
||||||
await u.db("o_storyboard").where({ id }).update({
|
await u.db("o_storyboard").where({ id }).update({
|
||||||
prompt,
|
prompt,
|
||||||
videoDesc,
|
videoDesc,
|
||||||
|
|||||||
@ -17,10 +17,11 @@ export default router.post(
|
|||||||
const { trackId, projectId, prompt, model } = req.body;
|
const { trackId, projectId, prompt, model } = req.body;
|
||||||
const [id, modelData] = model.split(":");
|
const [id, modelData] = model.split(":");
|
||||||
const projectData = await u.db("o_project").select("*").where({ id: projectId }).first();
|
const projectData = await u.db("o_project").select("*").where({ id: projectId }).first();
|
||||||
|
const videoPrompt = await u.db("o_prompt").where("type", "videoPromptGeneration").first();
|
||||||
const artStyle = projectData?.artStyle || "无";
|
const artStyle = projectData?.artStyle || "无";
|
||||||
const visualManual = u.getArtPrompt(artStyle, "art_storyboard_video");
|
const visualManual = u.getArtPrompt(artStyle, "art_storyboard_video");
|
||||||
const { text } = await u.Ai.Text("universalAi").invoke({
|
const { text } = await u.Ai.Text("universalAi").invoke({
|
||||||
system: visualManual,
|
system: `${videoPrompt?.data},${visualManual}`,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: "user",
|
role: "user",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user