fix: stabilize V3.9 and bump package to 3.9.1

Preserve Second Pass audio and scoped Review conditioning, strengthen Take compatibility, and align Review Driving Audio.

Keep v5 history readable, document v6 restart requirements, and describe the fixes at the top of both READMEs. Remove workstation-specific paths and private operational records from public documentation.
This commit is contained in:
ukr8b3g-cmyk
2026-10-04 19:05:33 +09:00
parent b88c5b4d97
commit 190141e03e
45 changed files with 2211 additions and 4267 deletions
+29
View File
@@ -0,0 +1,29 @@
"""Use Core audio DSP; retain the existing adapter for older Core versions."""
from __future__ import annotations
import importlib
def resample_audio(waveform, source_rate: int, target_rate: int):
if source_rate == target_rate:
return waveform
try:
core_audio = importlib.import_module("comfy.audio")
except ModuleNotFoundError as exc:
if exc.name not in {"comfy", "comfy.audio"}:
raise
core_audio = None
core_resample = getattr(core_audio, "resample", None)
if core_resample is not None:
# Errors from an available Core API are real errors, not API absence.
return core_resample(waveform, source_rate, target_rate)
try:
torchaudio = importlib.import_module("torchaudio")
except ModuleNotFoundError as exc:
if exc.name != "torchaudio":
raise
raise RuntimeError(
"Audio resampling requires comfy.audio.resample or legacy torchaudio"
) from exc
return torchaudio.functional.resample(waveform, source_rate, target_rate)