Nodes/comfyui-AGSoft/🔊✂️AGSoft Audio Frame Cutter Master
ComfyUI Node

🔊✂️AGSoft Audio Frame Cutter Master

The node that stops your stitched video's audio from sliding out of sync

By Art-xmaster·Created about a year ago·Updated 2 days ago· 25
🔊✂️AGSoft Audio Frame Cutter Master
  • audio
  • chain
  • audio
  • start_seconds
  • end_seconds
  • duration_seconds
  • audio_stitched
  • stitched_duration_seconds
fps_float24.000
frames124
trim_first_frames1
offset_frames0
offset_seconds0.000

If you build long videos by chaining segments - last frame of clip 1 becomes the first frame of clip 2, over and over - you already know the video side has a tax: every segment after the first opens with a duplicate anchor frame, so you trim it at the join or the stitched movie stutters. Everybody trims the pixels. Almost nobody trims the audio to match, and that's how picture and sound drift apart by a frame per seam.

🔊✂️AGSoft Audio Frame Cutter Master is the head of a two-node chain that does the audio half of that arithmetic. It's built for models that generate sound and picture in one pass - MiniMax H3 being the obvious one, with 4–15s clips at 24fps and native stereo - because once your video has real audio baked in, a stitched movie needs its audio timeline stitched just as carefully as its frames. Audio is the thinnest layer of this stack, bolted on once silent clips needed to talk, and this node is honest about being part of it: no model, no API, no key. It cuts tensors.

What it actually does

Master is where every setting lives. Feed it a source track, a frame rate and a segment length in frames, and it normalizes the waveform to [B, C, T], clamps it to ±1 (WAV-header safety for AGSoft Video Save), works out the window - start at offset_seconds + offset_frames / fps, length frames / fps - and slices sample-accurately at round(seconds × sample_rate), so there's no float drift. Then it builds the chain bus: source waveform, sample rate, fps, trim in seconds, a cursor at the end of this window and the accumulated pieces.

Each downstream 🔊✂️AGSoft Audio Frame Cutter Link reads that cursor, cuts its window starting exactly where the previous one ended, and passes the bus on. Windows tile the source with no gaps, which is why the joins don't click. Note the deliberate asymmetry: Master's segment 1 is frames / fps long, every Link's window is frames / fps − trim_first_frames / fps. Same shape as the video stitch, where segment 1 keeps full length and segments 2+ lose the duplicated anchor frame.

The inputs you'll actually touch

  • audio - the source track (AGSoft Load Audio or any AUDIO output).
  • fps_float - wire fps_float from 🎬AGSoft MiniMax Base: 24 for MiniMax H3, 25 for LTX.
  • frames - segment length in frames. Wire total_frames from MiniMax Base and every node in the chain cuts the same size. Default 124, about 5.2s at 24fps.
  • trim_first_frames (optional, default 1, max 8) - anchor-duplicate frames dropped from segments 2+. It must match the trim on your video stitch (AGSoft MiniMaxH3 Stitch / Images Stitch use the same parameter name), or the movie silently desyncs.
  • offset_frames / offset_seconds (optional, default 0) - where segment 1 starts in the source, if you're scoring to a track that doesn't begin at 0:00.

Outputs, and the one that confuses people

audio is this segment's piece - sample-accurate, the scene reference. start_seconds, end_seconds and duration_seconds are the exact window boundaries, meant for external cutters (the pack's own header suggests AGSoft Audio Split Plus's start_time/end_time). One trap: those seconds are absolute positions in the source timeline, not offsets into the piece. Wrap them around audio, which is already cut, and you've cut it twice.

audio_stitched is what you actually came for. On the Master it's just segment 1; on the last Link it's the finished full track. It lives at the tail because ComfyUI can't pass data upstream, so the assembly can only exist downstream - that's the output you send to AGSoft Video Save.audio. stitched_duration_seconds is the same story as a number, and it should match your stitched video's runtime. If it doesn't, your trim settings disagree somewhere.

Install

Either let ComfyUI Manager do it - search comfyui-AGSoft, install, restart; the sane path for a pack this size (80+ nodes) - or clone it yourself:

cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
# restart ComfyUI

Dependencies come from the repo's requirements.txt, not the README: numpy, opencv-python and translators (the last is for the Translate nodes, not anything here). No ffmpeg, no model download, no weight files for the cutters. The loader imports each node file separately and logs failures per file, so if a node never shows up in your menu, search the console for Import error in module.

Where people get burned

Source shorter than the window. Ask for a 10-second segment from 6 seconds of audio and you don't get an error - you get silence padding and a console warning. Your audio no longer matches a video generated at full length.

A bad fps or a non-AUDIO input. Both raise a bilingual ValueError rather than doing something weird, so if the node goes red, read the message before rewiring anything.

Reading audio_stitched off the wrong node. Every node in the chain has that output. Only the last one is the movie.

Expecting community help. The pack has essentially no Reddit footprint - a phrase search for "AGSoft" across the 2026 corpus returns nothing - and the author's docs are on a Russian-language Telegram channel. Nobody has solved your problem in a thread, so the console log is your diagnostics: it prints seg1: frames=… start=… end=… dur=… every run.

CategoryAGSoft/Audio

Inputs (6)

NameTypeDefaultDescription
audioAUDIOSource track to cut from (AGSoft Load Audio or any AUDIO output). --- Исходная дорожка для резки (AGSoft Load Audio или любой выход AUDIO).
fps_floatFLOAT24.0001–120Frame rate. Connect fps_float from 🎬AGSoft MiniMax Base (24 MiniMax H3, 25 LTX, etc.). --- Частота кадров. Подключите fps_float из 🎬AGSoft MiniMax Base (24 MiniMax H3, 25 LTX и т.д.).
framesINT1241–100000Segment 1 length in frames. Link total_frames from 🎬AGSoft MiniMax Base. --- Длительность отрезка 1 в кадрах. Подключите total_frames из 🎬AGSoft MiniMax Base.
trim_first_framesoptINT10–8Anchor-frame duplicate frames removed from segments 2+ (all Link nodes). Must match the video stitch trim. --- Кадры-дубли кадра-якоря, сбрасываемые с отрезков 2+ (все Link-ноды). Должно совпадать с trim видео-склейки.
offset_framesoptINT00–1000000Start of segment 1 in frames (e.g. 22). Added to offset_seconds. --- Начало отрезка 1 в кадрах (например 22). Складывается с offset_seconds.
offset_secondsoptFLOAT0.0000–100000Start of segment 1 in seconds (e.g. 18.0). Added to offset_frames/fps. --- Начало отрезка 1 в секундах (например 18.0). Складывается с offset_frames/fps.

Outputs (7)

NameTypeDescription
chainAGS_FRAME_CUT_CHAIN
audioAUDIO
start_secondsFLOAT
end_secondsFLOAT
duration_secondsFLOAT
audio_stitchedAUDIO
stitched_duration_secondsFLOAT