Nodes/ComfyUI-MiniMax-H3-LongMedia/MiniMaxH3LatentLabUnifiedRuntimeSampler
ComfyUI Node

MiniMaxH3LatentLabUnifiedRuntimeSampler

The engine that runs every H3 segment in a single sampling lifecycle

By vizart-vj·Created 14 days ago·Updated 2 days ago· 71
MiniMaxH3LatentLabUnifiedRuntimeSampler
  • initial_av
  • long_media_plan
  • guider
  • sampler
  • sigmas
  • final_av
  • runtime_report
seed0
video_context_denoise0.00
audio_context_denoise0.00
offload_completed_segmentstrue
latent_hires_enabledfalse
latent_hires_model
latent_hires_scale2.0
latent_hires_precisionfp16
latent_hires_align32
refine_enabledfalse
refine_steps2

If you've ever wondered why long-form H3 generation doesn't just die of accumulated overhead, this is the node doing the heavy lifting - and it's hidden on purpose. MiniMaxH3LatentLabUnifiedRuntimeSampler executes every segment of a LongMedia run inside one ComfyUI sampling lifecycle. That distinction matters: ComfyUI's CFGGuider.sample() owns the prepare/run/cleanup phases, and calling it once per segment would reload and re-initialize the entire H3 model each time. This runtime opens that lifecycle once, runs the inner sampler for every segment, updates continuation conditioning and latents between segments, then cleans up exactly once.

What you feed it

  • initial_av (LATENT) - the starting AV latent from the Setup.
  • long_media_plan (LONG_MEDIA_PLAN) - the plan object from the Long Media Planner/Setup.
  • guider, sampler, sigmas - stock ComfyUI objects from your usual loaders and sampler config.
  • seed - master seed for the run.
  • video_context_denoise / audio_context_denoise (default 0) - how much the carried-over context gets re-rolled per segment; 0 preserves it.
  • offload_completed_segments (default true) - offload finished segments off the GPU so a long run doesn't accumulate VRAM.

The last block of inputs is the interesting part:

  • latent_hires_enabled (default false) + latent_hires_model, latent_hires_scale (default 2), latent_hires_precision (fp16/bf16/fp32), latent_hires_align (default 32) - the optional H3 latent hi-res path: a learned video-latent upscale followed by an independent second-pass refinement. Big quality lever for 1080p+ work; needs the upscaler model file.
  • refine_enabled (default false) + refine_steps (default 2) - a low-noise refine pass on the assembled result.

It returns final_av (LATENT) and runtime_report (STRING - a JSON dump of what the runtime actually decided: memory profile, attention path, per-segment stats). The report is the pack's built-in answer to "why is my run so slow."

Should you touch it?

Probably not, and that's the honest advice. It's an Internal node: the public Long Media Setup + Sampler build all of this for you. You'll encounter it when a saved workflow (like the shipped MiniMax-H3-LongMedia-SAFE-1080p-15s.json) drops one in, or when you're A/B testing the runtime's internals. If you do wire one by hand, keep the runtime_report flowing to a text node so you can actually see what it decided.

Install

One pack, zero extra pip deps:

cd ComfyUI/custom_nodes
git clone https://github.com/vizart-vj/ComfyUI-MiniMax-H3-LongMedia

Restart ComfyUI, or ComfyUI Manager → "MiniMax H3 LongMedia". The H3 checkpoint and VAEs go in ComfyUI's standard model folders.

Gotchas

  • Keep ComfyUI Dynamic VRAM enabled - the runtime's whole low-VRAM strategy coordinates with it. Do not launch with --disable-dynamic-vram.
  • latent_hires_enabled with no latent_hires_model will fail at runtime; get the upscaler model first.
  • The H3 weights are geofenced out of the US, EU, UK and South Korea - the pack-wide licensing reminder.

One lifecycle to run them all. When long H3 work is stable and fast, this node is quietly why.

CategoryMiniMax H3/LongMedia/Internal

Inputs (16)

NameTypeDefaultDescription
initial_avLATENT
long_media_planLONG_MEDIA_PLAN
guiderGUIDER
samplerSAMPLER
sigmasSIGMAS
seedINT00–18446744073709550000
video_context_denoiseFLOAT0.000–1
audio_context_denoiseFLOAT0.000–1
offload_completed_segmentsBOOLEANtrue
latent_hires_enabledBOOLEANfalse
latent_hires_modelSTRING
latent_hires_scaleFLOAT2.01–4
latent_hires_precisionCOMBOfp163 options: fp16, bf16, fp32
latent_hires_alignINT3216–256
refine_enabledBOOLEANfalse
refine_stepsINT21–1000

Outputs (2)

NameTypeDescription
final_avLATENT
runtime_reportSTRING