Add support for loading additional checkpoint classes in PyTorch

This commit is contained in:
2025-11-30 21:34:09 +01:00
parent 347cf7f50d
commit bece0f6c8c

View File

@@ -18,7 +18,10 @@ console = Console()
# --- Safe-global engedélyezés TorchVersion számára (checkpoint hack) ---
from torch.serialization import add_safe_globals
from torch.torch_version import TorchVersion
add_safe_globals([TorchVersion])
from pyannote.audio.core.task import Specifications
# allowloading checkpoints that store these classes (PyTorch 2.6+ weights_only change)
add_safe_globals([TorchVersion, Specifications])
# --- FFmpeg és Whisper a saját rendszered pipeline-jához, HF Token kötelező ---
if len(sys.argv) < 2: