Comfy-Org/ComfyUI · error · ValueError
SaveAudio: input audio is None (source video may have no aud
Error message
SaveAudio: input audio is None (source video may have no audio track).
What it means
SaveAudio.execute raises when its audio argument is None, mirroring the same pattern as VAEEncodeAudio: a video source without an audio track propagated a None into a node that must write audio. It fails fast rather than writing an empty file.
Source
Thrown at comfy_extras/nodes_audio.py:181
node_id="SaveAudio",
search_aliases=["export flac"],
display_name="Save Audio (FLAC) (DEPRECATED)",
category="audio",
essentials_category="Audio",
inputs=[
IO.Audio.Input("audio"),
IO.String.Input("filename_prefix", default="audio/ComfyUI"),
],
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="flac") -> IO.NodeOutput:
if audio is None:
raise ValueError("SaveAudio: 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)
)
class SaveAudioMP3(IO.ComfyNode):
@classmethod
def define_schema(cls):
return IO.Schema(
node_id="SaveAudioMP3",
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"),View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Verify the source video has an audio stream (ffprobe) or replace it with one that does
- Route a real LoadAudio/LoadVideo(with audio) node into the save node
- Branch around the save node when audio is None using a switch/gate node
Defensive patterns
Strategy: type-guard
Validate before calling
if audio is None:
skip_save = True # do not execute SaveAudio Type guard
def is_audio(v) -> bool:
return isinstance(v, dict) and 'waveform' in v and 'sample_rate' in v Prevention
- Gate save nodes on non-None audio
- Verify videos have audio streams before batch export
- Keep a switch/bypass so silent inputs skip the save branch
When it happens
Trigger: Connecting a LoadVideo-based audio output that is None (video has no audio stream) into SaveAudio. Passing None from any optional audio socket that was left unconnected or upstream-skipped.
Common situations: Automated batch jobs over mixed video collections where some inputs are silent; deprecated-node workflows still using SaveAudio instead of the newer save path.
Related errors
- VAEEncodeAudio: input audio is None (source video may have n
- SaveAudioMP3: input audio is None (source video may have no
- 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/aa81ad407971eca4.
Report an issue: GitHub.