MiniMax Ref Guide
The loop body that turns one H3 timeline into N finished clips
- guide_data
- model
- clip
- video_vae
- audio_vae
- positive
- latent
- trim_frames
- frame_rate
If MiniMaxRefDirector is the script, MiniMaxRefGuide is the production crew. It sits inside a loop - the README's reference workflow uses Easy-Use's forLoop - and on each pass it pulls one segment out of the director's guide_data, builds the MiniMax H3 reference-to-video conditioning for that shot, and hands you a positive conditioning and a latent. You do the actual sampling yourself: KSampler → VAEDecode → VHS VideoCombine, with your own model, clip, and VAEs connected. The Guide is the brain; you're the hands.
Three inputs matter on first setup. guide_data is required, straight from the Director node. clip and video_vae are effectively required too - the code raises if either is missing, since encoding the positive and the latent is the node's whole job. audio_vae only becomes mandatory once a segment actually has reference audio. The rest are optional, and one of them you should deliberately not touch: guide_index. The tooltip makes the case bluntly - leave it disconnected and the node auto-advances through segments in order, because Easy-Use's loop expansion re-executes loop-body nodes and produces jumbled indices like 0,0,1. When in doubt, disconnect it.
Outputs are positive (CONDITIONING), latent (LATENT), plus trim_frames and frame_rate that you'd feed to your video-combine node so each clip comes out the right length. Model and seed are passed through and only recorded/logged, so reproducibility lives in your KSampler's seed, not here.
The clever part is how it ends a run. The Director wires segment_count + 1 as the loop total, so there's one extra iteration after the last real segment. On that pass the Guide doesn't fail - it returns a blocking output (ExecutionBlocker) that stops the sampler chain without an exception, after using the round to notify the Director's front-end that the previous clip is done. That's how generated videos automatically back-fill into the timeline's material track.
Which brings up motion context, the feature that makes this more than a for-loop wrapper. Pass the previous segment's saved video path into prev_tail and, on text segments that have motion context enabled (guideStrength > 0), the node decodes the tail frames of the prior clip and feeds them to H3's motion-context path so the next shot starts from where the last one ended - the cross-segment continuity trick that keeps a character and a scene feeling like one take. That integration expects ComfyUI-H3-Motion-Context to be installed (the README points at niuro3's repo); without it, that part of the chain will throw. context_length (default 22) controls how many tail frames are used as reference.
Installation is the shared pack story: ComfyUI Manager or git clone https://github.com/eaglering/MiniMaxRefDirector-ComfyUI into custom_nodes, pip install -r requirements.txt (only PyAV is extra), restart. Reminder that this is a young pack with no community trail yet - if a segment errors, check that every segment actually has a prompt and a valid durationFrames (a zero-length segment raises), and that your clip/VAE wiring is complete, before hunting bugs in the pack.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| guide_data | GUIDE_DATA | MiniMaxRefDirector 输出的 guide_data。 | |
| modelopt | MODEL | 采样模型(透传保留,供外部采样链路使用;sigma shift 请自行处理)。 | |
| clipopt | CLIP | 条件编码必需(positive)。 | |
| video_vaeopt | VAE | latent 与参考视频编码必需。 | |
| audio_vaeopt | VAE | 有参考音频时必需。 | |
| prev_tailopt | STRING | 上一段生成完成的视频路径;文本段开启 motionContext 时作为 motion context 实现跨段衔接;收到时通知前端该段完成。 | |
| context_lengthopt | INT | 22 | 尾帧参考帧数。 |
| seedopt | INT | 0 | 随机种子,透传给外部 KSampler 以复现每段生成;本节点仅记录并在日志中展示。 |
| guide_indexopt | INT | 0-based 段索引,接 easy forLoopStart 的 index。建议断开此输入,节点会自动按 guide_data 段顺序取段,避免 Easy-Use 循环展开导致的 index 错乱(如 0,0,1)。 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| latent | LATENT | — |
| trim_frames | INT | — |
| frame_rate | FLOAT | — |