JZL - 🤖 MiniMax-H3无限时长
Chained clips that don't restart every 5 seconds
- model
- clip
- vae
- audio_vae
- 已处理剧本
H3 gives you 4–15 seconds at a time. Anyone who's tried to make anything longer with a local video model knows the routine: take the last frame, feed it in as the first frame of the next clip, and pray. Do it the VACE way and you also do the arithmetic - overlap, frame-count requirement - and get it wrong and the ending misbehaves. This node is that chore done properly.
JZL - 🤖 MiniMax-H3无限时长 ("Infinite Duration") is the long-form member of the JZL MiniMax pack. It runs the whole pipeline in one node: split your story into N segments with an LLM, condition each on your reference assets, sample, decode, trim, write each segment to disk, optionally concat. It's an output node - it saves the video and hands you back a string.
How the chaining actually works
It is not a last-frame handoff. From segment 2 on, the node takes the previous segment's first-pass latent, slices its tail window - 22 frames by default, the official Motion Context baseline (5/22/39/56 are the options) - and pins that slice into the positive conditioning as a keyframe at frame 0, using the same minimax_keyframes structure the official MiniMaxH3AddGuide writes. Those rows never get denoised and are re-injected every step, so the previous motion is physically present at the head of the new clip instead of being guessed from one still.
Those pinned frames return at the front of the segment and are trimmed after decode. The audio tail is trimmed to match (round(window × 5/3) steps) - skip it and your sound sits about 0.9s ahead of the picture at every seam.
The neat part: you never set an alignment parameter. Segment length is always 17k+5 frames and the window always 17m+5, so length − window is a multiple of 17 and the slice always lands on a latent token boundary. A startup "settle" (12 frames default) kills the hold-then-pop jitter when the model imitates a guide frame before it moves, and window + settle is held to a multiple of 17 so saved duration equals requested duration: segment 2+ generates ~1.4s of extra runway, and the runway is what gets cut. Leave trimming on the default pixel-domain mode - the author's notes say the latent-domain option flickered.
The inputs you actually touch
- story_name - required. Blank, and the run aborts.
- run_mode - 拆解 (decompose into N segments, one new prompt each, so the plot advances), 扩写 (expand prose, text out), 穿透 (skip the LLM), 仅提示词输出 (text only, no video).
- duration - a string, not a number:
"5-5"is 5 seconds per segment. Total = sum of segments − window × (segments − 1). - video_count - 1 to 48.
1is an ordinary single generation with no seam logic;2+turns on the chain, and it doesn't stack VRAM. - story_style, aspect_ratio, megapixels (0.4 default) - the usual look and size knobs.
- internal_prompt / external_prompt - the in-node text box, or a wired upstream string, which wins when connected.
- Optional sockets: model, clip, vae, audio_vae. Here's the trap - audio_vae is only needed when a segment carries video or audio references, but if it's missing the segment is skipped with a log line, not an error. You get a script, no video, and no idea why.
- upscale_scale is a second-pass ref2va upscale used only for the decode, so it can't break your seams. scale_factor is the reference-image area multiplier. The seam knobs - window, settle, trim mode, audio link - aren't sockets at all; they live in manager_settings, the node's own settings JSON, one copy per node.
Output and install
The only output is a STRING, 已处理剧本 - the post-LLM script, for display or saving. Video lands in output/jzl/{story_name}/, one file per segment as it finishes, so a crash at segment 6 doesn't lose 1–5. Switch save mode to concat and it reads those files back and merges them, encoding audio once to avoid stacked AAC error at the joins.
Install is the usual: find ComfyUI-JZL-MiniMax-H3 in ComfyUI Manager, or clone and restart.
cd ComfyUI/custom_nodes
git clone https://github.com/wjluoxiao/ComfyUI-JZL-MiniMax-H3
You need a current ComfyUI: the pack is written against the V3 node API (from comfy_api.latest import io), so you want a modern torch/torchaudio and a build that already ships the official H3 nodes. For the LLM half, run the pack's installer once - it fetches a pinned llama.cpp (b10436) runtime for your platform and GPU, zero pip dependencies:
cd ComfyUI/custom_nodes/ComfyUI-JZL-MiniMax-H3
python install_runtime.py --dry-run # what it detects
python install_runtime.py # then install
requirements.txt holds one line, imageio-ffmpeg. Note what's absent: llama-cpp-python, unused since the LLM moved to a llama-server subprocess.
Where people get burned
Change video_count and nothing changes? That's seeds - with randomized LLM/sampler seeds the node fingerprints as random, so it re-runs on every queue. Hand-writing your own [SHOT_START] blocks? Their per-block duration is read as generation time, so write target + runway or each clip lands ~1.4s short.
And check the licence before you build a series on this: H3's open weights are geofenced out of the US, EU, UK and Korea.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| run_mode | COMBO | 🛠️ 故事拆解模式 | 与「短剧导演台Max」一致:故事拆解模式=按情节拆解为N段(每段一个独立新提示词,无限时长按此逐段推进剧情);故事扩写模式=只扩写正文(纯文本输出);穿透生成模式=跳过 LLM 直接用提示词生成;仅提示词输出=只输出拆解+增强后的分段剧本,不生成视频 |
| display_info | STRING | 分辨率:832x480丨每段帧数:192丨共计段数:6丨总帧数:1152丨总时长:48秒 | 只读显示:当前画幅/MP/时长/段数计算出的分辨率、每段帧数、段数、总帧数、总时长(对齐倍数固定 32) |
| aspect_ratio | COMBO | 16:9 (Widescreen) | 画幅比例(分辨率按 MP×1024² 公式自动计算,对齐倍数固定 32) |
| megapixels | FLOAT | 0.40.1–16 | 总像素数(MP),画幅×MP 决定分辨率 |
| duration | STRING | 5-5 | 每段视频时长(秒),等同「剧本与镜头处理器」的每段视频时长(秒)。无限时长下每段会往后损失「衔接窗口」帧长(默认 22 帧≈0.92 秒,被下一段复用),总时长 = Σ段长 − 窗口×(段数−1) |
| scale_factor | FLOAT | 1.01–5 | 参考图放大系数 |
| upscale_scale | FLOAT | 1.001–4 | 二采(Ref2va)放大倍数。开启二采不影响段间衔接:衔接恒用「一采 latent」,二采结果只用于解码落盘 |
| video_count | INT | 11–48 | 段数(1~48)。1 段=普通单段生成(不启用衔接);≥2 段=无限时长链路。逐段即时落盘,段数再多也不叠加内存 |
| story_style | COMBO | 热血战斗 | 故事风格(剧本处理器按此风格拆解与润色) |
| story_name | STRING | 机智罗 | 故事名称(用于保存命名 / 落盘目录 output/jzl/{故事名} / 生成视频管理) |
| external_prompt | STRING | 提示词接线输入(与 CLIP Text Encode 同类):连线后以上游文本为提示词(优先于「节点内提示词」大框) | |
| internal_prompt | STRING | 节点内编辑的提示词(提示词来源,随工作流保存) | |
| manager_settings | STRING | 本节点独立保存的完整配置 JSON(资产/增强/采样解码/无限时长衔接/保存),随工作流保存,节点间互不影响 | |
| modelopt | MODEL | — | |
| clipopt | CLIP | — | |
| vaeopt | VAE | — | |
| audio_vaeopt | VAE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 已处理剧本 | STRING | 全部 LLM 处理后的剧本/提示词文本(供下游展示/保存用;「生成视频查看器」直接读盘) |