Media Range (Input)
Trim upstream AUDIO or VIDEO by waveform — no re-upload
- audio
- video
- audio
- start_seconds
- end_seconds
- duration_seconds
- video
The other Media Range nodes load files. This one loads whatever is already in your graph. Media Range (Input) takes exactly one upstream AUDIO or VIDEO, shows you its waveform, lets you pick an A-B range, and passes the selection downstream - no re-uploading, no temp files on your side. If you've generated a minute of TTS and only want the one good sentence, this is the node that cuts it out while you watch the waveform.
It's part of ComfyUI ALICE Lab Audio Tools, the fresh alpha pack (Apache 2.0, no pip deps, bilingual EN/JA) from ALICE Lab. It also doubles as a free preview node: run anything audio or video through it and you get a waveform view plus the actual selection, which makes it a handy debugging stop in any pipeline.
How it works
The rule is strict: connect exactly one input, audio or video, not both and not neither - the source code throws an error otherwise. For an AUDIO input it trims samples directly off the tensor, which means the sample rate and channel count are preserved (unlike the file-based loaders, which normalize to 44.1 kHz stereo). For a VIDEO input it trims the video and, when the video has an audio stream, extracts it as 44.1 kHz stereo.
The end_seconds = 0 quirk is worth knowing before it confuses you: on the first run, an end of 0 means "the full input," which is how the node loads the preview and learns the duration. Edit the A-B range and run again to get your actual selection. If upstream audio changes and your old range is entirely beyond the new, shorter input, the node politely resets to the full selection rather than erroring out.
Inputs and outputs
Inputs: start_seconds, end_seconds (both floats with millisecond steps; end_seconds carries the author's own tooltip - "0 selects the full input on the first run"), plus the one audio or video connection. Outputs are the same shape as the loader variants:
audio- the trimmedAUDIO.start_seconds/end_seconds/duration_seconds- the actual selected range.video- the trimmedVIDEO, when the input was video.
Two availability rules from the README: an audio-only input has no video output, and a video without an audio stream has no audio output. Wire accordingly.
Where you'll actually use it
The natural chain: a TTS node or sampler outputs AUDIO → Media Range (Input) trims the good take → Output Waveform to hear it, or Audio to Irodori Ref Config if you're doing Irodori voice cloning, or Audio Mixer if it's going into a larger mix. For video, hang it off a loader or generation node to preview and slice before downstream processing. It's also the only range node that works mid-graph without touching your input folder, which makes it the one I reach for most.
Install
# ComfyUI Manager → search "ComfyUI ALICE Lab Audio Tools" → Install → restart
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/alice-lab-dev/ComfyUI-ALICE-Lab-Audio-Tools
# restart, then Add Node → ALICE_Lab → Media
Standard pack requirements: ffmpeg + ffprobe on the ComfyUI process PATH (macOS Homebrew paths auto-checked) and a current ComfyUI with the AUDIO/VIDEO types. No models, no pip deps.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| start_seconds | FLOAT | 0.0000–86400 | — |
| end_seconds | FLOAT | 0.0000–86400 | 0 selects the full input on the first run. |
| a_seconds | FLOAT | 0.0000–86400 | Local A marker inside the input start/end window. |
| b_seconds | FLOAT | 0.0000–86400 | Local B marker; 0 selects the complete input window. |
| audioopt | AUDIO | — | |
| videoopt | VIDEO | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| start_seconds | FLOAT | — |
| end_seconds | FLOAT | — |
| duration_seconds | FLOAT | — |
| video | VIDEO | — |