MiniMax H3 Finite Segment 桥接器
The adapter that turns one prompt into a MiniMax H3 storyboard
- media_bundle
- prompt_finite
- segments_json
- finite_plan
- summary
MiniMax H3 gives you a handful of seconds; you want a scene. Between those sits a class of sampler nodes that stitch short clips into one long one, and each wants a plan handed to it: segments, durations, overlap frames. That plan is a dict with a specific shape, and no amount of prompt typing produces one.
UniversalFiniteBridge (on canvas: MiniMax H3 Finite Segment 桥接器) makes one. Feed it the optimized prompt and media bundle from the pack's Universal prompt optimizer, and it hands back a finite_plan a finite-segment sampler can chew on. It draws nothing and spends no VRAM.
What it actually does
Empty segments_json means single segment. The bridge takes prompt_finite, the images and audio out of media_bundle, your width and height, and emits a plan for exactly one clip of duration_sec seconds. Boring case, and the one people accidentally land in.
Filled segments_json means multi-segment. Either a JSON object with a segments list, or the author's mini line format:
# seconds | prompt | images=1,3
4 | wide shot, they circle each other | images=1,2
3.5 | the fight breaks the window
Duration comes first and must parse as a float, the prompt is optional (blank falls back to the global one), and images= takes 1-based slots. Each segment then gets its own prompt and its own subset of reference stills - the point, since a 20-second sequence where every shot sees every reference drifts badly.
Then the frame math. H3 only accepts durations on its grid, so the bridge snaps your request to the nearest valid count: 5 + 17·n frames at 24 fps. Ask for 5 seconds, get 124 frames (5.17s). That's why output never matches the widget.
Overlap is subtracted, not added. Segment n starts at the previous segment's end minus its overlap, so 24 frames on segment two turns that cut into a one-second crossfade. With bridge_overlaps empty every later segment defaults to 24, so ask for [0,0,0] if you want hard cuts. Total output is segment lengths minus overlaps, and summary reports both.
The inputs you'll touch
prompt_finite and media_bundle are the two wires from the optimizer, both optional - unconnected, you get a legal and useless empty-material plan.
duration_sec (default 5, max 150) has one trap the tooltip names outright: the universal node drives it; to set it by hand, disconnect segments_json. If segments_json holds exactly one segment, that duration silently overrides the widget. width/height default to 864×480, step 32.
audio_mode is a two-option combo. 参考音色 re-voices dialogue using the timbre of your uploaded audio; 强制使用音频1 pipes the first track in as-is and drops the rest.
The other four - bridge_overlaps, second_pass, second_pass_model, second_pass_high_steps - are hidden on purpose; a custom panel (web/minimax_finite_bridge.js) writes them. Overlap stepper, second-pass toggle, and a model dropdown fed by a /minimax-bridge/upscalers route that filters models/latent_upscale_models/ for names containing minimax_h3 and latent.
Outputs: finite_plan (MINIMAX_H3_FINITE_SEGMENT_PLAN) into a finite-segment sampler - this pack's own Universal MiniMax_H3 分段采样器, or Songssx's TimelineDirector for the multi-segment plus second-pass path the README credits. summary is a string with the per-segment frame breakdown; wire it to PreviewAny before burning ten GPU minutes.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/aihaipan/ComfyUI-Universal_Prompt_Optimizer.git
Restart. No requirements.txt; pyproject.toml lists one dependency, aiohttp, which ComfyUI already ships, and the pack declares requires_network = true because the optimizer can call a hosted LLM.
You do need a recent ComfyUI: every node here uses the newer backend authoring API (from comfy_api.latest import ComfyExtension, io) and the pack has no NODE_CLASS_MAPPINGS at all. On an old install it fails to import and you get an empty category. Version, not a bad clone.
The only model file the bridge itself touches is the optional second-pass upscaler, minimax_h3_latent_upscaler_3d_bf16.safetensors, in ComfyUI/models/latent_upscale_models/. The H3 weights, CLIP, VAE and audio VAE come from the model side of your workflow; this pack ships none of them.
Where people get burned
The duration widget looks dead. It's the single-segment override from segments_json. Check summary: it prints requested seconds next to the snapped frame count.
"素材: 0 张图" when you know you uploaded images. This node reads image_paths and audio_paths - the file paths - not the loaded tensors. A hand-built bundle, or one from an older optimizer version, can carry images only under the tensor keys, and they vanish here silently.
Old workflows load red. The bundled 03-unlimited-two-stage-小黄瓜多段.json references MiniMaxH3FiniteBridgeGH, an id the code no longer registers - the rename moved the types from GH_* to UNIVERSAL_* too. Place the current node by hand.
You may not need this node. The pack's own sampler takes media_bundle, prompt_finite and segments_json directly, with finite_plan optional. This bridge exists so the pack's prompt UI can drive someone else's sampler - TimelineDirector, most likely. Stay inside the pack and direct is one fewer dict to get wrong.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| duration_sec | FLOAT | 5.00.2–150 | 由万能节点主控;想手动设置请断开 segments_json 连线。 |
| width | INT | 86464–16384 | 生成宽度(像素) |
| height | INT | 48064–16384 | 生成高度(像素) |
| audio_mode | COMBO | 参考音色 | 参考音色 = 参考上传音频的音色重新生成对白;强制使用音频1 = 原声直入(仅取第 1 条) |
| media_bundleopt | UNIVERSAL_MEDIA_BUNDLE | 万能节点的 media_bundle 输出;未连接则视为空素材 | |
| prompt_finiteopt | UNIVERSAL_PROMPT_STR | 优化后的提示词(来自万能节点的 prompt_finite 输出) | |
| segments_jsonopt | UNIVERSAL_SEGMENTS_STR | 多段模式。留空 = 单段。由万能节点自动生成。 | |
| bridge_overlapsopt | STRING | 段间重叠帧数数组,由桥接器 UI 管理。格式如 '[0,24,24]'。 | |
| second_passopt | STRING | false | 二采开关,由桥接器 UI 管理。'true' / 'false'。 |
| second_pass_modelopt | STRING | 二采模型名,由桥接器 UI 管理。 | |
| second_pass_high_stepsopt | STRING | 2 | 二采高清步数,由桥接器 UI 管理。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| finite_plan | MINIMAX_H3_FINITE_SEGMENT_PLAN | — |
| summary | STRING | — |