unslothai/unsloth · error · ValueError
{Path(path).name} carries no audio track. MiniMax-H3 denoise
Error message
{Path(path).name} carries no audio track. MiniMax-H3 denoises video and audio in one packed sequence, so its training clips must have sound. What it means
Raised by decode_clip() when the container has a video track but no audio track. MiniMax-H3 denoises video and audio in one packed sequence, and the audio rows are part of the training objective, so an audio-less clip is refused rather than silently trained as silence (a silent target would teach the model to stop generating sound).
Source
Thrown at studio/backend/core/training/diffusion_h3_clips.py:294
is the dataset contract -- pre-trim to the training duration -- but it used to be silent,
which is how a caption describing a whole scene ended up on its first second. ``on_note``
is called once per over-long clip with the numbers, so the run reports it.
``waveform`` is a float32 array of shape ``(2, h3_audio_sample_count(num_frames))`` at
32 kHz. A mono source is duplicated to both channels; a clip with **no** audio track is
refused rather than silently trained as silence, because the audio rows are in the objective
and a silent target teaches the model to stop generating sound.
"""
import av
import numpy as np
from PIL import Image
target_samples = h3_audio_sample_count(num_frames)
with av.open(str(path)) as container:
if not container.streams.video:
raise ValueError(f"{Path(path).name} carries no video track.")
if not container.streams.audio:
raise ValueError(
f"{Path(path).name} carries no audio track. MiniMax-H3 denoises video and audio "
f"in one packed sequence, so its training clips must have sound."
)
stream = container.streams.video[0]
source_fps = float(stream.average_rate or stream.guessed_rate or H3_FPS) or float(H3_FPS)
# Container duration, in seconds, for the over-long note below. Best effort: an unknown
# duration simply means no note, never a failed decode.
source_duration_s = 0.0
try:
if stream.duration is not None and stream.time_base is not None:
source_duration_s = float(stream.duration * stream.time_base)
elif getattr(container, "duration", None):
source_duration_s = float(container.duration) / 1_000_000.0
except Exception: # noqa: BLE001 -- a note is not worth failing a decode over
source_duration_s = 0.0
frames: list[Any] = []
next_target = 0View on GitHub (pinned to 203007d190)
Solutions
- Replace the clip with a version that has a real audio track, or add a soundtrack before training.
- Exclude silent clips from the dataset via a pre-scan (container.streams.audio empty).
- For generated clips, pair them with a licensed audio bed so captions describing sound have a target.
Example fix
# before
# dataset of AI-generated silent .mp4s -> "carries no audio track"
# after
# mux an audio bed: ffmpeg -loop 1 -i silent.mp4 -i bed.wav -shortest out.mp4
# or filter at ingest:
with av.open(p) as c:
if not c.streams.audio:
skip(p) # report and exclude Defensive patterns
Strategy: validation
Validate before calling
import av
def has_audio_track(path: str) -> bool:
try:
with av.open(path) as c:
return bool(c.streams.audio)
except av.error.InvalidDataError:
return False Try / catch
try:
frames, waveform = decode_clip(p, num_frames=n, width=w, height=h)
except ValueError as e:
if "no audio track" in str(e):
skip_and_log(p)
else:
raise Prevention
- Exclude silent/AI-generated clips unless you mux in a soundtrack first.
- Check container.streams.audio during dataset ingestion, not at train time.
When it happens
Trigger: Passing a muted render, a screen recording captured without system audio, an exported animation/GIF-to-mp4 conversion, or stock b-roll delivered without a soundtrack.
Common situations: AI-generated video clips (many generators emit silent files); OBS/screen-capture defaults with audio disabled; stock footage proxies stripped of audio for size; timelapse exports.
Related errors
- {Path(path).name} carries {have_s:.2f}s of audio for a {want
- MiniMax-H3 was trained on aspect ratios from 1:4 to 4:1; thi
- {Path(path).name} carries no video track.
- {Path(path).name} decoded to {len(frames)} frames at {H3_FPS
- {Path(path).name} decoded to no audio samples.
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/67274f86ddb5d754.
Report an issue: GitHub.