Nodes/ComfyUI MiniMax H3 Timeline Director/MiniMax H3 有限分段采样(低内存版本)
ComfyUI Node

MiniMax H3 有限分段采样(低内存版本)

A 60-Second MiniMax H3 Video That Never Lives in RAM

By Songssx·Created 2 months ago·Updated a day ago· 636
MiniMax H3 有限分段采样(低内存版本)
  • model
  • clip
  • vae
  • audio_vae
  • finite_plan
  • sampler
  • sigmas
  • Last Sampled Latent
  • Final Video
  • Final Audio
  • Status
◄seed0►
◄continue_audio_latenttrue►
◄ref_image_sizematch►

The problem this node solves

MiniMax H3 is a 33B omni-modal model that generates video and stereo audio in one pass, natively 4–15 seconds at up to 2K and 24fps. Fifteen seconds is the model's context, not a setting you can nudge, so every "make me a one-minute video" workflow in this ecosystem is really a segmenting problem - the same wall Wan users hit at 81 frames.

Songssx/ComfyUI-MiniMaxH3-TimelineDirector attacks that at the latent level: a Material Planner defines segment windows with deliberate overlaps, and the sampler carries the previous segment's AV-latent tail straight into the next one instead of doing an RGB decode/re-encode round trip. This node - MiniMax H3 有限分段采样(低内存版本) - is the version of that you actually run when the result is long.

Here's the distinction that matters. The plain MiniMax H3 Finite Segment Sampler returns Merged Frames: one IMAGE tensor holding every decoded frame of the entire timeline. A minute at 24fps is 1,440 frames of RGB in memory at once, and on a lot of cards that's exactly where the job dies. The low-memory sampler keeps the same plan and the same seam logic but decodes, encodes, and releases one segment at a time, handing you a VIDEO instead.

How it works

It's an expand node: you drop one node, and at execution it builds a whole per-segment graph for you - encoder, continuation prep, sampler, archiver, assembly. Each finished segment is written to ComfyUI's temporary folder as an H.264 MP4 (CRF 18) under temp/minimax_h3_segment_spill/<uuid>/segment_001.mp4, then released, with gc and torch.cuda.empty_cache() run between segments. At the end those parts are joined into an assembled.mp4, the individual files are deleted, and the whole spill folder is removed when the returned VIDEO object is released. Stale spill folders older than 24 hours are swept on the next run.

The overlap handling is where the pack earns its keep. Your requested overlap is snapped down to H3's legal temporal grid - 24 becomes 22, 48 becomes 39 - and that same aligned number drives the latent carry, the frame trimming, and the final assembly, so the seam doesn't drift. With audio continuation active, the carried overlap stays exact until its last few audio-latent ticks, where a half-cosine mask releases it into newly generated sound.

The inputs that matter

  • finite_plan - the MINIMAX_H3_FINITE_SEGMENT_PLAN from the Material Planner's Segment Plan output. It carries your segment count, prompts, overlaps, target frame count, and two-stage settings. No plan, nothing to sample.
  • model / clip / vae / audio_vae - the usual loaders, plus the audio VAE. You need audio_vae wired even if you're not chasing sound; H3 is joint audio-video.
  • sampler / sigmas - deliberately external, so you keep using whatever sampler/scheduler you like. The sigma schedule needs at least one step or it errors out.
  • seed - one seed for every segment, on purpose. That's what keeps continuation stable, and it also means changing it changes the whole video. Fix it while you iterate.
  • continue_audio_latent (default on) - the Soft AV audio continuity path. Off, the audio is hard-trimmed instead of blended.
  • ref_image_size - match (default) scales reference images to your target resolution's pixel budget; max caps them at H3's own reference short-edge limit. Neither ever upscales, so match is the sane default.

Outputs: Final Video goes straight into SaveVideo - that's what the bundled low-memory example workflow does. Final Audio is there if you want to mux or process the soundtrack separately. Last Sampled Latent is the final AV latent for anything chaining after it, and Status is a string confirming how many segments were decoded and encoded.

Installing it

ComfyUI Manager → search MiniMax H3, or manually:

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

Restart ComfyUI and search MiniMax H3. The pack declares no pip dependencies, but you need a recent ComfyUI with the native H3 nodes, the H3 Ref2VA model, CLIP, video VAE, audio VAE and imageio-ffmpeg. Do not install comfyui-SelfLift - the two-stage runtime is bundled - though two-stage sampling still needs a compatible H3 latent upscaler in ComfyUI/models/latent_upscale_models/.

Where people get burned

Temp-dir disk space. This node's whole trick is writing files, and a long HD run leaves one MP4 per segment plus the joined result on disk while it runs. If your ComfyUI temp folder sits on a small root partition, point it somewhere roomier before a 20-segment job.

No latent checkpoints, no segment reruns. The node description says it outright: a crash at segment nine of ten means resampling from segment one. Use the in-memory Finite Segment Sampler when you expect to iterate inside a timeline.

Wrong output type. Final Video is a VIDEO, not an IMAGE. Downstream nodes expecting frames won't take it; send it to SaveVideo or a VIDEO-aware node.

Two-stage upscaler confusion. LTX upscalers sitting in latent_upscale_models/ get rejected by name rather than silently used - that's the pack saving you from a bad lift, not a bug.

The honest summary: reach for this node when your long H3 job fails on memory rather than quality. It costs you disk and iteration flexibility, and buys you the ability to finish.

CategoryMiniMax H3/Long Video

Inputs (10)

NameTypeDefaultDescription
modelMODEL—
clipCLIP—
vaeVAE—
audio_vaeVAE—
finite_planMINIMAX_H3_FINITE_SEGMENT_PLAN—
samplerSAMPLER—
sigmasSIGMAS—
seedINT00–18446744073709550000—
continue_audio_latentBOOLEANtrue—
ref_image_sizeCOMBOmatch2 options: match, max

Outputs (4)

NameTypeDescription
Last Sampled LatentLATENT—
Final VideoVIDEO—
Final AudioAUDIO—
StatusSTRING—