Nodes/ComfyUI-ALLinONE-MinimaxH3/H3 Mask Video Prepare (internal)
ComfyUI Node

H3 Mask Video Prepare (internal)

The quiet node that lines your source video up with H3's frame grid before masking

By LeonQ8·Created 10 days ago·Updated about 16 hours ago· 273
H3 Mask Video Prepare (internal)
  • images
  • audio
  • images
  • model_audio
  • source_audio
  • fps
  • frame_count
source_fps24.000
max_seconds5.0
target_fps24

ComfyUI is full of nodes that do the boring but load-bearing work so the flashy node can do its thing. H3 Mask Video Prepare (internal) is exactly that: before the Mask mode pipeline can replace a tracked region, your source clip has to be in the exact shape H3 expects - 24 fps, a frame count that fits the model's packed latent layout, and audio length-matched to that same layout. This node does the resampling, and it's why "add a video, paint a mask, Generate" just works.

The inputs are straightforward:

  • images (IMAGE) and audio (AUDIO) - your source clip and its soundtrack.
  • source_fps (FLOAT, default 24) - the real rate of the source so the node can resample accurately.
  • max_seconds (FLOAT, default 5, max 15) - how much of the clip to keep. Mask replacement is meant for short windows; you don't want H3 chewing on a ten-minute video.
  • target_fps (FLOAT, default 24) - pinned so tightly (min=max=24) that feeding anything else raises an error. That's by design: H3's mask path is built for 24 fps.

What comes out is the pipeline's raw material, all five outputs used further down the graph:

  • images - the source resampled to 24 fps and cut to your max_seconds window.
  • model_audio - audio resampled to 32 kHz and length-matched to the model's internal clock.
  • source_audio - your original audio at its own sample rate, just trimmed.
  • fps and frame_count - the numbers downstream nodes need to stay in sync.

The mechanism is where the interesting bits live. The frame plan picks a subset of source frames whose count lands on H3's latent grid - the output count is nudged so it sits at 5 mod 17 frames, which matches how the model's audio layout counts in 40 ticks per frame at 800 samples per tick. Audio is then trimmed or zero-padded to exactly frame_count / fps seconds and interpolated to the model's 32 kHz clock, so the soundtrack lines up with the resampled frames instead of drifting.

You won't hand-wire this one - it's created inside the generated Mask-mode workflow by the pack's frontend, exactly like the other "(internal)" nodes in this pack. But knowing what it does is genuinely useful when things go wrong. A mask that silently replaces the wrong window of your video, or audio that comes out of sync, usually traces back to what got fed into this node rather than to SAM 3 or the sampler. If you change max_seconds expecting a longer replacement, remember it's a cap on the source window, not the output length. And if you get a hard error about 24 fps, that's this node refusing to build something the model can't consume - which is a feature, not a bug.

CategoryOne Node

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
audioAUDIO
source_fpsFLOAT24.0001–240
max_secondsFLOAT5.00.2–15
target_fpsFLOAT2424–24

Outputs (5)

NameTypeDescription
imagesIMAGE
model_audioAUDIO
source_audioAUDIO
fpsFLOAT
frame_countINT