Nodes/ComfyUI-MiniMaxH3-MediaPrompt/MiniMax H3 Media Prompt
ComfyUI Node

MiniMax H3 Media Prompt

Stop Hand-Writing <Picture 2>

By YingsenP·Created 2 months ago·Updated about a month ago· 1
MiniMax H3 Media Prompt
  • media
  • media_1
  • media_2
  • media_3
  • media_4
  • media_5
  • media_6
  • media_7
  • media_8
  • media_9
  • media_10
  • media_11
  • media_12
  • media_13
  • media_14
  • media_15
  • media_16
  • media_17
  • media_18
  • media_prompt
◄text►
◄media_type_1►
◄media_type_2►
◄media_type_3►
◄media_type_4►
◄media_type_5►
◄media_type_6►
◄media_type_7►
◄media_type_8►
◄media_type_9►
◄media_type_10►
◄media_type_11►
◄media_type_12►
◄media_type_13►
◄media_type_14►
◄media_type_15►
◄media_type_16►
◄media_type_17►
◄media_type_18►

The name says "prompt", but this node doesn't write anything for you. It fixes a bookkeeping problem.

The problem it actually solves

MiniMax H3's reference-to-video path - the MiniMaxH3ReferenceToVideo node that shipped in core ComfyUI alongside the weights - takes its references as separate optional inputs: up to nine reference images, three reference videos, each video's soundtrack, and three standalone audio clips. Then it makes you point at them from the prompt text, by number: <Picture 1>, <Video 2>, <Audio 1>. Ordinals are one-based per type and follow the order you connected things in.

Get a number wrong and nothing throws. You just get a video built from the wrong face, or from the wrong audio clip, and you find out after the render. Add a fourth reference and every downstream number is a fresh decision. Re-order a wire and all of them shift.

This node makes that a picker instead of arithmetic, and it's the reason to install the pack at all.

How the @ syntax works

Connect your loaders, then type @ in the prompt box. You get a list of the connected media - @Image1, @Video1, @Audio1, in the order they're wired - and picking one drops in a chip. Under the hood that chip becomes the tag H3 wants: <Picture 1>, <Video 2>, <Audio 3>. Type # and you get an editable dialogue block instead, which is emitted as <d>...</d> - that's H3's dialogue syntax, and the model has native audio, so dialogue is a real part of the output rather than subtitle garnish.

The editor keeps the friendly form while you work; the tags get written out when you queue, which is why the node's preview panel stays empty until the first run and then shows you the exact final string. Read it once per workflow. If you mix a reference video that has a soundtrack with standalone audio clips, check the preview before trusting the numbering - soundtrack ordering is the fiddly corner of this syntax.

The inputs that matter

text is the required one: a multiline prompt field. That's your whole prompt, with @ and # written into it.

media is the socket you'll actually see on the node, and it's a wildcard (*), so it takes an image batch, a video frame batch or an audio dictionary. Behind it sit media_1 through media_18, each with a hidden companion string (media_type_1, …) that records what kind of thing is attached - image, video, video_audio or audio. That hidden string is the only thing separating an image batch from a video frame batch. The frontend sets it for you when you drag a link out of the socket and pick the loader from the little menu that appears (Load image / Load video / Load audio). The ceilings are nine images, three videos with soundtracks, three standalone audio clips - the same ceilings the core node enforces, since this is just transporting them.

One output: media_prompt, a MINIMAX_H3_MEDIA_PROMPT bundle. Nothing else in ComfyUI understands that type, so it goes straight into MiniMax H3 Media Prompt Output, which is where it turns back into wires.

Install

Search MiniMax H3 Media Prompt in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/YingsenP/ComfyUI-MiniMaxH3-MediaPrompt.git

Then restart ComfyUI. There is no pip step - the pack declares no dependencies and ships no requirements.txt, just Python and a frontend extension. For reference videos you'll want ComfyUI-VideoHelperSuite installed, since the actual video loading comes from its Load Video (Upload) node.

Where people get burned

Don't connect the optional VAE input on Load Video (Upload). That's the pack author's own warning and it's the one that bites hardest: H3 wants reference videos as IMAGE frame batches, and with the VAE connected you get latents instead. The Python node checks the tensor shape and fails with a message about IMAGE frame batches - which is at least a clear error rather than a silent wrong result.

Exceed the buckets and the node refuses with its own text about nine images, three videos with soundtracks and three standalone clips. That error usually means the hidden media type is wrong, not that you're over the limit.

One plumbing note worth knowing: this node opts out of ComfyUI's caching and re-runs on every queue, which is what keeps the preview honest. That's the standard IS_CHANGED → NaN trick, and its known side effect is that a graph with one always-dirty node can feel slower than it should.

Last thing, and it isn't a node problem: H3's community licence excludes the US, EU, UK and South Korea. If you're in one of those regions you aren't licensed to run the local weights at all - the hosted Hailuo API is the licensed path.

CategoryMiniMax H3/Media Prompt

Inputs (38)

NameTypeDefaultDescription
textSTRING—
mediaopt*—
media_1opt*—
media_type_1optSTRING—
media_2opt*—
media_type_2optSTRING—
media_3opt*—
media_type_3optSTRING—
media_4opt*—
media_type_4optSTRING—
media_5opt*—
media_type_5optSTRING—
media_6opt*—
media_type_6optSTRING—
media_7opt*—
media_type_7optSTRING—
media_8opt*—
media_type_8optSTRING—
media_9opt*—
media_type_9optSTRING—
media_10opt*—
media_type_10optSTRING—
media_11opt*—
media_type_11optSTRING—
media_12opt*—
media_type_12optSTRING—
media_13opt*—
media_type_13optSTRING—
media_14opt*—
media_type_14optSTRING—
media_15opt*—
media_type_15optSTRING—
media_16opt*—
media_type_16optSTRING—
media_17opt*—
media_type_17optSTRING—
media_18opt*—
media_type_18optSTRING—

Outputs (1)

NameTypeDescription
media_promptMINIMAX_H3_MEDIA_PROMPT—