Nodes/fxai-toolkit/凤希AI - 音频分段器V2
ComfyUI Node

凤希AI - 音频分段器V2

The segmenter that knows MiniMax H3 doesn't like your frame count

By fxai666·Created 4 months ago·Updated 3 days ago· 35
凤希AI - 音频分段器V2
  • 音频
  • 音频
  • 分段列表
音频文件
关键帧JSON[]
跳过初始段false
包含尾部段true
是否平均分段true
平均分段时长15.00
目标模型LTX

FxAiAudioSegmenterV2 (凤希AI - 音频分段器V2) is the same job as the original FxAiAudioSegmenter - split a soundtrack into generation-sized pieces - with one meaningful upgrade: a 目标模型 (target model) switch that knows which video model you're feeding. Pick MiniMaxH3 and the segment lengths stop being "whatever divides evenly" and become "whatever lands on MiniMax H3's frame grid," which is the difference between a seamless long video and one that quietly desyncs a frame every single segment.

Why the model switch exists

Here's the problem it's solving. Video models don't accept any old frame count - latents live on a grid. LTX is happy with 8-frame multiples, which the original segmenter handles. MiniMax H3 works on a 17k + 5 frame pattern at 24fps (a slightly irregular-looking grid that comes out of how the model chunks its generation). If you slice audio by plain seconds and feed MiniMax H3, every segment either over- or under-shoots the grid, and since each generated segment can't be exactly the audio you planned, the error accumulates across a long loop - by segment 50 your "10-second" clip is 9.4 seconds of picture against 10 seconds of audio.

V2's MiniMaxH3 mode fixes it the honest way: it aligns each segment's frame count down to the grid, gathers the dropped frames, and re-distributes them so the total stays correct - merging a too-short tail into the previous segment instead of leaving a stub. The author's own tooltip for 目标模型 says it plainly: "LTX outputs at original duration; MiniMax snaps each segment to the 17k+5 frame grid so rounding doesn't accumulate across long loops."

Inputs and outputs

Inputs mirror V1 - 音频文件 dropdown, 关键帧JSON, 跳过初始段, 包含尾部段, 是否平均分段, 平均分段时长 - plus the 目标模型 enum (LTX / MiniMaxH3, default LTX) and an optional 音频 AUDIO input so you can feed a cut/referenced audio instead of re-loading from file.

Outputs are a clean pair:

  • 音频 - the sliced AUDIO for the segment span.
  • 分段列表 - a LIST of float durations (one per segment), ready to hand to FxAIAudioSegmentLoad / the MiniMax frame calculator in the pack.

That's V2's other change: the segment list comes out as a proper LIST of floats instead of V1's text block, which makes it far easier to wire into other nodes.

Install

Part of fxai-toolkit (凤希全能节点包), MIT-licensed, by 凤希AI. ComfyUI Manager (search "fxai") or:

cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
# restart ComfyUI

The pack auto-installs soundfile and psutil; non-wav files load through pydub (and ffmpeg), so install pydub if you get the ImportError. No model downloads - the MiniMax H3 weights are yours to supply separately.

Gotchas

  • If you're not using MiniMax H3, LTX mode is just V1 with nicer outputs. The 17k+5 grid only kicks in with 目标模型 set to MiniMaxH3.
  • The MiniMax mode only changes the segment lengths - it doesn't check that the actual video model config downstream matches. Keep the pack's MiniMax nodes on the same frame assumptions or the fix silently un-fixes itself.
  • Everything's labeled in Chinese: 目标模型 = target model, 分段 = segment. The tooltip on 目标模型 is in the author's English, which is a nice touch if you get lost.
  • MiniMax H3's license is a story of its own (commercial use void in the US/EU/UK among others) - worth a read before you build a business on it.
Category凤希AI/音频

Inputs (8)

NameTypeDefaultDescription
音频文件COMBO1 options:
关键帧JSONSTRING[]
跳过初始段BOOLEANfalse
包含尾部段BOOLEANtrue
是否平均分段BOOLEANtrue
平均分段时长FLOAT15.00
目标模型COMBOLTXLTX 按原始时长输出;MiniMax 把每段时长就近对齐到 17k+5 帧网格,避免逐段舍帧在长循环中累积误差
音频optAUDIO

Outputs (2)

NameTypeDescription
音频AUDIO
分段列表LIST