From d4eb18e5f890ac884ba80e4374b1e54a7d72337d Mon Sep 17 00:00:00 2001 From: kang Date: Wed, 13 May 2026 21:19:00 +0800 Subject: [PATCH] auto-save 2026-05-13 21:18 (~2) --- .memory/worklog.json | 7 ++++++ web/app/page.tsx | 55 ++++++++++++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/.memory/worklog.json b/.memory/worklog.json index dbbe349..7744a79 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -2401,6 +2401,13 @@ "type": "session-heartbeat", "message": "Codex 会话活跃 · 最近命令:codex · 2 项未提交变更 · 最近提交:auto-save 2026-05-13 21:07 (~4)", "files_changed": 2 + }, + { + "ts": "2026-05-13T21:13:28+08:00", + "type": "commit", + "message": "auto-save 2026-05-13 21:13 (~3)", + "hash": "a8b752b", + "files_changed": 3 } ] } diff --git a/web/app/page.tsx b/web/app/page.tsx index 2b75b44..a95c816 100644 --- a/web/app/page.tsx +++ b/web/app/page.tsx @@ -233,29 +233,54 @@ export default function Home() { const labelOf = (ref?: ImageRef | null, fallback = "未提供") => ref?.label || fallback const duration = scene.duration && scene.duration > 0 ? scene.duration : 5 + const sourceScene = frame.description?.scene ? `参考画面识别:${frame.description.scene}` : "" + const sourceStyle = frame.description?.style ? `参考风格:${frame.description.style}` : "" + const sourceObjects = frame.description?.objects?.length + ? `参考元素:${frame.description.objects.slice(0, 6).map((o) => o.name).join("、")}` + : "" + const subjectDirection = scene.subject?.trim() + || "保留参考里的主体位置和动作关系,但人物/主体改成干净可信的 SKG 产品演示语境;不要保留医疗骨架、竞品或原视频人物设定,除非用户明确写了要保留。" + const productDirection = scene.product?.trim() + || "让 SKG 产品成为清晰可见的视觉主角,产品轮廓稳定,位置连续,不要在镜头中变成其他物体。" + const sceneDirection = scene.scene?.trim() + || "借鉴参考画面的构图、可信感和空间层次,但改造成适合 SKG 产品广告的现代家居、办公或零售场景。" + const actionDirection = scene.action?.trim() + || "一镜到底缓慢推进,先建立画面,再出现自然手部互动,最后停在产品细节或使用状态特写。" const prompt = [ - `Vertical 9:16 short product video for SKG, ${duration.toFixed(1)} seconds.`, - "Use the reference materials only for composition, pose, scene mood and motion rhythm; do not copy the original video, text, watermark, logo, or non-SKG product.", - `Reference subject: ${labelOf(scene.subject_image, "clean product demonstration subject")}.`, - `Reference scene: ${labelOf(scene.scene_image, "clean modern wellness / home / retail scene")}.`, - `SKG product reference: ${labelOf(scene.product_image, "SKG product as the hero object")}.`, - `Reference action: ${labelOf(scene.action_image, "hands-on product demonstration action")}.`, - scene.subject ? `Subject change: ${scene.subject}.` : "Subject change: clean, trustworthy product demo talent or hands, no medical skeleton unless explicitly requested.", - scene.product ? `Product replacement: ${scene.product}.` : "Product replacement: make SKG product the visual focus, premium, clean, realistic, clearly visible.", - scene.scene ? `Scene adaptation: ${scene.scene}.` : "Scene adaptation: borrow only the useful layout and credibility from the reference, convert it to SKG product context.", - scene.action ? `Camera and action: ${scene.action}.` : "Camera and action: slow push-in, product reveal, close-up detail, natural hand interaction, stable commercial lighting.", - "High quality realistic commercial video, clean background, no captions, no platform UI, no TikTok watermark, no extra text.", + `竖屏 9:16,${duration.toFixed(1)} 秒,SKG 产品短视频广告。`, + "直接根据当前分镜关键帧生成视频。必须使用输入的完整视频关键帧作为第一帧和视觉锚点:第一帧构图、主体位置、透视关系和光线方向保持稳定,然后从这一帧自然动起来。", + "生成一段单镜头连续视频,一镜到底,不要跳切,不要突然换场景,不要突然换主体,不要蒙太奇,不要多镜头拼接。", + "时间线:0%-25% 保持首帧构图并轻微启动;25%-70% 做一个清晰、缓慢、可信的产品展示动作;70%-100% 镜头自然停稳在 SKG 产品或使用效果特写。", + `主体改造:${subjectDirection}`, + `产品替换:${productDirection}`, + `场景改造:${sceneDirection}`, + `连续动作和镜头:${actionDirection}`, + `参考主体图槽:${labelOf(scene.subject_image, "产品演示主体或手部姿态")}`, + `参考场景图槽:${labelOf(scene.scene_image, "现代健康生活场景")}`, + `SKG 产品图槽:${labelOf(scene.product_image, "SKG 产品视觉主角")}`, + `参考动作图槽:${labelOf(scene.action_image, "自然拿取、佩戴、展示或靠近产品的动作")}`, + sourceScene, + sourceStyle, + sourceObjects, + "运动要求:动作幅度小而连续,速度均匀,手部和产品位置前后一致,产品外形不变形,人物表情和姿态不漂移,背景只允许轻微景深和光影变化。", + "商业质感:真实拍摄感,干净高级,柔和稳定打光,产品边缘清晰,材质真实,画面无抖动、无拉伸、无闪烁。", + "禁止:字幕、文字、平台 UI、TikTok 水印、logo 水印、免责声明、竞品包装、随机新物体、医学骨架、夸张病症画面、恐怖元素、画面撕裂、人物或产品突然变形。", ].join("\n") try { toast.info(`已提交 ${model} 生视频 · 分镜 ${frameIdx + 1}`) + const keyframeRef: ImageRef = { + kind: "keyframe", + frame_idx: frameIdx, + label: `分镜 ${frameIdx + 1} 关键帧`, + } const updated = await generateStoryboardVideo(job.id, frameIdx, { prompt, duration, - subject_image: scene.subject_image ?? null, - scene_image: scene.scene_image ?? null, - product_image: scene.product_image ?? null, - action_image: scene.action_image ?? null, + subject_image: keyframeRef, + scene_image: null, + product_image: null, + action_image: null, model, size: "720x1280", })