Nodes/ComfyUI-MiniMaxH3-Contex-Loop/MiniMax H3 Plan Studio (Experimental)
ComfyUI Node

MiniMax H3 Plan Studio (Experimental)

Write your whole MiniMax H3 movie before H3 ever loads a weight

By ethanfel·Created 17 days ago·Updated about 19 hours ago· 315
MiniMax H3 Plan Studio (Experimental)
  • plan
  • source_timeline
  • source_audio
  • tagged_references
  • reference_schedule
  • chain_policy
  • plan
  • preflight
  • ready
  • status
  • report_json
  • plan_summary
  • clip_count
  • width
  • height
  • video_blend_frames
start_clip1
scene_range
verify_resume_historytrue
plan_json{ "shots": [ { "id": "intro", "prompt": "Describe the opening shot." }, { "id": "continuation", "prompt": "Continue the same take." } ] }
run_nameh3_chain
generation_fingerprint
width960
height544
context_length22
encode_modevideo
anchor_modehead
cropdisabled
audio_modegenerated_audio
audio_context_length22
default_duration_seconds15.00
default_steps20
base_seed0
segment_crf18
video_blend_frames0
continuation_modeguide

The Plan Studio is where a Contex Loop production stops being a graph and starts being a movie. Everything else in this pack - the Preflight, the sampling body, Review Gate, the assembly - is built around the Plan object this node produces. If you're here, you already know the pain: MiniMax H3 tops out around 15 seconds a clip, and stitching six of those into one coherent scene with continuity is where most multi-shot H3 projects quietly die. This node is the "sit down and write the scenes" step.

It's marked experimental, and it shows in the best way: instead of one more wall of widgets, you get a timeline-oriented authoring studio with scene navigation, per-scene prompt editing, saved-segment status, a source-audio waveform, and synchronized preview playback. Think of it as the script supervisor for a node graph.

How it works

The Studio runs in two modes. Connect an existing H3 Chain Plan into the plan socket and it edits and mirrors that Plan live - change a scene in the Studio, the Plan node reflects it. Leave plan unconnected and the Studio builds and validates its own complete Plan from the Plan settings tab, then hands you that Plan on the plan output to feed into Loop Start. Either way the thing you get out is a validated H3_CHAIN_PLAN, and you get a free preflight report alongside it.

Under the hood the Plan is just structured JSON, and the Studio has a plan_json field with a Raw JSON mode for import, export, or edits the visual editor can't reach. Scene prompts support {wide shot|close-up} alternatives - Plan resolves each group from that scene's Prompt alternatives control, which can derive a stable seed, keep an exact fixed seed, or randomize on every queue. The exact resolved choice gets saved with the checkpoint, which matters for resume.

The fields a beginner actually touches

  • run_name - the identity of one production. It maps to a folder under ComfyUI/output/h3_chains/. Keep it unchanged to resume or regenerate; new name, new production. Reusing a name on purpose re-exposes that run's checkpoints to Review Gate.
  • width / height - generation canvas for every scene. Connect the Plan's width/height outputs to the stock Ref2VA/I2V node so its latent always matches the Plan.
  • base_seed - the root seed that derives a stable, different seed per scene. Review Gate's reroll writes an explicit override per scene rather than touching this, so the rest of your production stays reproducible.
  • chain_policy - the one-wire hook for MiniMax H3 Chain Policy, which sets transitions and audio in a single connection. Use it; the legacy continuation_mode/context_length/audio_mode fallbacks are hidden in the normal 0.5 interface for a reason.
  • segment_crf - H.264 quality of each saved scene MP4. 18 is visually great; lower is bigger files.

There are also start_clip, scene_range, and verify_resume_history for resuming an interrupted production, plus generation_fingerprint - a compatibility tag you bump whenever the model, VAE, LoRAs, CFG, sampler, or scheduler changes so resume doesn't silently mix runs.

Outputs: plan, preflight (a structured report), ready (boolean), status, report_json, plan_summary, clip_count, width, height, and video_blend_frames.

Install

This is one node from the ComfyUI-MiniMaxH3-Contex-Loop pack. Easiest is ComfyUI Manager → search "ComfyUI-MiniMaxH3-Contex-Loop" → Install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI-MiniMaxH3-Contex-Loop.git

Restart ComfyUI. There's no requirements.txt - the pack runs on ComfyUI's own built-ins. What it does need is a current ComfyUI build with the native Add Guide for MiniMax H3 node from ComfyUI PR #15439, and ffmpeg on your PATH is preferred (PyAV is the fallback). Models are not bundled: you supply the H3 weights yourself, which is where the elephant sits - the MiniMax H3 Community License excludes the US, EU, UK and South Korea, so if you're in those regions the local weights aren't licensed for you at all.

Common gotchas

