Run this model with HF Jobs

Run Smite79/MiniMax-H3-Longvideos on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Smite79/MiniMax-H3-Longvideos. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Smite79/MiniMax-H3-Longvideos on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

H3 Long Videos

This node is a constant work in progress! Please check for updates regularly. I have tried to combat babble to the best of my ability. 10Eros/Sulphur3 models are bad for this, so you accept the risk for using those models with this node.

A ComfyUI custom node that makes long MiniMax H3 videos with sound from a written story.

You write the story as paragraphs. Each paragraph becomes one shot. Each shot starts on the last frame of the shot before it, so the whole thing plays as one continuous video with matching audio.

What it does

  • One shot per paragraph. Each shot is only as long as its paragraph needs, up to a limit you set. Shots with dialogue are sized to the spoken lines, so H3 has no spare time to fill with extra talking.
  • Keeps people looking the same. Give each character a reference picture, and the node shows it to H3 in every shot. It also keeps track of who is on screen and what they are wearing as the story goes on.
  • Keeps descriptions out of the dialogue. Spoken lines go to H3 in its own dialogue format, so the scene, the character descriptions and the actions read as description, not as words to say.
  • Logos on clothing. A picture can be a logo on a garment. It shows only while that garment is being worn.
  • Checks the dialogue with Whisper. After each shot, Whisper listens to the take:
    • If a line is missing or wrong, the shot is made again.
    • If someone says words that aren't in the script, only those moments are redone, picture and sound together. The rest of the shot keeps its own sound.
    • Words read out from the prompt, the anchor or the character memory are always redone, even in shots with a radio or a crowd, where the rest of the voice check is off.
  • Cleans up shot endings. H3 sometimes flashes the reference picture at the end of a shot. The node finds this and redoes or trims those frames.
  • Stops colour drift. Each shot's colour and contrast are kept in line with shot 1, so the picture doesn't burn in or get harsher over a long video.
  • Reports what happened. The info output lists every shot, every retry and every fix the node made.

How to wire it

How to wire H3 Long Videos

Everything in the picture is a ComfyUI core node, apart from the three H3 Long Videos nodes. Solid wires are needed. Dashed wires are optional.

Input Connect Needed?
model Load Diffusion Model with your H3 model. A Load LoRA (model only) can go in between. Yes
clip Load CLIP with the H3 Qwen3-VL text encoder, type set to minimax Yes
vae Load VAE with the H3 video VAE Yes
audio_vae Load VAE with the H3 audio VAE Yes
prompt Text (Multiline) containing the story Yes
anchor Text (Multiline) describing the place: setting, light, look No
character_memory Text (Multiline), one person or item per line No
picture_1 … picture_6 Load Image: one picture per character memory line No
place_picture Load Image: a picture of the place No
first_frame Load Image: the picture the first shot opens on No
Output What it is Usually goes to
images All the frames of the finished video Create Video → Save Video (or VHS Video Combine)
audio The finished soundtrack Create Video audio
fps Frame rate (24) Create Video fps
frames How many frames the video has Anything that needs the count
info A report on every shot: lengths, retries, fixes, notes Preview as Text
prompts The prompt H3 was given for each shot Preview as Text

Install

  1. Clone this repository into ComfyUI/custom_nodes/:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Smite79/MiniMax-H3-LongVideos
    

    Or download it as a ZIP and unzip it there. It is also on Hugging Face at Smite79/MiniMax-H3-Longvideos.

  2. Install the requirements with ComfyUI's own Python. On the Windows portable build:

    python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\MiniMax-H3-LongVideos\requirements.txt
    
  3. Restart ComfyUI. The nodes are listed under H3 Long Videos.

You also need:

  • A ComfyUI version with built-in MiniMax H3 support.
  • The H3 model files:
    • the diffusion model;
    • the Qwen3-VL text encoder;
    • the video VAE;
    • the audio VAE.

Whisper downloads itself on the first run. It's large-v3-turbo, about 1.6 GB, saved into ComfyUI/models/H3-LongVideos/whisper-large-v3-turbo. The files come from a fixed version and are checked against known checksums. If the download fails, the node still runs. It skips the Whisper check but still uses its pitch-based check for unwanted voices.

