{"record":{"id":"aa81ad407971eca4","repo":"Comfy-Org/ComfyUI","slug":"saveaudio-input-audio-is-none-source-video-may-h","errorCode":null,"errorMessage":"SaveAudio: input audio is None (source video may have no audio track).","messagePattern":"SaveAudio: input audio is None \\(source video may have no audio track\\)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_audio.py","lineNumber":181,"sourceCode":"            node_id=\"SaveAudio\",\n            search_aliases=[\"export flac\"],\n            display_name=\"Save Audio (FLAC) (DEPRECATED)\",\n            category=\"audio\",\n            essentials_category=\"Audio\",\n            inputs=[\n                IO.Audio.Input(\"audio\"),\n                IO.String.Input(\"filename_prefix\", default=\"audio/ComfyUI\"),\n            ],\n            hidden=[IO.Hidden.prompt, IO.Hidden.extra_pnginfo],\n            is_deprecated=True,\n            is_output_node=True,\n            outputs=[IO.Audio.Output(\"audio\")]\n        )\n\n    @classmethod\n    def execute(cls, audio, filename_prefix=\"ComfyUI\", format=\"flac\") -> IO.NodeOutput:\n        if audio is None:\n            raise ValueError(\"SaveAudio: input audio is None (source video may have no audio track).\")\n        return IO.NodeOutput(\n            audio,\n            ui=UI.AudioSaveHelper.get_save_audio_ui(audio, filename_prefix=filename_prefix, cls=cls, format=format)\n        )\n\n\nclass SaveAudioMP3(IO.ComfyNode):\n    @classmethod\n    def define_schema(cls):\n        return IO.Schema(\n            node_id=\"SaveAudioMP3\",\n            search_aliases=[\"export mp3\"],\n            display_name=\"Save Audio (MP3) (DEPRECATED)\",\n            category=\"audio\",\n            essentials_category=\"Audio\",\n            inputs=[\n                IO.Audio.Input(\"audio\"),\n                IO.String.Input(\"filename_prefix\", default=\"audio/ComfyUI\"),","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_audio.py#L163-L199","documentation":"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.","triggerScenarios":"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.","commonSituations":"Automated batch jobs over mixed video collections where some inputs are silent; deprecated-node workflows still using SaveAudio instead of the newer save path.","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"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if audio is None:\n    skip_save = True  # do not execute SaveAudio","typeGuard":"def is_audio(v) -> bool:\n    return isinstance(v, dict) and 'waveform' in v and 'sample_rate' in v","tryCatchPattern":null,"preventionTips":["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"],"tags":["audio","save-node","none-input"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}