Minimax_H3_AutoContext_parameter
The dashboard for MiniMax H3 long videos — this is where you actually type the prompt
- parameter
If you grabbed the AutoContext sampler and wondered where the prompt box is - it's here. This pack splits the work: H3Parameter is a pure configuration node, a dict-builder that bundles your prompt, resolution, frame counts and audio settings into a single parameter output. That dict is the sampler's required input. One parameter node, one sampler, nothing else to wire.
It also shows a live "expected segmentation" preview on the node itself. That's a front-end JavaScript calculation, not inference - it just shows roughly how your video will split into chunks before you burn GPU time. Genuinely handy when you're tuning, and worth knowing it won't tell you anything about quality.
The inputs that matter
long_prompt- the prompt. This is the one you'll spend all your time on.total_frames/chunk_frames/context_frames- the heart of the chunking. Defaults: 362 total (~15s at 24fps), 90 per chunk, 22 context. MiniMax H3's VAE works on a 17-frame temporal grid, so valid counts are 5, 22, 39, 56, 73, 90… The node snaps your numbers onto that grid, so don't fight it. Context frames are the previous segment's tail that carries into the next one - bigger means a smoother relay, and 22 is a good starting point.fps- only used for audio sync and converting the seconds in your prompt to frames. 24 by default.width×height- first-pass resolution (960×544 default). On a second pass the sampler ignores these and follows the input latent instead.lock_audio- on by default. During a second pass, only video gets re-sampled; the audio from pass one is reused.audio_driveflips it around: pair it with adrive_audioconnection on the sampler and the video follows that specific soundtrack instead of generating its own.
The timeline stuff
prompt_mode has four personalities. auto (default) reads time markers like 0-5s in your prompt and slices accordingly, while untagged lines (style, soundscape, negative-ish notes) get spliced into every window. timeline forces the same, stricter. global dumps the entire prompt into every window - honestly the right choice for a one-shot homogeneous scene like a looped background or a talking head, and it sidesteps the trickiest limitations below. sequential lays lines out in order, with 全局:/[global] lines shared across all windows. If you're new to this, use global until you actually need per-scene direction.
clip_mode switches between Clip_Frame (even time slicing) and Clip_Tag, which splits by your own labels like 段1 / 段2 (the tag must end in a number, so A01 and [片段001] work too). Each tag becomes a full chunk; its duration comes from the tag's time range, then the segment's internal time markers, then a total_frames fallback. That's your shot-list mode.
Two limitations to keep in mind - the README calls them the node's constraints, and they only bite in segmented modes. First, temporal exclusivity: each chunk's prompt must describe only what's new relative to the previous chunk's end, because that end is the implicit starting state. Rewriting the previous chunk's action in the next one causes conflict and jittery motion. Second, references aren't remembered: if chunk 2 uses image1, chunk 2's prompt has to declare image1 again, or it runs without it.
Install and outputs
Same install as the whole pack: ComfyUI Manager, search ComfyUI_MinimaxH3_AutoContext, or git clone https://github.com/supElement/ComfyUI_MinimaxH3_AutoContext.git into custom_nodes and restart. No extra dependencies for this node itself - the pack's requirements only add scenedetect and opencv-python-headless for the seam-correction sibling.
The output is one parameter dict, and it's the sampler's required parameter input. That's the entire job: this node doesn't generate anything, it just makes the main node much less cluttered. Also note the pack downloads no model - H3 itself comes from ComfyUI's native MiniMax H3 support, and if you're in the US, EU, UK or Korea, the H3 Community License doesn't grant you rights to run the local weights there. Worth checking before you invest an afternoon.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| long_prompt | STRING | 提示词 (传给主节点推理,同时用于「预计分段」预览) | |
| clip_mode | COMBO | Clip_Tag | 提示词映射到视频段的方式:Clip_Tag按自定义标签分段;timeline按时间标记分段;sequential按句读顺序平铺;global整段用于所有段。Clip_Tag和timeline模式下,total_frames和chunk_frames无效,段长由提示词决定。 |
| clip_tag | STRING | 段1 | Clip_Tag 模式的分割标签模板 (仅 Clip_Tag 模式生效)。必须以数字序号结尾,如 '段1' (前缀'段'+1位数字)、'A01' (前缀'A'+2位数字)、'[片段001]' (前缀'[片段'+3位数字+后缀']')。提示词中标签独占一行才作为分割点,标签后推荐换行,不换行时跳过分隔符 (::,,。;; —–- 空格) 取段内容。推理时标签本身会被去除。提示词内时间写法保持秒不变 |
| prompt_format | COMBO | official | 提示词输出格式。official: [Shot N] At MM:SS.mmm + <Picture N>/<Video N>/<Audio N> 标签 + 官方字段名 (MiniMax H3 官方训练格式,推荐); legacy: 【0-3秒】+ 引用保持原写法(1基) + 块标题 (旧格式); raw: 完全不处理引用,去标签后原样输出,不做任何时间标记转换 (Clip_Tag 模式专用,保留段内相对时间原样) |
| crop_mode | COMBO | stretch | 参考图/首尾帧/参考视频的缩放裁剪模式。center: 等比例缩放并中心裁剪到目标尺寸; stretch: 直接拉伸到目标尺寸; none: 保持原始分辨率,仅做 32 对齐 (高级用户选项,ref2va 场景使用,尺寸问题用户自行处理) |
| ref_sync_mode | COMBO | segmented | 参考视频/音频是否按生成段的时间范围切片。global: 每段使用完整参考视频/音频 (默认); segmented: 每段只取参考视频/音频中对应时间片段,用于替换人物并保持口型同步等场景 |
| width | INT | 96064–4096 | — |
| height | INT | 54464–4096 | — |
| total_frames | INT | 3625–2880 | 生成总帧数,需满足 17n+5 (5,22,39,56,73,90,...)。提示词内时间仍按秒解析。在 Clip_Tag 和 timeline 模式下,该值被忽略,由提示词内容自动计算。 |
| fps | INT | 248–60 | 帧率,仅用于音频同步和提示词内秒数换算 |
| chunk_frames | INT | 905–2880 | 每段生成帧数,需满足 17n+5 (5,22,39,...)。设为 ≥ total_frames 时不拆分,整个视频作为一段生成。在 Clip_Tag 和 timeline 模式下,该值被忽略,由提示词内容自动计算。 |
| context_frames | INT | 225–124 | 段间续接用的上一段尾部帧数。值越大连续性越强。建议 22 以上防硬切。有效网格点: 5,22,39,56,73,90,107,124 |
| lock_audio | BOOLEAN | true | 二采时锁定音频区 (noise_mask audio=0):只重新采样视频、保持一采音频不变。仅在连接 latent_input 时生效 |
| audio_drive | BOOLEAN | false | 音频驱动开关。勾选后把 drive_audio 编码后锁进 latent (noise_mask=0,不重新生成音频),视频照它生成。注意:本节点不输出音频,请把同一条源音频直接接到视频合成节点 (这样也避免了 VAE 有损往返)。不勾选 (默认): 音频照常生成 |
| video_guide | COMBO | none | 利用 ref_video 端口输入的视频进行多帧强锚定。 none: 常规生成(默认),即使 ref_video 有输入也只作普通参考; pre_guide: 用 ref_video_0 的尾部锚定开头(视频续写); post_guide: 用 ref_video_0 的头部锚定结尾(视频前推); pre_post_guide: 用 ref_video_0 尾部锚定开头 + ref_video_1 头部锚定结尾(中间衔接)。 锚定帧数由 context_frames 决定。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| parameter | DICT | — |