Nodes/MiniMax-H3 Tools/MiniMax H3 Prompt Lint / 提示词检查
ComfyUI Node

MiniMax H3 Prompt Lint / 提示词检查

MiniMax H3 prompts fail silently — Prompt Lint catches the mistakes

By Rinne414·Created about a month ago·Updated about a month ago· 10
MiniMax H3 Prompt Lint / 提示词检查
    • prompt
    • warnings
    • is_clean
    prompt
    modet2va
    duration_seconds0.0
    ref_images0
    ref_videos0
    ref_audios0
    raise_on_warningfalse

    MiniMax H3's prompt format is unforgiving, and worse, it's quietly unforgiving. Misspell a field name, mis-time a shot cut, forget a speaker ID, and H3 won't error out - it just produces a worse video and never tells you why. The Prompt Lint node is the deterministic check that catches those mistakes before you spend fifteen minutes rendering.

    What it is (and isn't)

    It's a linter, not a generator. There's no LLM inside, no rewriting, no API key. It takes your prompt, validates it against the rules in MiniMax's own video prompt writing guides (the base guide for t2va/fl2va modes, the reference guide for ref2va), and passes the prompt through unchanged. That's a deliberate design choice - the pack explicitly doesn't want to duplicate prompt-generation/rewriting nodes like boo-textgen or PromptEnhancer. It only verifies.

    Because the prompt passes through untouched, the node can sit inline in a workflow: lint result on one branch, clean prompt fed forward on the other.

    What it checks

    This is where the node earns its keep. Set mode to t2va, fl2va, or ref2va and it validates the fields that mode requires (three base fields for t2va/fl2va, six full-reference fields for ref2va), then digs into the details:

    • required fields present and in order, none empty
    • shot numbering sequential from 1, cut timestamps in the MM:SS.mmm format, strictly increasing, and Shot 1 carrying no timestamp at all
    • dialogue tags with a recognized language tag from the 11 that have stable support, balanced <d> tags
    • speaker IDs consecutive from S1, and dialogue attributed to a speaker in its shot
    • voiceover using the required exact phrase "says in an off-screen voiceover" plus a lips-closed statement
    • soundscape within 1–4 sentences and not restating dialogue; music within 1–3 sentences and free of diegetic words (radio, TV, jukebox…)
    • in ref2va mode: task-type prefixes, the fixed preservation markers, and <Picture/Video/Audio/Subject N> numbering within what's actually connected

    The inputs that matter

    prompt (multiline), mode, and duration_seconds (set the clip length and it flags cut times past the end; 0 disables that check). If you're in ref2va mode, also set ref_images, ref_videos, ref_audios to how many references are actually connected, so out-of-range <Picture N> tags get flagged.

    Outputs: prompt (unchanged), warnings (a numbered list, or "clean - no issues found"), and is_clean (a boolean). Wire warnings into a text preview and is_clean into whatever you want to gate.

    The one setting to know: raise_on_warning. Default off, so a lint warning never blocks a render - it just reports. Flip it on and a warning fails the workflow, which is handy once you've got a template you want enforced on every run.

    Install

    Part of the MiniMax-H3 Tools pack (ComfyUI 0.30.0+). Search "MiniMax H3 Tools" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Rinne414/ComfyUI-MiniMaxH3-Tools.git
    

    Restart ComfyUI, find MiniMax H3 Prompt Lint under MiniMax H3. No extra dependencies, no model files - it's pure string validation.

    Categorymodel/conditioning/minimax

    Inputs (7)

    NameTypeDefaultDescription
    promptSTRING
    modeCOMBOt2vat2va/fl2va expect the three base fields; ref2va expects the six full-reference fields. / t2va/fl2va 需要三个基础字段;ref2va 需要六个完整参考字段。
    duration_secondsFLOAT0.00–60Clip duration, used to flag cut times past the end. 0 disables that check. / 片段时长,用于标记超出结尾的切镜时间;0 表示禁用此检查。
    ref_imagesINT00–9How many reference images are connected, so <Picture N> beyond that can be flagged. / 已连接的参考图片数量,用于标记超出范围的 <Picture N>。
    ref_videosINT00–3
    ref_audiosINT00–3
    raise_on_warningBOOLEANfalseFail the workflow instead of passing the prompt through. Off by default so a lint warning never blocks a render. / 发现警告时让工作流失败,而不是继续传递提示词;默认关闭,避免检查警告阻止渲染。

    Outputs (3)

    NameTypeDescription
    promptSTRING
    warningsSTRING
    is_cleanBOOLEAN