Add Problem class to safe globals for checkpoint loading in PyTorch

This commit is contained in:
2025-11-30 21:41:24 +01:00
parent bece0f6c8c
commit 69154bb998

View File

@@ -18,10 +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
from pyannote.audio.core.task import Specifications
from pyannote.audio.core.task import Specifications, Problem
# allowloading checkpoints that store these classes (PyTorch 2.6+ weights_only change)
add_safe_globals([TorchVersion, Specifications])
add_safe_globals([TorchVersion, Specifications, Problem])
# --- FFmpeg és Whisper a saját rendszered pipeline-jához, HF Token kötelező ---
if len(sys.argv) < 2: