FeiHou Easy H3 数字人/MV 时长裁剪
Make your H3 video come out the exact length of its audio
- images
- duration_control
- audio
- images
- fps
- audio
If you've ever generated a MiniMax H3 "digital human" or MV clip with a voiceover, you know the problem this node exists to fix: the video comes back some nice round number of frames, and your 7.4-second audio track no longer lines up with anything. FeiHouEasyH3DurationCrop (display name "数字人/MV 时长裁剪", digital-human/MV duration crop) is the tail-end helper in the FeiHou Easy H3 pack that trims that mismatch away, so the finished clip is exactly as long as the audio it was meant to lip-sync to.
Why this is a problem only this pack has
MiniMax H3 samples to a frame count, not to a wall-clock time. The FeiHou Easy H3 main node defaults to 10 seconds at 24 FPS - 240 frames, no more, no less - and that's what comes out of the VAE. If your reference audio is 7.4 seconds or 13.8 seconds, the generated video silently lands on the nearest legal frame count and your audio drifts. The pack solves this by having the main node record the exact duration of Audio 1 into a small duration_control payload that rides along inside the H3 Context. This node is the other half of that deal: it reads the payload and fixes the video to match.
How it actually works
Straightforward, and honestly kind of elegant. The node takes your decoded images, an fps, and the duration_control value, plus an optional audio. If the control is enabled and carries a real target_seconds, it:
- computes
target_frames = round(target_seconds × fps), - resamples your frame sequence to that length using
torch.linspace+index_select- uniform retain/duplicate, so the first and last frames always survive, which matters for a head-turn or a held closing pose, - recomputes and returns a corrected
fps(target_frames / target_seconds) so the muxer sees the exact container duration.
The audio passes through untouched, which is the whole point - you never re-encode it. If the control is disabled (the default), the node is a pure pass-through: images in, images out, zero cost. Slap it in your graph permanently and forget about it.
The inputs and outputs that matter
Three required, one optional - it's a tiny node, thank goodness:
- images - the decoded frames from your H3 VAE decode.
- fps - the generation FPS (default 24). You usually feed this from
FeiHou Easy H3 Output'sfpsoutput rather than typing it. - duration_control - this is the gotcha. It's a pack-private type (
FEIHOU_H3_DURATION_CONTROL), so it will only connect to theduration_controloutput of theFeiHou Easy H3 Outputnode. There's no other source for it. - audio (optional) - your reference audio, passed through untouched.
Outputs are images, fps, and audio - wire images + fps into a VHS_VideoCombine (or whatever muxer you use) and feed its audio input from here.
Installing it
This pack needs a recent ComfyUI that includes the official MiniMax H3 nodes - the code imports comfy_extras.nodes_minimax_h3 at load time, so on an older install the whole pack refuses to import. Get current first, then:
cd ComfyUI/custom_nodes
git clone https://github.com/FX-FeiHou/ComfyUI-FeiHou-Easy-H3
or just search "ComfyUI-FeiHou-Easy-H3" in ComfyUI Manager and restart. The pyproject.toml declares zero pip dependencies - it leans on ComfyUI's bundled torch/torchaudio. What it does not install for you is the H3 model itself, which is the other thing to know: the full-precision weights run to roughly 42.5 GB, and the MiniMax H3 Community License excludes the US, EU, UK, and South Korea. If that's you, the local-weights path isn't licensed, full stop - this node won't help with that.
Common issues
- The node does nothing. Check the "auto duration" toggle on the main
ComfyUI-FeiHou-Easy-H3node - it's off by default. No toggle, notarget_seconds, pass-through. That's by design, not a bug. - You can't connect
duration_control. You're feeding it from the wrong place. It's a pack-private type and only exists onFeiHou Easy H3 Output. Wiring it from anywhere else simply won't take. - The whole pack shows an import error. Your ComfyUI predates the official H3 nodes. Update.
- Don't chain an attention backend (
ModelAttentionBackend/ comfy kitchen attention) when the pack's experimental low-VRAM streamed blocks option is on - the README warns they conflict.
It's a boring node in the best way: plug it in at the end of the chain, and your digital-human clip finally ends exactly when the voiceover does.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | FLOAT | 24.0001–120 | — |
| duration_control | FEIHOU_H3_DURATION_CONTROL | — | |
| audioopt | AUDIO | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| fps | FLOAT | — |
| audio | AUDIO | — |