Comfy-Org/ComfyUI · error · ValueError
SaveAudioMP3: input audio is None (source video may have no
Error message
SaveAudioMP3: input audio is None (source video may have no audio track).
What it means
SaveAudioMP3.execute raises when audio is None — the MP3 export variant of SaveAudio with the identical None-input guard. The encoder (via UI.AudioSaveHelper) needs a waveform and sample rate, so a None audio object aborts execution.
Source
Thrown at comfy_extras/nodes_audio.py:211
search_aliases=["export mp3"],
display_name="Save Audio (MP3) (DEPRECATED)",
category="audio",
essentials_category="Audio",
inputs=[
IO.Audio.Input("audio"),
IO.String.Input("filename_prefix", default="audio/ComfyUI"),
IO.Combo.Input("quality", options=["V0", "128k", "320k"], default="V0"),
],
hidden=[IO.Hidden.prompt, IO.Hidden.extra_pnginfo],
is_deprecated=True,
is_output_node=True,
outputs=[IO.Audio.Output("audio")]
)
@classmethod
def execute(cls, audio, filename_prefix="ComfyUI", format="mp3", quality="128k") -> IO.NodeOutput:
if audio is None:
raise ValueError("SaveAudioMP3: input audio is None (source video may have no audio track).")
return IO.NodeOutput(
audio,
ui=UI.AudioSaveHelper.get_save_audio_ui(
audio, filename_prefix=filename_prefix, cls=cls, format=format, quality=quality
)
)
class SaveAudioOpus(IO.ComfyNode):
@classmethod
def define_schema(cls):
return IO.Schema(
node_id="SaveAudioOpus",
search_aliases=["export opus"],
display_name="Save Audio (Opus) (DEPRECATED)",
category="audio",
inputs=[
IO.Audio.Input("audio"),View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Confirm the upstream source has audio; use ffprobe if unsure
- Feed the node from LoadAudio or a generator node instead of a silent video's audio tap
- Skip the MP3 branch when audio is None via a switch node
Defensive patterns
Strategy: type-guard
Validate before calling
if audio is None:
return # skip MP3 export Type guard
def is_audio(v) -> bool:
return isinstance(v, dict) and 'waveform' in v and 'sample_rate' in v Prevention
- Check for None audio before export nodes
- Use ffprobe to prefilter silent files in batch jobs
- Prefer the non-deprecated save nodes going forward
When it happens
Trigger: MP3 export node receiving the audio output of a video loader whose video lacked an audio track, or any unconnected/None optional audio input.
Common situations: Converting video audio to MP3 in batch pipelines where some inputs are silent; deprecated SaveAudioMP3 usage after refactors changed upstream node outputs.
Related errors
- VAEEncodeAudio: input audio is None (source video may have n
- SaveAudio: input audio is None (source video may have no aud
- SaveAudioOpus: input audio is None (source video may have no
- PreviewAudio: input audio is None (source video may have no
- ERROR: audio encoder file is invalid or unsupported embed_di
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/49e02d6663d4a8bb.
Report an issue: GitHub.