Nodes/Nukun_ComfyUI_Nodes/MiniMax H3 Prompt Builder (Nukun)
ComfyUI Node

MiniMax H3 Prompt Builder (Nukun)

MiniMax H3 prompts, six clean sections at a time

By OnekoSL·Created 3 months ago·Updated 11 days ago· 1
MiniMax H3 Prompt Builder (Nukun)
    • prompt
    • scene
    • character
    • action
    • camera
    • visual_style
    • audio
    scene_text
    scene_vocab_fileresources/minimax_h3_scenes.csv
    scene_amount0
    scene_word_index0
    character_text
    character_vocab_fileresources/minimax_h3_characters.csv
    character_amount0
    character_word_index0
    action_text
    action_vocab_fileresources/minimax_h3_actions.csv
    action_amount0
    action_word_index0
    camera_text
    camera_vocab_fileresources/minimax_h3_cameras.csv
    camera_amount0
    camera_word_index0
    visual_style_text
    visual_style_vocab_fileresources/minimax_h3_visual_styles.csv
    visual_style_amount0
    visual_style_word_index0
    audio_text
    audio_vocab_fileresources/minimax_h3_audio.csv
    audio_amount0
    audio_word_index0
    spoken_dialogue
    dialogue_languageGerman
    dialogue_voiceclear young female voice
    dialogue_deliverynatural speech, calm and slightly cautious tone

    If you've ever hand-written a MiniMax H3 prompt, you know the drill: a wall of prose where Scene, Character, Action, Camera, Visual Style and Audio all blur together, and half the queue gets rejected for missing a section. This node exists so that doesn't happen. It assembles one structured H3 video prompt from up to six fixed sections, in the exact order the model expects, and optionally mixes in sampled vocabulary phrases so you can batch out variations without touching the prompt text.

    MiniMax is a closed video model - you reach it through its own frontend or an API node, not through a local sampler - so what this node gives you is the prompt side of that workflow. It's a text generator that feeds the thing that actually renders. That's a fine division of labor, and honestly the most common failure in video prompting is upstream of the model anyway.

    How it works

    Each of the six sections gets a fixed multiline text box (scene_text, character_text, action_text, …) plus a vocab file and two sampling knobs. The *_amount default is 0, which means "no sampling, text only" - you get a clean structured prompt the moment you type something. Raise an amount and the node pulls that many phrases from the section's vocab file using a deterministic shuffle bag, so the same seed-index always gives the same words and incrementing the *_word_index cursor walks through non-overlapping blocks before reshuffling. Empty sections are omitted from the output entirely.

    The spoken_dialogue field is the clever bit: type one line and it gets quoted into both Action ("the character speaks: …") and Audio, and the Audio block adds your dialogue_language, dialogue_voice and dialogue_delivery plus a "No other dialogue." instruction. So the model knows who's talking, in what language, with what voice and tone, and that nothing else should be spoken. For a character-driven clip that's most of the work done.

    The pack ships six bundled vocab files (resources/minimax_h3_scenes.csv and friends, 80 phrases each) so the defaults work out of the box - scene and audio files in particular are curated to be coherent packages rather than random tag salad.

    The outputs you'll actually wire

    • prompt - the complete blank-line-separated H3 block, ready to paste or feed downstream.
    • scene, character, action, camera, visual_style, audio - each section's finished body without the header, which matters if you want to refine individual sections later.

    The natural next stop in this pack is Ollama Video Prompt Refiner (Nukun): its six inputs map 1:1 onto these section outputs, so you can go from randomized structured prompt to a polished, harmonized one in a single hop. You can also just paste prompt into whatever MiniMax client you already use.

    Installing it

    Same story as every node in this pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes.git
    

    then restart ComfyUI. Or search "Nukun" in ComfyUI Manager and hit install. No model downloads, no API keys - this node doesn't call anything, it just formats text. The only dependency worth knowing: scipy and PyWavelets are in requirements.txt for the pack's sampler nodes, so the first install may pull those.

    Where people get stuck

    The trap is the *_amount defaults. Because they're all 0, a beginner who just wants "some random" cranks them to 10 and gets a vocabulary soup that overrides their careful fixed text. The intended pattern is fixed text as the backbone, a small amount (1–3) as seasoning, and 0 when you want the section hand-written. Also: each section's word_index is independent, so incrementing them all at different rates gives you combinatorial variation - which is a feature, but it means "increment the seed" only moves one section at a time. Set the ones you care about on control-after-generate and leave the rest alone.

    CategoryNukun/Text

    Inputs (28)

    NameTypeDefaultDescription
    scene_textSTRINGFixed natural-language content for [Scene].
    scene_vocab_fileCOMBOresources/minimax_h3_scenes.csvOptional comma-separated phrase list for [Scene].
    scene_amountINT00–10000Number of vocabulary phrases for [Scene]. Use 0 to disable sampling.
    scene_word_indexINT00–18446744073709550000Deterministic shuffle-bag block cursor for [Scene].
    character_textSTRINGFixed natural-language content for [Character].
    character_vocab_fileCOMBOresources/minimax_h3_characters.csvOptional comma-separated phrase list for [Character].
    character_amountINT00–10000Number of vocabulary phrases for [Character]. Use 0 to disable sampling.
    character_word_indexINT00–18446744073709550000Deterministic shuffle-bag block cursor for [Character].
    action_textSTRINGFixed natural-language content for [Action].
    action_vocab_fileCOMBOresources/minimax_h3_actions.csvOptional comma-separated phrase list for [Action].
    action_amountINT00–10000Number of vocabulary phrases for [Action]. Use 0 to disable sampling.
    action_word_indexINT00–18446744073709550000Deterministic shuffle-bag block cursor for [Action].
    camera_textSTRINGFixed natural-language content for [Camera].
    camera_vocab_fileCOMBOresources/minimax_h3_cameras.csvOptional comma-separated phrase list for [Camera].
    camera_amountINT00–10000Number of vocabulary phrases for [Camera]. Use 0 to disable sampling.
    camera_word_indexINT00–18446744073709550000Deterministic shuffle-bag block cursor for [Camera].
    visual_style_textSTRINGFixed natural-language content for [Visual Style].
    visual_style_vocab_fileCOMBOresources/minimax_h3_visual_styles.csvOptional comma-separated phrase list for [Visual Style].
    visual_style_amountINT00–10000Number of vocabulary phrases for [Visual Style]. Use 0 to disable sampling.
    visual_style_word_indexINT00–18446744073709550000Deterministic shuffle-bag block cursor for [Visual Style].
    audio_textSTRINGFixed natural-language content for [Audio].
    audio_vocab_fileCOMBOresources/minimax_h3_audio.csvOptional comma-separated phrase list for [Audio].
    audio_amountINT00–10000Number of vocabulary phrases for [Audio]. Use 0 to disable sampling.
    audio_word_indexINT00–18446744073709550000Deterministic shuffle-bag block cursor for [Audio].
    spoken_dialogueSTRINGExact spoken line. It is quoted in both [Action] and [Audio].
    dialogue_languageSTRINGGermanLanguage used to describe the spoken dialogue.
    dialogue_voiceSTRINGclear young female voiceVoice description inserted into [Audio].
    dialogue_deliverySTRINGnatural speech, calm and slightly cautious toneSpeech delivery and tone inserted into [Audio].

    Outputs (7)

    NameTypeDescription
    promptSTRING
    sceneSTRING
    characterSTRING
    actionSTRING
    cameraSTRING
    visual_styleSTRING
    audioSTRING