ComfyUI Node

MiniMax H3 Plan Encoder

The node that breaks the prompt-rewriter deadlock

By Songssx·Created about a month ago·Updated 2 days ago· 465
MiniMax H3 Plan Encoder
  • clip
  • vae
  • audio_vae
  • plan
  • positive
  • LATENT
  • Merged Video Audio
  • Merged Standalone Audio
prompt
ref_image_sizematch

"MiniMax H3 Plan Encoder" is the boring name for a node that exists to solve one specific structural problem: how do you let an LLM look at your reference media before H3 gets conditioned on it, without creating a cycle in the graph?

If you fed the planner straight into the sampler, and the prompt rewriter needed the planner's media while the sampler needed the rewriter's output, you'd have a loop ComfyUI won't execute. So the pack split the planner in two. The plan goes out one side, the Omni bundle goes out another, and this node is where they come back together once the rewrite is done.

How it works

MiniMaxH3TimelineEncoder takes a material plan plus the final prompt and does the actual work: it encodes references, builds native H3 Guides, generates conditioning, and constructs the AV latent - everything the old all-in-one Timeline Director used to do in one shot. The difference is that the prompt arrives as a plain string on a wire, so you can put anything you like between the planner and the encoder. The README's own diagram of the fix:

Material Planner ──Omni bundle──> Omni Prompt Bridge ──rewritten_prompt──> Plan Encoder
       └────────────────────H3 plan─────────────────────────────────────> Plan Encoder

Note that the plan goes to both the bridge and the encoder, and the prompt goes to exactly one place. That's the whole trick.

It's also the node that makes the native Loop path work. Inside a loop body the chain is Select Loop Segment → Plan Encoder → Prepare Loop Segment, and the encoder is what turns the per-segment material plan into per-segment conditioning. It used to be hidden from the add-node menu for legacy reasons; the 0.8.0 changelog made it visible again precisely so loop workflows can place it explicitly.

Inputs and outputs that matter

Required: clip, vae, audio_vae, plan (a MINIMAX_H3_TIMELINE_PLAN, from the Material Planner), prompt, and ref_image_size (match or max, default match).

The prompt input is dynamic_prompts-flagged, which means the "convert to input" widget-to-socket move works normally - useful when you're driving it from a per-segment prompt string.

Outputs, and the tooltips here are the author's own so take them literally:

  • positive - conditioning, into your guider.
  • LATENT - the AV latent for the sampler. Nested video + audio; keep the same H3 audio VAE on the sampling end.
  • Merged Video Audio - "Mix trimmed source audio by timeline position, preserving silence in gaps."
  • Merged Standalone Audio - "Concatenate standalone reference audio in material-bin order."

Those last two are genuinely different streams, not a convenience duplicate.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Songssx/ComfyUI-MiniMaxH3-TimelineDirector.git

Restart, search MiniMax H3 in the node menu. The pack declares no extra pip dependencies (dependencies = [] in pyproject.toml). You do need a recent ComfyUI with native MiniMax H3 nodes plus the H3 Ref2VA model, CLIP, video VAE and audio VAE. Python 3.10+.

Common issues

"The finite segment plan is incomplete; update the segment plan and run it again." You're feeding a stale plan. The plan is validated on every run - change the timeline, re-run the planner, and the encoder gets a plan whose segment count matches its prompt list.

Conditioning looks right but the latent errors on audio. Check that audio_vae here is the same H3 audio VAE you feed downstream. The latent is a nested AV tensor; mixing VAEs produces shape complaints rather than anything descriptive.

You wired the plan from the planner into the bridge and expected the prompt back. The bridge returns only rewritten_prompt - its own outputs are a single string. If the prompt never arrives, the bridge usually failed on a missing backend; see that node's page.

Only visible now? If you remember this node being absent, that's the changelog: it was deliberately hidden pre-0.8.0 and un-hidden when the native Loop workflow shipped.

Categorymodel/conditioning/minimax

Inputs (6)

NameTypeDefaultDescription
clipCLIP
vaeVAE
audio_vaeVAE
planMINIMAX_H3_TIMELINE_PLAN
promptSTRING
ref_image_sizeCOMBOmatch2 options: match, max

Outputs (4)

NameTypeDescription
positiveCONDITIONING
LATENTLATENT
Merged Video AudioAUDIOMix trimmed source audio by timeline position, preserving silence in gaps.
Merged Standalone AudioAUDIOConcatenate standalone reference audio in material-bin order.