目标成片:2 分 26 秒(146.25 s)| 14 镜 | 1344×768 → 裁 2.39:1 音乐:YuE2 生成《霜刃引》(GPU 机 ComfyUI 节点,本地 0 成本) 视频:MiniMax H3(GPU 机 ComfyUI 8189),每镜一个独立任务 + AV latent 跨任务续接 配套:
霜刃片头曲-01-角色与场景设定.md
H3 单段实测最稳的长度是 260 帧 / 24fps = 10.8333 s(单段连续满载 ≤90 分钟才不会整机硬挂,这是 09-17 血的教训)。
反过来解节拍:
260 帧 ÷ 24fps = 10.8333 s = 4 小节
→ 1 小节 = 2.70833 s → ♩ = 88.6 BPM(4/4 拍)
所以片头曲直接按 ♩=88.6(生成时用 88 或 89,后期 ±0.5% 变速微调,听觉无感)写。 这样每一镜天然落在 4 小节的乐句上,剪辑点与鼓点严丝合缝,不需要逐帧对拍。
| 段落 | 小节 | 时间 | 歌词 | 画面 | 配器 |
|---|---|---|---|---|---|
| 前奏 | 4 | 0:00.0–0:10.8 | — | 镜1 雪原 | 箫 + 古筝泛音 + 风雪 + 一声剑鸣 |
| 主歌A | 8 | 0:10.8–0:32.5 | ①–④ | 镜2 手/刀、镜3 药庐回眸 | 古筝分解 + 低音弦乐铺底 |
| 预副歌 | 8 | 0:32.5–0:54.2 | ⑤⑥ | 镜4 夜雨竹海、镜5 推门入雪 | 大鼓进入 + 琵琶扫弦,逐句加压 |
| 副歌1 | 8 | 0:54.2–1:15.8 | ⑦–⑩ | 镜6 剑冢、镜7 反派抬眸 | 全奏:失真电吉他 + 大鼓 + 弦乐 + 和声 |
| 间奏 | 4 | 1:15.8–1:26.7 | — | 镜8 破庙银簪(回忆) | 独奏琵琶 + 箫,骤然安静 |
| 主歌B | 4 | 1:26.7–1:37.5 | ⑪⑫ | 镜9 冰湖跪地 | 古筝 + 人声近麦、气声 |
| 副歌2 | 8 | 1:37.5–1:59.2 | ⑬–⑯ | 镜10 断崖对峙、镜11 刀剑相击 | 全奏,鼓更密 |
| 副歌3 | 8 | 1:59.2–2:20.8 | ⑰–⑳ | 镜12 城楼女主、镜13 雪中擦肩 | 升半音,最高潮,人声叠八度 |
| 尾奏 | 2 | 2:20.8–2:26.3 | ㉑㉒ | 镜14 雪落刀身 + 剧名定格 | 乐器依次收,只留箫与余韵 |
① 雪落无声 覆了旧年城
② 一盏孤灯 照我半生尘
③ 风过竹林 谁把姓名封存
④ 刀锋未冷 先冷的是人
⑤ 十年一诺 换一身风雪
⑥ 回身处 故人都已诀别
⑦ 一剑霜寒 十四州的风
⑧ 吹不散 眉间那道血红
⑨ 我以残躯 赴这场相逢
⑩ 刀落处 天光破晓 也从容
⑪ 那年庙前 谁递来一支银簪
⑫ 从此我记 一世人间
⑬ 一剑霜寒 十四州的风
⑭ 吹不散 眉间那道血红
⑮ 若此生 只够一次心动
⑯ 便许你 雪停之后 见苍穹
⑰ 一剑霜寒 十四州的风
⑱ 吹不散 眉间那道血红
⑲ 我提刀赴 这场重逢
⑳ 不问归途 只问你可曾懂
㉑(气声)雪停之后……见苍穹
㉒(念白)江湖再大,不过一诺。
「一剑霜寒十四州」出自唐代贯休诗句(公有领域),在此作 hook 引用无版权风险。
GPU 机 ~/Downloads/dl-hub/18-YuE2音乐生成/yue2-run.py(实测已出过 2:52 中文歌,峰值显存 9.26–10.05 GiB):
python3 yue2-run.py --cot full --sem-mx 7600 --attn sdpa \
--lyrics-file sd-yin-lyrics.txt \
--style "Mandarin wuxia epic ballad, 88 BPM 4/4, female lead vocal with male harmony, \
guzheng, dizi, erhu, pipa, taiko drums, distorted electric guitar, cinematic strings, \
dark minor key, cinematic build, no rap" \
--tag shuangren-yin
| 参数 | 说明 |
|---|---|
--cot full | 先出乐谱规划(ABC)再渲染,长歌必用;yue2-run.py 已含 16GB 内存档 |
--sem-mx 7600 | 长度旋钮:上次 9000 → 171.7 s,今回按 146.25 s 线性折算 ≈ 7670,先取 7600 |
--attn sdpa | 已验证档位(sage 在 sm120 上有 OOM 前科,不要换) |
| 生成后 | 若长度偏差 ±5 s 以内:改画面节奏(尾奏留白);偏差大:调 sem-mx 重跑 |
⚠️ YuE2 与 H3 互斥(同一张 16 GB 卡)→ 音乐必须第一个做。当晚顺序:出歌 → 定小节表 → 跑视频。
| 镜 | 时间码 | 帧 | 时长 | 段落 | 场景 | 主体 | 续接 | 后处理 |
|---|---|---|---|---|---|---|---|---|
| 1 | 0:00.000–0:10.833 | 260 | 10.83 | 前奏 | S1 雪原 | 远景剪影 | none | 降饱和+颗粒 |
| 2 | 0:10.833–0:21.667 | 260 | 10.83 | 主歌A | — | 手 + 断刀 | none | 高光锐化 |
| 3 | 0:21.667–0:32.500 | 260 | 10.83 | 主歌A | S3 药庐 | 苏晚回眸 | none | FaceRefine |
| 4 | 0:32.500–0:43.333 | 260 | 10.83 | 预副歌 | S2 竹海夜雨 | 刀鞘 + 灯笼 | none | 雨层 |
| 5 | 0:43.333–0:54.167 | 260 | 10.83 | 预副歌 | S3 药庐 | 沈砚背影 | none | 冷暖过渡 |
| 6 | 0:54.167–1:05.000 | 260 | 10.83 | 副歌1 | S6 剑冢 | 玄空背影 | none | 暗角 |
| 7 | 1:05.000–1:15.833 | 260 | 10.83 | 副歌1 | S7 城楼 | 裴无涯近景 | none | FaceRefine |
| 8 | 1:15.833–1:26.667 | 260 | 10.83 | 间奏 | S5 破庙 | 银簪(手) | none | 柔光+辉光 |
| 9 | 1:26.667–1:37.500 | 260 | 10.83 | 主歌B | S8 冰湖 | 沈砚跪地 | none | 冷青调 |
| 10 | 1:37.500–1:48.333 | 260 | 10.83 | 副歌2 | S4 断崖 | 双人剪影 | 续接首段 | — |
| 11 | 1:48.333–1:59.167 | 260 | 10.83 | 副歌2 | S4 断崖 | 刀剑相击 | AV 续接镜10 | 火星锐化 + RIFE |
| 12 | 1:59.167–2:10.000 | 260 | 10.83 | 副歌3 | S7 城楼 | 苏晚中景 | none | FaceRefine |
| 13 | 2:10.000–2:20.833 | 260 | 10.83 | 副歌3 | S1 雪原 | 双人擦肩 | none | 加雪粒子 |
| 14 | 2:20.833–2:26.250 | 130 | 5.42 | 尾奏 | S9 雪地刀 | 断刀特写 | none | 剧名排版 |
合计 3510 帧 / 146.25 s / 2:26.25
<Subject 1> = 雪原环境(sc_snowfield.png)。人物只作剪影,不挂角色三视图(避免远景脸崩)。cold blue-grey dusk, wind-driven snow, tattered black war banner, broken halberds, a tiny silhouetted swordsman on the horizon, static, no facial detail。<Subject 2> = 沈砚的手/断刀/缠布(prop_hand_bandage.png + prop_broken_blade.png)。extreme close-up, bandaged right hand gripping a broken sheathed-less blade, water-ripple pattern on steel, snow light reflection, knuckles whitening, one drop of blood。<Subject 3> = 苏晚(char_suwan_front.png 作身份锚 + 整张三视图补充)、<Subject 4> = 药庐(sc_herb_hut.png)。<Subject 5> = 雨夜竹林(sc_bamboo_rain.png)+ prop_lantern.png(通用道具,不挂身份锚)。<Subject 2> = 沈砚(以三视图背面为主)、<Subject 4> = 药庐。<Subject 6> = 玄空(char_xuankong.png)、<Subject 7> = 剑冢(sc_sword_graveyard.png)。<Subject 8> = 裴无涯(char_peiwaya_front.png 身份锚)、<Subject 9> = 城楼(sc_city_tower.png)。<Subject 10> = 银簪(prop_silver_hairpin.png)、<Subject 11> = 破庙(sc_ruined_temple.png)。<Subject 2> = 沈砚、<Subject 12> = 冰湖(sc_frozen_lake.png)。<Subject 2> 沈砚剪影、<Subject 8> 裴无涯剪影、<Subject 13> 断崖(sc_cliff_sunset.png)。剪影形态,弱化面部细节。h3_ctx_duanzui 的 Save index 1。<Subject 2>、<Subject 8>(身份锚)。<Subject 3> = 苏晚、<Subject 9> = 城楼。<Subject 2> + <Subject 3>(双人)、<Subject 1> = 雪原。sc_snow_blade.png 静态 + 微动(或镜2 素材裁切 + 极缓推)。本项目全部镜头走 Ref2VA(MiniMaxH3ReferenceToVideo),提示词必须是英文六段式,顺序固定:
subject_definitions ← 定义 <Subject N> / <Picture N>,说明它是什么、提供什么
summary ← 一行英文 + 方括号任务类型前缀,如 [reference generation]
retention_analysis ← 每个参考标签一行 + 固定关系标记
detailed_description ← 主体:按播放顺序写画面/动作/镜头/声音,350–500 词
overall_soundscape ← 环境音与物理音
non_diegetic_music ← 只有观众能听到的配乐
关系标记(只能从这个表里选)
| 可见内容 | 用途 |
|---|---|
fully_preserved | 参考特征完整保留 |
partially_preserved | 用到了但部分特征改变 |
attribute_transfer | 特征转移到另一个主体 |
weak_reference | 只保留风格/氛围的大致相似 |
硬性规则
<Subject N>,全篇含义不得改变;<Picture N> 条目,写进对应 <Subject N> 定义里;<d>[语言] ...</d> 里;<Video 1>/<Audio 1> 这类字面标签(会报 unstable_reference_tag),源视频用中性措辞 "the source video reference";<Subject 1>=源视频被替换者、<Subject 2>=目标角色,不得写反。subject_definitions:
<Subject 1> is the young woman in <Picture 1> and <Picture 2>, with a soft oval face, slightly upturned eyes, dark hair half-gathered and pinned with a plain silver hairpin, wearing a moon-white chest-high ruqun under a plain white short cape with pale-cyan cuffs and sash, and a cinnabar-red silk shawl draped over both arms.
<Subject 2> is the snow-covered herbalist courtyard in <Picture 3>, with a bamboo fence, snow-dusted herb-drying trays on wooden racks, a small red-clay stove, and warm light glowing through paper windows.
<Subject 3> is the man in <Picture 4>, seen only from behind and in silhouette: a tall figure in a black narrow-sleeved martial robe with a half-worn dark-grey fox-fur cloak slipping off his right shoulder, black hair tied high with an ebony pin.
summary:
[reference generation] The target video is one 10.8-second cinematic shot for a wuxia television opening: <Subject 1> turns her head toward the arriving <Subject 3> inside <Subject 2>, her cinnabar shawl lifted by the wind.
retention_analysis:
<Subject 1> (appears in [Shot 1]): fully_preserved - her oval face, half-gathered hair with the plain silver hairpin, moon-white ruqun, pale-cyan cuffs and the cinnabar shawl are retained.
<Subject 2> (appears in [Shot 1]): fully_preserved - the bamboo fence, snow-dusted herb trays, red-clay stove and warm paper-window light are retained.
<Subject 3> (appears in [Shot 1]): partially_preserved - only his back and silhouette are used and his face is never shown.
detailed_description:
The target video is a cinematic wuxia television-opening shot with a cool desaturated winter palette, a single warm interior light source, shallow depth of field and fine film grain.
[Shot 1] A medium shot establishes <Subject 2>, the snow-covered herbalist courtyard, with a bamboo fence and snow-dusted herb-drying trays on wooden racks in the foreground. <Subject 1> (S1), the young woman in the moon-white ruqun with pale-cyan cuffs and the cinnabar-red shawl, stands with her back to the camera beside a small red-clay stove, turning dried herbs over the fire with both hands; warm light from the paper windows rims her shoulders. At 00:02.500, faint footsteps crunch on snow behind her. She stops moving, then turns her head to look back over her right shoulder, the plain silver hairpin catching the window light; a strand of hair slips loose across her cheek. A gust lifts one end of the cinnabar shawl away from her arm, and the fabric snaps once in the air before settling. Behind her, at 00:06.000, the blurred dark silhouette of <Subject 3>, the tall man in the black robe and the dark-grey fox-fur cloak, passes the bamboo gate without stopping, his face never visible. The camera makes a slow right-to-left pan with a gentle push in, keeping <Subject 1> in the left third of the frame and the blurred silhouette in the right background. She holds the look for a beat, then turns back to the stove and lowers her eyes before the shot ends.
overall_soundscape:
A quiet snowy courtyard ambience throughout: light wind through bamboo, a crackling red-clay stove, the soft rustle of dried herbs, and two muffled footfalls on snow behind the woman.
non_diegetic_music:
N/A
[Shot 1] 开头必须在 0.00 秒就锚定两方身份,绝不能让模型自由发挥: At 00:00.000 the two figures are already locked at extreme close range, the broken blade and the long slender saber crossed between them.retention_analysis 里两人都写 fully_preserved,并明确"上一段结尾的机位与轴线被延续";detailed_description 里描述交击节奏对齐音乐(重击一次 + 轻擦一次),镜头贴着兵器弧线环绕;overall_soundscape 描述(金铁交击、气劲破空),non_diegetic_music 写 N/A——配乐统一来自 YuE2 歌,H3 不要自造 BGM。| 阶段 | 内容 | 工具 | 预计耗时 | 产出 |
|---|---|---|---|---|
| 0 设定定稿 | 本两份文档确认 | — | 你审阅 | 定稿 |
| 1 静态素材 | 4 角色 + 9 场景 + 4 道具 ≈ 17–21 张 | 即梦 5.0 + 2k(0 积分) | 1–2 h | 三视图 / 背景板 |
| 2 出歌 | 《霜刃引》含人声 2:26 | YuE2(GPU 机 ComfyUI) | 0.5–1 h | 主音轨 |
| 3 预览版 | 14 镜全跑,864×480 / 4 步(约 9–12 min/镜) | H3 | ≈2.5 h | 节奏/构图/一致性验证版 |
| 4 正式版 | 14 镜,1344×768 / 12 步(54–86 min/镜 + 5 min 冷却) | H3 | 13–19 h → 分 2 晚 | 母版片段 |
| 5 后期 | 溶像拼接 → FaceRefine → RIFE 插帧 → 放大 1080p → 统一调色 → 混音 → 剧名排版 | ffmpeg / ComfyUI | 3–5 h | 成片 2:26 |
continuityEnabled / 段间引导;sleep 300(5 分钟冷却);bash ~/stop-ridge.sh + 停掉其他占卡进程;bash ~/restart_comfy.sh 起 ComfyUI;~/ram_guard.sh(MemAvailable 连续两次 <2.5 GB 自动 interrupt);kernel.panic=0,真硬挂不会自愈,只能人工断电 → 长跑期间请确保机器旁有人。# 预览版(先跑,验证节奏)
cd ~/Downloads/h3-tasks/sd-yin && bash run_preview_480p.sh
# 正式版(分两晚,断点续跑)
cd ~/Downloads/h3-tasks/sd-yin && bash run_official_720p.sh
脚本将按
h3_chain.py的通用执行器改写(复用已跑通 13 小时零挂机的run_all_scenes.sh结构), 放在 GPU 机~/Downloads/h3-tasks/sd-yin/。
| 风险 | 概率 | 对策 |
|---|---|---|
| 音乐实际长度偏离 146 s | 高 | 调 --sem-mx 重跑;±5 s 内改尾奏留白;最后手段音频变速 ±1% |
| 角色跨镜不一致 | 中 | 固定 seed + 每镜同一张身份锚图 + 三视图;续接段只留身份锚 |
| 中近景人脸崩坏 | 中 | 镜3/7/12 必过 FaceRefine;远景一律剪影 |
| 打斗动作糊/崩 | 中 | 缩短单镜、用剪影与兵器特写替代全身动作;RIFE 补帧提升流畅度 |
| 整机硬挂 | 低(守纪律时) | ≤90 min/段 + 冷却 + 断点续跑 + 人工值守 |
| 即梦 2K 限免到期 | 中 | 素材一次出足,别分批拖 |
| 生成出现文字/水印 | 低 | 出图后逐张验,出现即重出;字幕一律后期加 |
霜刃片头曲-成片-2m26s-1080p.mp4(裁 2.39:1 + 立体声)霜刃片头曲-母版-1344x768-16x9.mp4(未裁切)霜刃引-人声版.flac / .mp3(48 kHz).md(含实际耗时、踩坑、seed 表)h3-shuangren-opening/