The Studio validates the Plan as you go, so most mistakes (a scene whose context length doesn't line up with the AV clock, a reference timestamp off the canvas) show up in the preflight report before you spend GPU on them. Two things trip people regardless: forgetting to update generation_fingerprint when you swap models or LoRAs mid-production (resume will reject the run), and editing an earlier scene's prompt after later scenes are already saved - that invalidates dependent resume. The good news is both failures are loud, not silent. Start from a maintained example workflow and you'll rarely hit either.

Categoryconditioning/minimax/contex_loop

Inputs (26)

NameTypeDefaultDescription
planoptH3_CHAIN_PLANOptional H3 Chain Plan. When connected, Plan Studio edits and mirrors that Plan. When omitted, the Studio builds and outputs its own complete validated Plan from the Plan settings tab.
source_timelineoptH3_SOURCE_TIMELINEOptional source media for the shared model-free preflight.
source_audiooptAUDIOLegacy source route; do not connect with Source Timeline.
start_clipoptINT11–128Resume scene to preflight.
scene_rangeoptSTRINGOptional contiguous scene selection to preflight.
verify_resume_historyoptBOOLEANtrueWhen resuming after scene 1, compare every saved predecessor dependency with the active Plan. Disable only for an intentional advanced recovery from known artifacts.
tagged_referencesoptH3_TAGGED_REFERENCESOptional active prompt-driven reference registry.
reference_scheduleoptH3_REFERENCE_SCHEDULEOptional legacy scheduled reference registry.
plan_jsonoptSTRING{ "shots": [ { "id": "intro", "prompt": "Describe the opening shot." }, { "id": "continuation", "prompt": "Continue the same take." } ] }The editable production plan behind the large Scene Plan interface: shared prompt, ordered scene prompts, optional lengths, sampler steps, per-scene context, continuation, and seed overrides. Use the visual editor for normal work and Raw JSON only for import, export, or advanced editing. Reference media is connected elsewhere; this JSON only mentions native @tags, Tagged Picture semantic anchors such as #hero[2.50s], or native <Picture/Video/Audio N> labels. Scene prompts may use {first option|second option}; Plan resolves each group from that scene's Prompt alternatives control.
run_nameoptSTRINGh3_chainIdentity of one render history and its folder under ComfyUI output/h3_chains. Keep it unchanged to resume or regenerate scenes from that same production. Use a new name for a separate render; reusing a name intentionally exposes that run's existing checkpoints to Review Gate and resume.
generation_fingerprintoptSTRINGCheckpoint compatibility tag for generation inputs not stored in plan_json. Connect Scheduled Ref2VA's schedule_fingerprint when using scheduled references. Reference-node outputs retain append lineage, so a newly added ref that is inactive in a completed scene does not invalidate that scene. Otherwise enter/change a stable tag whenever the model, VAE, LoRA, global references, CFG, sampler, or scheduler changes. Resume rejects a mismatched fingerprint instead of mixing runs.
widthoptINT96032–4096Generation width for every scene. Connect the Plan width output to the stock Ref2VA/I2V node so its latent always matches the plan.
heightoptINT54432–4096Generation height for every scene. Connect the Plan height output to the stock Ref2VA/I2V node so its latent always matches the plan.
context_lengthoptCOMBO22Legacy 0.4 fallback, hidden in the normal 0.5 interface. Connect Chain Policy for new workflows or the Legacy 0.4 Policy Adapter when rebuilding an old control surface. Default previous-scene video frames used to continue motion. Use 22 for guide mode and 39 for masked_av, tapered_av, feathered_av, or audio_feathered_av/Drift AV so the AV clocks meet exactly. A scene's Advanced selector can override this; blank inherits it and 0 starts a visually new scene. Audio context is controlled separately. With head anchors, those frames are regenerated at the start and Loop Trim removes them, so later scenes deliver raw scene frames minus context_length. Larger values strengthen motion continuity but produce fewer new frames per scene. This does not control reference-audio duration.
encode_modeoptCOMBOvideoHow the carried visual overlap is encoded. Use video (recommended) to preserve the previous frames as one motion-bearing latent clip. frames creates separate still-image anchors, costs more conditioning space, and is mainly for diagnosing or experimenting with anchor behavior.
anchor_modeoptCOMBOheadWhere previous frames sit on the next scene's timeline. head is the tested default: it repeats the overlap at the beginning, and Loop Trim must remove exactly trim_frames. before places context at negative time and returns no repeated head; use it only for workflows deliberately built around that experimental timing.
cropoptCOMBOdisabledHow saved context frames are fitted when their shape differs from the Plan canvas. disabled resizes directly to width x height and may change aspect ratio. center preserves aspect ratio, then center-crops overflow. It does not crop Ref2VA picture/video reference inputs.
audio_modeoptCOMBOgenerated_audioLegacy 0.4 fallback, hidden in the normal 0.5 interface and used only when no H3 Audio Policy is connected. It controls timeline continuity and final audio; it does NOT enable or disable @voice/<Audio N> references. For a finished prerecorded voice, dialogue, or song that must remain exact, choose source_track: wire the full track to Loop Start and Assemble, and feed Current Shot's exact slice to Ref2VA/Scheduled Audio. For a short @voice identity/timbre reference while H3 generates new speech and sound, choose generated_audio: no full source track is required, connect the audio VAE to Loop Context, and save trimmed generated audio. source_plus_timeline provides both an exact source slice and previous generated-audio context; it is experimental and usually not the first choice.
audio_context_lengthoptINT220–240Legacy 0.4 fallback amount of previous generated sound carried into the next scene, measured in 24-fps video frames. Normal Chain Policy derives 0/22/39 from Cut, Guide, or AV automatically. This field is active only when the Audio Policy has Generated continuity=on. Legacy generated_audio and source_plus_timeline enable that axis; source_track disables it. AV mask modes use zero versus positive as an audio-carry switch: positive preserves audio for the exact video-prefix duration required by the shared AV clock, while zero leaves audio fully denoisable. A scene's Advanced Audio context can override this default; there, explicit 0 means no audio carry.
default_duration_secondsoptFLOAT15.000.1–149.6666666666667Fallback duration only when the scene and JSON defaults both omit a duration/length. H3 cannot generate every frame count, so seconds round UP to the next valid 17k+5 raw length. In head mode, continuation scenes then lose their effective context repeated frames from their delivered duration.
default_stepsoptINT201–10000Fallback sampler steps only when a scene and the JSON defaults both omit steps. A value set under a scene's Show advanced section overrides this.
base_seedoptINT00–18446744073709550000Base used to derive a stable different seed for each scene that has no explicit seed. Review Gate's Reroll seed does NOT change base_seed; it writes an explicit override into that scene's always-visible Scene seed field, leaving every other scene reproducible and checkpoint-compatible.
segment_crfoptINT180–51H.264 quality for each saved scene MP4 (and normalized imported prelude): lower means higher quality and larger files. 18 is visually high quality; 0 is lossless and 51 is lowest quality. This does not change model sampling or the saved safetensors continuation checkpoint.
video_blend_framesoptINT00–243Default visual blend entering each scene, in frames. A scene's Blend entering scene field can override it; blank inherits this value, capped to that scene's context, and 0 makes a hard cut. A positive value requires head anchors. In a 0.5 workflow, connect Current Shot's state output to Loop Trim's state input; Loop Trim resolves this default plus any scene override automatically. Connect Loop Trim's images_with_overlap output to Segment Save. Final and partial videos are re-encoded with a linear cumulative blend; audio timing and the delivered duration remain unchanged.
continuation_modeoptCOMBOguideLegacy 0.4 fallback, hidden in the normal 0.5 interface. Connect Chain Policy for new workflows. Inherited default for scenes without a per-scene continuation override. guide keeps the established Motion Context path: previous AV is supplied as fixed guide rows while the overlap is regenerated. tone_carry_guide uses the RGB guide path and applies the predecessor's detected direct tone curve before VAE encoding. masked_av (experimental) VAE-encodes the previous video tail into the current target latent and protects it with a denoise mask. tapered_av (Detail AV) makes a disposable Gaussian-noised copy of only that carried video prefix before applying the same hard mask; audio is never noised. With Generated continuity on it also copies and protects the matching sampled-audio tail; with that policy off, target audio remains fully denoisable for source/reference guidance. feathered_av uses the same prefix but progressively denoises its final temporal steps for a softer handoff. audio_feathered_av keeps the picture prefix hard while releasing only the last eight audio latent ticks with a half-cosine ramp. drift_control_av keeps the clean predecessor checkpoint unchanged but applies a per-model-evaluation, next-sigma video mask with an 8+4 clean-seam taper; it requires the H3 MODEL to pass through Chain Context. All AV modes require video/head, context >= 5, the Chain Context latent output wired to the sampler, and native or compatible H3 AV-mask support.
chain_policyoptH3_CHAIN_POLICYConnect MiniMax H3 Chain Policy directly, or pass it through Advanced Policy or the Legacy 0.4 Policy Adapter. It combines transition, final soundtrack, source-audio reference, generated audio continuity, and automatic audio context in one connection.

Outputs (10)

NameTypeDescription
planH3_CHAIN_PLANThe connected Plan unchanged, or the complete validated standalone Plan authored by Studio.
preflightH3_PREFLIGHT_REPORTStructured model-free preflight report.
readyBOOLEANTrue when no blocking preflight error remains.
statusSTRINGConcise error/warning count.
report_jsonSTRINGJSON serialization of the structured report.
plan_summarySTRINGThe same normalized timing and compatibility summary as H3 Chain Plan.
clip_countINTNumber of scenes in the authored Plan.
widthINTValidated generation width; connect to stock H3 conditioning.
heightINTValidated generation height; connect to stock H3 conditioning.
video_blend_framesINTLegacy Plan-wide blend default; Current Shot state remains preferred.