MiniMax H3 剧本资产生成器 · Script Asset Generator 🐑
Shot lists you can argue with, not just generate
- llm_service_connector
- storyboard
- storyboard
- storyboard_json
- storyboard_text
- shot_count
Every long AI video starts the same way: you queue eight clips, wait, and discover the story made no sense. MiniMaxH3StoryboardGenerator makes you look at the plan first. Give it a concept and a target shot count and one LLM call returns a structured storyboard - beats, shot sizes, camera moves, transitions, durations - as a table you can read and a JSON array your tooling can chew.
It's a planning artifact and stays one. This node doesn't write H3 prompts and doesn't touch the Production Plan; that's MiniMaxH3LoopPromptGenerator's job further down the graph.
What you set
concept- the whole story in a paragraph. Blank falls back to a built-in "short cinematic moment with a protagonist" default: useful for seeing the output shape before committing a real idea.shot_count- what you're asking for, 1 to 20. It's a request, not a contract: read the third output pin for the real number.style- how beats get arranged, and the dropdown that changes the board most:narrative_arc(three-act),parallel_montage,rhythmic_cuts,single_continuousfor the one-take look,character_study.genre- a 22-entry taxonomy shared with the pack's H3 prompt generator, so the advice here and downstream don't contradict each other.output_format- howstoryboard_textrenders:table(Markdown table),detailed(multi-field per shot),minimal(id plus description).
language picks the prose language (en / zh; English by default because H3 behaves better with it). Advanced knobs are temperature at 0.8 - a storyboard is the one place in this pipeline where you want creative layout, not obedient formatting - plus max_tokens and timeout.
What comes out
storyboard_text- the rendered board. This is the one humans read and edit.shots_json- the normalized array:shot_type,camera_movement,transition_in,duration_seconds,narrative_beat, pluscharacters,props,notes. Shot types come from a fixed whitelist (extreme_wide_shotthroughextreme_close_up,over_the_shoulder,point_of_view,two_shot,insert_shot, …) with unknown values falling back tomedium_shot, durations clamped, ids uniqued. So the JSON is safe to key on, which is more than you can say for most model output.shot_count(INT) - what the board actually contains.
One wrinkle before you wire it: the docs describe feeding shots_json into the Loop Plan Generator, but the loop node's only free-text input is user_input - there's no shot-list socket on it. The handoff is text: read storyboard_text, edit what you disagree with, paste it into user_input (or the enhancer's draft). The board is your thinking space; the loop node turns prose into plan-shaped prompts.
H3 timing note: duration_seconds is the field to respect. H3 generates 4–15s per call and the loop node caps every scene at 14s, so a board planning eight 20-second shots is a board you'll be re-cutting.
How it behaves when the model misbehaves
It asks for a JSON array in one call, tolerates a bare array, a ```json fence or prose around it, and strips a leading <think> block from a reasoning model. If the array still won't parse it does one corrective retry - a "your last reply was malformed" turn - then fails the node outright. No partial boards, which is the behaviour you want when a bad board would otherwise become twelve paid generations.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
cd ComfyUI-MieNodes && pip install -r requirements.txt
Or find ComfyUI_MieNodes in ComfyUI Manager - it's on the Comfy Registry under publisher mie. No models, no heavy dependencies: just a Set*LLMServiceConnector with a working key (or a local Ollama endpoint, which costs nothing per call and handles this job fine).
Where people get burned
- A local 8B model that won't emit JSON. The contract is a JSON array, and the failure is a hard fail, not a shrug. Keep getting "unparseable after 2 attempts" on a small local model? Switch that one node to something bigger - it's the least frequent call in the pipeline, so it's the cheapest place to rent quality.
- Reasoning models and
max_tokens. The 8192 default already assumes some models burn budget thinking before they answer (the source of this repo notes exactly that failure: HTTP 200, empty content). If you drop it low "to save money", that's what you'll get. shot_countisn't honoured to the digit. Models round, merge and pad. Trust the output pin, not the number you typed.- It plans, it doesn't prompt. No dialogue is locked verbatim, no
<d>blocks are emitted, no continuation rules are written. If what you want is a shootable H3 plan, this is step one of two - the loop node is step two.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_service_connector | LLMServiceConnector | — | |
| name | STRING | 新剧本 | 剧本资产名,可直接保存入库。 Script-asset name; can be saved into the library as-is. |
| concept | STRING | 角色2动作:双手拿着苹果递向角色1。 角色2:吃苹果吗? 角色1:不吃。 | 按输入模式填 · depends on mode: concept 概念创作:随便写——一个点子、一段故事、几句台词草稿都行,AI 出完整剧本,你看了预览再说好不好; script 锁定剧本:一行一件事(角色1:台词 / 角色1动作:动作 / 角色1入场:/ 角色1离场:,可加[zh]/[en]),台词逐字锁定。 In concept mode write anything (an idea, a story, loose lines) and the AI authors the full asset; in script mode every line is a role-labelled event, locked verbatim. |
| character_count | INT | 21–8 | — |
| character_settings | STRING | 角色1:角色1 | 画面内 | 左侧 | adult male 角色2:角色2 | 画面内 | 右侧 | adult female | 每角色一行:角色1:名字 | 画面内/画外/稍后入场 | 左侧/右侧/中间/无 | 声音要求(分隔符 | 或逗号都行)。锁定模式须与角色数一致;概念模式可整栏留空由 AI 定。外观以接入角色资产为准,未接则用默认设计或模型生成。 One line per role ( | or commas as separators). Locked mode: must cover every numbered role; concept mode: leave empty and the AI casts it. |
| shot_count | INT | 00–20 | 生成片段数,0=自动(能装进约14秒就用最少分段;推荐)。锁定模式下事件会被逐字分组;单人独占台词的续接片段是已知崩角色形态。 Generation segments, 0 = auto (fewest segments that fit; recommended). |
| target_duration_seconds | FLOAT | 201–600 | 目标交付总时长;概念模式只是建议(AI 按内容调整),锁定模式按 H3 帧网格分配。过短会报错,不删减台词。怒斥/喊叫演绎实测约 2.5 字/秒,愤怒独白要把目标时长按慢速翻着加。 Target delivered duration; a hint in concept mode, enforced in locked mode. Too short errors loudly; dialogue is never cut. Furious/shouting delivery measured ~2.5 chars/s - budget angry monologues accordingly. |
| camera_framing | COMBO | 景别:two_shot 双人同框 / medium_shot 中景 / medium_close_up 中近景 / close_up 特写 / wide_shot 全景。概念模式是建议。 Framing (a hint in concept mode): two_shot / medium_shot / medium_close_up / close_up / wide_shot. | |
| camera_movement | COMBO | 机位运动:locked 固定机位(推荐)/ gentle_follow 轻微跟随。 Camera movement: locked (recommended) or gentle_follow. | |
| camera_perspective | COMBO | 视角:observer 旁观(独白对镜头也用它)/ first_person 第一人称(观众自己的手和身体会入画)。 Perspective: observer, or first_person (the viewer's own hands/body enter the frame). | |
| language | COMBO | zh | 2 options: zh, en |
| seed | INT | 00–18446744073709550000 | — |
| mode | COMBO | script | 输入模式 · input mode: concept 概念创作:concept 里随便写(点子/故事/台词草稿),AI 出完整剧本,预览验收; revise 修订:把「加载剧本资产」的 storyboard 接到下方输入,concept 里写这一版要改什么(如「结尾改成她笑而不语,其余不动」),AI 在上一版基础上出新版,预览附逐条 diff;未提及的台词逐字保留。接线事实(audio_mode/续接重叠帧)继承上一版; script 锁定剧本(默认,旧行为):逐行剧本,台词逐字锁定,AI 只分组和写英文执行说明。 concept: write anything, the AI authors the whole asset. revise: wire the previous version's storyboard, describe THIS revision, get the next version with a diff. script (default): role-labelled lines locked verbatim. |
| storyboardopt | MIE_STORYBOARD | 接「加载剧本资产」的 storyboard 输出 · wire the Load Script Asset output here. 仅 revise 修订模式读取:作为基线版本,concept 里写的修改要求作用在它之上,产出带新名字的下一版(旧资产不动)。concept/script 模式忽略此输入。 | |
| lookopt | STRING | Natural lighting, coherent visual style. | 画风·look 只写艺术风格(媒介/画法/色彩),绝不写场景内容或时段(「都市夜景」「室内咖啡馆」都不行)——look 逐字进提示词且不被任何接线资产覆盖,写了环境就会压过接入的场景图(2026-11-01 真机实测)。 Art style ONLY (medium/technique/palette); never scene content or time of day — the look line reaches the prompt verbatim and nothing overrides it, so an environment named here beats the wired scene image. |
| settingopt | STRING | 人物位置与情境;具体环境可由V3的可选场景资产提供。 | |
| constraintsopt | STRING | 导演约束,原样保留。例如:只拍两人对话,不把台词中的回忆拍出来。 | |
| continuation_overlap_framesopt | INT | 220–120 | 需与Loop续接重叠帧一致;独立片段不裁剪时设0。 |
| temperatureopt | FLOAT | 0.200–2 | — |
| max_tokensopt | INT | 8192256–32768 | — |
| timeoutopt | COMBO | 120 | 4 options: 30, 60, 120, 300 |
| audio_modeopt | COMBO | generated | generated:H3自选声音;reference:V3中每个角色都接带参考音频的人物资产,画外角色仅使用声音。最多3个角色;Asset→Slots音频需接到H3参考音频输入。 |
| sceneopt | STRING | 场景·scene 只写默认环境:地点与固定陈设(例:都市街头和路灯 / 诊室和问诊桌)——不写时段(归 light 预设)、不写画风(归 look)、不写站位(归 setting)。在 V3 里接了场景资产时,编译器会机械丢弃这里的文字(资产覆盖剧本场景),图与 ambience 生效;未接场景资产时使用默认环境,留空由模型设计。 ENVIRONMENT ONLY - the default place and its fixed contents (a city street with lamps; a clinic consultation room). No time of day (light preset), no art style (look), no staging (setting). A wired scene asset drops this text entirely at compile time; it serves scene-less runs and story-required rooms only. | |
| lightopt | COMBO | follow_image | 时段光锚(预设选择器)。follow_image=不写光文字,跟随场景图自带光线;夜戏不接场景图时必须选夜间预设,否则 H3 默认渲染成白天。night_lamp 是室内台灯场景,户外夜景选 late_night。custom=在下方 light_text 自定义。注意:接了场景资产时,光锚预设会在编译时被丢弃(场景图自带光线生效,用户的资产赢)。 Time-of-day light anchor (preset selector). follow_image writes no light text and follows the wired scene image's own lighting; a night story without a visibly dark scene image MUST pick a night preset or H3 renders daylight. night_lamp is an INDOOR table-lamp scene; outdoor night picks late_night. custom = write your own below. |
| light_textopt | STRING | 自定义光锚,仅在 light=custom 时填写(留空会响亮报错);会被译成英文 execution.light。 Custom light anchor, only with light=custom (empty here is a loud error); translated into the English execution.light. | |
| character_designsopt | STRING | 默认角色外观 JSON,例如 {"character_1":"穿红外套的猫"}。仅未接该角色资产时使用;留空由模型自行设计。不要把默认外观写进站位或动作。修订模式继承上一版。 Optional default appearances by role ID. Wired character assets override each role's default. | |
| criticopt | COMBO | on | 连续性审片 · continuity critic: on:资产通过契约校验后再做一次跨镜头复核(覆盖、连续性、单镜可演、节奏),发现观众看得见的矛盾自动回修重摇;每次生成多一次模型调用(约 30~60 秒),修不好则交付通过校验的版本并附警告。off:只做契约校验(快、零额外调用)。 on: after the contract passes, a second reader checks the asset across shots (coverage, continuity, one beat per segment, pacing) and repairs what a viewer would notice. One extra model call per generation; an unrepaired asset is still delivered with the notes attached. off: contract only. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| storyboard | MIE_STORYBOARD | — |
| storyboard_json | STRING | — |
| storyboard_text | STRING | — |
| shot_count | INT | — |