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

凤希AI - 音频平均分段器

Slice your soundtrack into equal chunks so a long video never OOMs

By fxai666·Created 4 months ago·Updated 3 days ago· 35
凤希AI - 音频平均分段器
  • 音频
  • 分段列表
平均分段时长15.00

The long-video trick that makes this pack worth a look in the first place: never ask your video model for the whole clip. Ask it for one segment, loop, then stitch. FxAiAudioAvgSplit (凤希AI - 音频平均分段器) is the boring-but-essential first step of that loop - it tells you exactly where to cut a soundtrack so every segment is the same length and the audio stays in sync with the frames you generate per pass.

Note what it does not do: it doesn't cut audio. It returns a list of segment durations in seconds. The actual slicing happens downstream in the pack's FxAIAudioSegmentLoad node, which reads this list and cuts the matching slice out of your original audio. Think of AvgSplit as the planner and SegmentLoad as the knife.

How it works

Under the hood it's simple math on the raw waveform. It reads the AUDIO you feed in, counts the samples, divides by the sample rate to get total duration in seconds, then walks forward in 平均分段时长 (average segment length) steps producing one (start, end) pair per pass. One bit of genuine care: if the final leftover slice is under 5 seconds it merges into the previous segment instead of leaving you a weird stub tail. That's the difference between this and doing the division by hand - a 1.3-second orphan segment at the end of a 10-minute track will wreck your per-segment frame math.

The inputs that matter

Only two, both required:

  • 音频 - an AUDIO input. Wire in anything from ComfyUI's audio loaders or this pack's own FxAiAudioSegmenter. You'll typically feed it the full, un-cut soundtrack.
  • 平均分段时长 (average segment length) - float, default 15 seconds. Set it to match whatever clip length your video model is happy with. LTX users tend to live around 8–15s; if your VRAM is tight, go shorter, not longer.

Output

One output: 分段列表 (segment list), a LIST of floats - the duration of each planned segment. That list is the handshake with FxAIAudioSegmentLoad and with the pack's FxAiAudioDurationSegFxAiAudioDurationGetSeg chain for multi-audio projects.

Install

This is one node inside the fxai-toolkit pack (凤希全能节点包, MIT-licensed, one author, 凤希AI - site www.fxai.site, QQ group 775649071 if you want the Chinese-speaking support channel). Easiest install is ComfyUI Manager - search "fxai" - or:

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

On first boot the pack auto-installs soundfile and psutil. It calls out to ffprobe for duration work elsewhere in the pack, so make sure ffmpeg is on your PATH. No model downloads - this is workflow plumbing, not a checkpoint.

Gotchas

  • Everything is labeled in Chinese: 音频 = audio, 分段 = segment, 时长 = duration. You get used to it in about five minutes.
  • The output is durations, not audio. If you wire 分段列表 straight into a video generator expecting sound, nothing comes out.
  • It's an average split, full stop. It does not respect silence, speech pauses, or musical phrases. If you want cuts at meaningful boundaries, use FxAiAudioSegmenter with a keyframe JSON instead.
Category凤希AI/音频

Inputs (2)

NameTypeDefaultDescription
音频AUDIO
平均分段时长FLOAT15.00

Outputs (1)

NameTypeDescription
分段列表LIST