Commit Graph

11 Commits

Author SHA1 Message Date
nahcmon
39f62a0d4c Fix SaveAudioMP3 avcodec_open2 EINVAL crashes
Two separate bugs in AudioSaveHelper.save_audio caused libmp3lame's
avcodec_open2 to fail with EINVAL ([Errno 22] Invalid argument):

1. codec_context.qscale is exposed by PyAV as a bool flag rather than
   the int quality scale libmp3lame expects, so assigning a level (1)
   to it for "V0" quality made avcodec_open2 reject the codec context.
   libmp3lame's default VBR mode is roughly equivalent to V0 quality,
   so the assignment is simply removed.

2. libmp3lame only accepts a fixed set of sample rates (8000, 11025,
   12000, 16000, 22050, 24000, 32000, 44100, 48000 Hz). Audio sources
   that output other rates (e.g. 40000 Hz from some RVC models) were
   passed through unchanged, causing avcodec_open2 to fail. MP3 output
   now remaps to the closest supported rate and resamples, mirroring
   the existing Opus rate-handling logic.

Verified by reproducing both failures directly against PyAV with the
unpatched code and confirming the patched AudioSaveHelper.save_audio
encodes successfully for both the "V0" quality and 40 kHz cases.

Fixes #13937
2026-06-08 18:30:35 +02:00
Alexis Rolland
ab0d8a9203
Consolidate audio nodes into SaveAudioAdvanced node (CORE-202) (#13871)
Some checks are pending
Detect Unreviewed Merge / detect (push) Waiting to run
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Waiting to run
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Waiting to run
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Waiting to run
Execution Tests / test (macos-latest) (push) Waiting to run
Execution Tests / test (ubuntu-latest) (push) Waiting to run
Execution Tests / test (windows-latest) (push) Waiting to run
Test server launches without errors / test (push) Waiting to run
Unit Tests / test (macos-latest) (push) Waiting to run
Unit Tests / test (ubuntu-latest) (push) Waiting to run
Unit Tests / test (windows-2022) (push) Waiting to run
2026-06-04 19:29:41 -07:00
Terry Jia
08e93a31a3
feat: add Preview3DAdvanced node (#14175)
Co-authored-by: Alexis Rolland <alexisrolland@hotmail.com>
2026-05-30 17:57:36 -04:00
Alexander Piskun
43e0d4e3cc
comfy_api: remove usage of "Type","List" and "Dict" types (#11238) 2025-12-15 16:01:10 -08:00
Alexander Piskun
ec7f65187d
chore(comfy_api): replace absolute imports with relative (#11145) 2025-12-08 01:21:41 -08:00
Alexander Piskun
dce518c2b4
convert nodes_audio.py to V3 schema (#10798) 2025-12-03 17:35:04 -08:00
Alexander Piskun
440268d394
convert nodes_load_3d.py to V3 schema (#10990) 2025-12-03 13:52:31 -08:00
Alexander Piskun
f3d5d328a3
fix(v3,api-nodes): V3 schema typing; corrected Pika API nodes (#10265) 2025-10-09 15:15:03 -07:00
Jedrzej Kosinski
898d88e10e
Make torchaudio exception catching less specific (#9309) 2025-08-12 23:34:58 -04:00
Jedrzej Kosinski
42974a448c
_ui.py import torchaudio safety check (#9234)
* Added safety around torchaudio import in _ui.py

* Trusted cursor too much, fixed torchaudio bool
2025-08-07 17:54:09 -04:00
Jedrzej Kosinski
4887743a2a
V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00