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

MiniMax H3 Media Prompt Output

One Bundle In, Nineteen Wires Out

By YingsenP·Created 2 months ago·Updated about a month ago· 1
MiniMax H3 Media Prompt Output
  • media_prompt
  • ref_image_0
  • ref_image_1
  • ref_image_2
  • ref_image_3
  • ref_image_4
  • ref_image_5
  • ref_image_6
  • ref_image_7
  • ref_image_8
  • ref_video_0
  • ref_video_1
  • ref_video_2
  • ref_video_audio_0
  • ref_video_audio_1
  • ref_video_audio_2
  • ref_audio_0
  • ref_audio_1
  • ref_audio_2
  • text

This is the boring half of the pack, and nothing works without it. The Media Prompt node collects your references and your prompt into one opaque bundle; this node takes that bundle apart and hands you back separate wires.

Why it has to exist

ComfyUI has no looping in the graph. You can't tell a node "emit however many images I fed you." So any node that gathers a variable number of references has to pack them into something the type system can carry in one link - here a MINIMAX_H3_MEDIA_PROMPT bundle - and some second node has to unpack it into a fixed grid of sockets wide enough for the maximum. That's the split: the prompt node is the frontend-facing collector, this one is the adapter that meets the core conditioning node.

The destination is MiniMaxH3ReferenceToVideo in core ComfyUI, which takes its references on individually-named optional inputs (ref_image_0…, ref_video_0…, ref_video_audio_0…, ref_audio_0…) plus a plain prompt string. This node's outputs are named to line up with exactly those inputs, so wiring it is mostly a straight vertical drop.

What comes out of it

One required input, media_prompt, and nineteen outputs:

  • ref_image_0 … ref_image_8 - nine IMAGE slots
  • ref_video_0 … ref_video_2 - three IMAGE slots, frame batches at 24 fps
  • ref_video_audio_0 … ref_video_audio_2 - three AUDIO slots, the soundtracks
  • ref_audio_0 … ref_audio_2 - three AUDIO slots, standalone clips
  • text - a plain STRING holding the final converted prompt

That last one is easy to miss and it's the useful bit. The text output is the prompt with all your @ chips already turned into <Picture 1> / <Video 2> / <Audio 1> tags and your # blocks turned into <d>...</d>. Wire it into the core node's prompt input and you never touch the syntax by hand. The node also shows that same string in its own preview area after a run, which is the fastest way to check your numbering before a five-minute render.

The off-by-one you will hit

The output names are zero-based; the prompt tags are one-based. So <Picture 1> is the first image you connected, and it comes out of ref_image_0. <Video 2> is the second video, out of ref_video_1. Same idea for audio. Once you've internalised that the tag number and the socket number differ by one, the whole pack is obvious - before that, it's mildly maddening.

Two more behaviours worth knowing. Empty slots come back as None, not as zeroed tensors, so only wire the slots you actually filled - feeding a null into a required input is an error, and the core node's autogrow inputs will sprout a socket as soon as you connect one. And the soundtrack slots are index-paired: ref_video_audio_0 belongs to ref_video_0. If you don't supply one, the prompt node already paired each video with its own audio, so you generally leave these alone unless you're deliberately swapping a soundtrack.

Install

Same pack, same one-liner - this node ships with it, so there's nothing extra to install:

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

Restart ComfyUI, or search MiniMax H3 Media Prompt in Manager. No dependencies to pip install. If you're using reference videos you also want ComfyUI-VideoHelperSuite, which supplies the Load Video (Upload) node the media prompt node expects.

Troubleshooting

The one error you'll definitely see is Connect the MiniMax H3 Media Prompt output. That's the node's type check refusing anything that isn't a bundle from the media prompt node - a stray string or a rerouted wire is the usual cause, and re-routing a custom bundle type through a Reroute node is the standard way to break it.

If a slot you filled comes back empty, the hidden media type on the prompt node is wrong rather than the unpack being broken; the media prompt node is what decides image vs video vs audio, and it decides it from a string the frontend maintains. And expect a tall node: nineteen outputs is nineteen rows, most of them unconnected. That's the cost of a fixed-width adapter in a graph engine with no loops, and it's why this pair is worth the brief awkwardness over hand-writing tag numbers into a prompt box.

CategoryMiniMax H3/Media Prompt

Inputs (1)

NameTypeDefaultDescription
media_promptMINIMAX_H3_MEDIA_PROMPT—

Outputs (19)

NameTypeDescription
ref_image_0IMAGE—
ref_image_1IMAGE—
ref_image_2IMAGE—
ref_image_3IMAGE—
ref_image_4IMAGE—
ref_image_5IMAGE—
ref_image_6IMAGE—
ref_image_7IMAGE—
ref_image_8IMAGE—
ref_video_0IMAGE—
ref_video_1IMAGE—
ref_video_2IMAGE—
ref_video_audio_0AUDIO—
ref_video_audio_1AUDIO—
ref_video_audio_2AUDIO—
ref_audio_0AUDIO—
ref_audio_1AUDIO—
ref_audio_2AUDIO—
textSTRING—