Writing the story

The prompt

Put a blank line between paragraphs. Each paragraph is one shot.

Mia walks into the kitchen and looks around. [6s]

Mia smiles and says, "Good morning!"

[close-up] Mia pours a cup of coffee.

[new shot] Mia sits at the table by the window.
  • Dialogue goes in double quotes after a speaking word: Mia says, "Hello.". Keep it to one or two short lines per shot. Long speeches give H3 more room to babble.
  • Words written on things are drawn, not spoken. For example her shirt says "Hello" or a sign reading "Closed" both count as printed text.
  • Tags in square brackets change the shot:
Tag What it does
[6s] Length of this shot in seconds (up to longest_shot)
[new shot] or [cut] Start fresh instead of continuing from the last frame
[front] [side] [from behind] Camera angle
[close-up] [wide] Camera distance
[inset: text] A small picture in the corner. A corner can be named, e.g. [inset bottom-left: a phone screen]

Character memory

One line per person, as Name: description. Objects that matter to the story, like a hat or a bag, can go here too. Write those in lowercase.

Mia: a woman, 30, short brown hair, green sweater, jeans
Jon: a man, 32, beard, grey hoodie
red umbrella: a large red umbrella with a wooden handle

picture_1 goes with line 1, picture_2 with line 2, and so on. To pair them some other way, add a tag to the line, such as Jon: a man, 32, beard <picture 3>. Once any line has a tag, tag every line that has a picture, because lines without a tag then get no picture.

Logos on clothing

A picture can be a logo printed on a garment. Put the tag next to the word "logo" on that garment:

Mia: a woman, 30, short brown hair <picture 1>, white t-shirt with the logo <picture 2> on the front, jeans
Jon: a man, 32, beard <picture 3>, grey hoodie with a <picture 4> logo on the back

Or give the logo a line of its own. It goes on whoever's outfit mentions a logo, or on the person the line names:

Mia: a woman, 30, short brown hair, white t-shirt with the logo on the front, jeans
logo: <picture 2>
  • Words like emblem, badge, patch, print and design work too, as does red cap with <picture 2> printed on it.
  • The logo picture is shown to H3 in every shot where that garment is being worn, and dropped once it comes off.
  • Say where it sits ("on the front", "on the back", "on the left sleeve"). Without that, it goes on the front.
  • Use a clean picture of just the logo, ideally on a plain background.

Anchor

One or two sentences describing the place, for example A bright kitchen, soft morning light from the window. It is added to every shot so the video stays in one place.

Settings

Setting Default Notes
megapixels 1.03 Picture size. 1.03 is H3's own size (1344×768 at 16:9).
aspect_ratio 16:9 Choose first frame to use the shape of the connected first frame.
longest_shot 8.0 The longest a shot may run, in seconds. Shorter is safer against babble.
seed 0 Retries and patches use their own seeds worked out from this one.
steps, cfg, sampler_name, scheduler 8, 1.0, euler, simple Passed to the sampler as usual.

The other two nodes

  • H3 Shot Length: turns seconds into a length H3 can make (17k + 5 frames at 24 fps). It outputs both the seconds and the frame count.

  • H3 Overlay: draws white text with a black outline over the frames:

    • a title that fades in and out at the times you set;
    • and/or a watermark.

    Put it between images and Create Video.

Tips

  • Babble. Keep dialogue short and give each line its own shot. Lower longest_shot if extra words keep appearing.
  • Burn-in or harsh contrast. If info says shot 1 already looks overdone, lower the LoRA strength or cfg. Later shots are matched to shot 1, so shot 1 sets the look.
  • Faces drifting. Connect a clear, front-facing picture for each character. The node shows them to H3 in every shot.
  • Read info. It says what the node changed and why. Shots that still had problems after all their retries are listed there too.

License

GPL-3.0. See LICENSE.

Downloads last month
599
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 1 Ask for provider support

Space using Smite79/MiniMax-H3-Longvideos 1