Nodes/Universal Prompt Optimizer/MiniMax H3 R2V 桥接器
ComfyUI Node

MiniMax H3 R2V 桥接器

The Adapter Node That Lets the Prompt Optimizer Drive MiniMax H3's Director

By aihaipan·Created 26 days ago·Updated 2 days ago· 2
MiniMax H3 R2V 桥接器
  • media_bundle
  • r2v_group
◄prompt►
◄duration_sec5.0►

What it is

A tiny adapter, and its whole job is a type conversion. The universal optimizer hands you a media_bundle and a prompt string. AIMixer's MiniMax H3 Director doesn't want either of those - its r2v_groups input wants a group dict in its own internal shape. This node builds exactly that dict, so you can use the optimizer's upload-and-optimize UI instead of the Director's own media handling.

It matters because R2V (reference-to-video) is where H3 earns its keep: you hand it reference images and audio, plus a prompt, and it generates the clip from them - H3's motion transfer was the thing people singled out at launch, and it's the reason those nine image slots in the optimizer aren't decorative. Without a bridge, you'd be re-typing the optimized prompt into the Director by hand and uploading the same reference images twice.

How it works

The node does one short thing: it reads media_bundle (a dict of images, audios, videos and their paths), and returns a group dict with family and kind set to r2v, your prompt, your duration_sec, null first/last frame fields, and the reference images and audios mapped in. The source comment says it's structurally identical to the Director's own external_groups.pack_r2v_group, and the Director's normalize_groups_list wraps a lone dict into a list, which is why one bridge node feeding r2v_groups works rather than needing an array. No model loading, no files written, no network - it's pure plumbing.

The bundle's index convention comes from the optimizer: images are 0-based across nine slots, audio 0-based across three, matching the Director's group convention. Wire media_bundle and prompt from the optimizer into the bridge, then r2v_group into the Director's r2v_groups, and set the Director's task type to r2v. That last step is not optional and it's the one people forget - a group showing up in i2v mode will not do what you typed the prompt for.

Inputs and outputs

Only two inputs are required. prompt is the optimized text (the bridge's field is a plain multiline STRING, so the optimizer's prompt output connects directly here - unlike the Finite Segment bridge, which needs prompt_finite). duration_sec is the length of this group, 0.1 to 30 seconds, default 5, and it's the group's own duration, not the whole timeline: the Director assembles the total from its groups.

media_bundle is optional, and leaving it unwired is legal - you just get an empty group, which is a prompt-only r2v group. On the output side there's exactly one: r2v_group, typed MMX_DIR_GROUP, and it belongs on the Director's r2v_groups (or i2v_groups) input.

Install

Same pack, same install:

cd ComfyUI/custom_nodes
git clone https://github.com/aihaipan/ComfyUI-Universal_Prompt_Optimizer.git

Restart, and search ComfyUI Manager for ComfyUI Universal Prompt Optimizer if you'd rather not touch a terminal. The only Python dependency in pyproject.toml is aiohttp, which ComfyUI already has; there's nothing to download for this node specifically.

Where people get burned

Install the Director first. MMX_DIR_GROUP is a custom type that only exists if AIMixer's ComfyUI_MiniMaxH3_Director is installed. Without it, the bridge's output has nowhere to go and you can't build the connection at all. Same story in reverse: update the bridge pack and the Director independently and you may find the group shape and the consumer have drifted.

Videos in the bundle are empty. The optimizer packs images and audio into media_bundle but never decodes the ref_video_* slots, so ref_videos arrives empty no matter how many clips you uploaded in the editor. Reference video can influence the written prompt, but it will not reach the Director through this wire.

Empty group ≠ error. If media_bundle is unwired or all uploads failed to load (an audio container pyav refuses, say), the bridge cheerfully returns a group with no references. You get a clip, just not the one you referenced, and the only clue is a line in the console.

Watch the duration ceiling. duration_sec caps at 30, and H3 natively generates clips in the 4–15 second range - pushing 30 in a single r2v group is asking the sampler to do something the model wasn't trained for. If you want long video, the Finite Segment bridge plus TimelineDirector is the route, not three r2v groups stacked.

CategoryUniversal Prompt/R2V Bridge

Inputs (3)

NameTypeDefaultDescription
promptSTRING优化后的提示词(来自通用优化节点的 prompt 输出)
duration_secFLOAT5.00.1–30该 r2v 组的时长(秒)
media_bundleoptGH_MEDIA_BUNDLE通用优化节点的 media_bundle 输出;未连接则视为空组

Outputs (1)

NameTypeDescription
r2v_groupMMX_DIR_GROUP—