Nodes/noEmbryo nodes/H3 Motion Context Clip Stitcher /noEmbryo
ComfyUI Node

H3 Motion Context Clip Stitcher /noEmbryo

Don't Hand-Stitch Your H3 Clips — Let This Node Do It

By noembryo·Created 3 years ago·Updated 8 days ago· 40
H3 Motion Context Clip Stitcher /noEmbryo
  • video_vae
  • audio_vae
  • latent
  • images
  • audio
  • frame_count
  • report
folderh3_context
patternclip_*.safetensors
first_clip1
last_clip0
context_length22
fps24.000

MiniMax H3 is fantastic at one thing: making a single 4–15 second clip with synced stereo audio. The moment you want a 60-second film you hit the wall every video model hits - long videos are built from chunked generations stitched together, and stitching video with synchronized audio is exactly where naive approaches fall apart. NikoDemon80's ComfyUI-H3-Motion-Context handles the generation side, carrying motion context between clips so the seams stay coherent. This node is the missing last step: it takes the numbered clip_00001.safetensors archive files that workflow saves and assembles them into one continuous video + audio stream.

How it works

The H3 Motion Context workflow saves each approved clip as an h3_motion_context_av_v1 safetensor file - a little archive holding both the video latent and the audio latent. That's the format this node eats. It loads each file, decodes it once with the connected H3 video VAE, then immediately moves the result to CPU and frees the VRAM. Decode one, splice, move on. That one-clip-at-a-time discipline is the whole reason a long chain of clips doesn't OOM your card.

Between adjacent clips it dissolves the context_length overlap: a linear fade for video, and an equal-power cosine/sine ramp for audio over the exact same time window, so picture and sound stay locked together. Because it works on latents before encoding, there's none of the quality loss you get from ffmpeg-concatenating finished mp4s.

The inputs that matter

Only a couple need your attention. The star is context_length - 5, 22, 39, or 56 frames, and only those, because they're the values that are a whole number of latent steps. Set it to exactly what you used in the H3 Motion Context nodes. 22 is the default and the normal setting; mismatch it and you'll see a visible jump at every seam.

  • folder - where your clip_*.safetensors files live. Absolute path, or relative to ComfyUI/output.
  • pattern - the filename glob; the trailing five digits become the clip index. The default clip_*.safetensors is right for normal archives.
  • first_clip / last_clip - trim the ends of the timeline. last_clip of 0 means "everything from first_clip onward".
  • fps - keep it at 24 unless your workflow deliberately changed it.
  • video_vae (optional but effectively required) - your H3 video VAE, FP16 or INT8 ConvRot. The node flat-out refuses to run without one.
  • audio_vae (optional) - the H3 audio VAE FP32. Connect it if you want the audio output at all; skip it and you get a silent video.
  • latent (optional) - the live AV latent straight from your H3 sampler, used in place of the highest-numbered file on disk. Handy when you just generated the last clip and don't want to round-trip it through the filesystem.

Outputs

images (IMAGE) and audio (AUDIO) feed your save nodes - an animated-webp/video encoder for the picture, a save-audio node for the sound. frame_count is useful for downstream math, and report is a plain-text log of each clip's decoded and crossfaded frames plus audio length; wire it to a preview the first time so you can eyeball the arithmetic.

Install

ComfyUI Manager → search "noEmbryo", or:

cd ComfyUI/custom_nodes
git clone https://github.com/noembryo/ComfyUI-noEmbryo.git

Then restart ComfyUI. That's genuinely all - no requirements.txt, no extra pip installs. The VAEs come from your H3 model setup, not this pack. One real gotcha: at v1.5.0 the stitcher module is shipped but commented out in __init__.py's node list, so if the node doesn't show up under Add Node → video/minimax, that's why. Check for a newer release, or uncomment the line.

Gotchas

  • Don't leave gaps in the numbering. If clip_00003.safetensors is missing between approved files, the node errors out rather than quietly stitching a timeline with a hole - a gap almost always means an approved clip never saved.
  • Each clip must be at least 2× context_length frames, or the crossfade refuses to run.
  • Missing audio output is a wiring problem 95% of the time: you forgot audio_vae.

One honest caveat before you build a long-form pipeline: this is a niche node for a specific workflow, and H3's community licence excludes the US, EU, UK and Korea from running the local weights. Check your territory before you commit a week of renders to it.

CategorynoEmbryo

Inputs (9)

NameTypeDefaultDescription
folderSTRINGh3_contextFolder containing clip_00001.safetensors, clip_00002.safetensors, etc. Absolute paths and paths relative to ComfyUI/output are accepted.
patternSTRINGclip_*.safetensorsFilename glob. The final five-digit number is treated as the clip index.
first_clipINT11–9999First approved clip to include.
last_clipINT00–9999Last clip to include. 0 = every clip from first_clip onward.
context_lengthCOMBO22Number of decoded frames to crossfade at each clip boundary. The normal setting is 22 frames. This is the overlap length that is dissolved between adjacent clips. 5, 22, 39 or 56 are the lengths that are a whole number of latent steps, which is why other numbers aren't offered.
fpsFLOAT24.0001–240H3 native output rate. Keep this at 24 unless your workflow deliberately changes it.
video_vaeoptVAEMiniMax H3 video VAE (FP16 or INT8 ConvRot).
audio_vaeoptVAEMiniMax H3 audio VAE FP32. Required for the AUDIO output.
latentoptLATENTOptional: the currently-generated AV latent (from your H3 sampler), used in place of the highest-numbered file on disk.

Outputs (4)

NameTypeDescription
imagesIMAGE
audioAUDIO
frame_countINT
reportSTRING