Add Problem class to safe globals for checkpoint loading in PyTorch
This commit is contained in:
4
main.py
4
main.py
@@ -18,10 +18,10 @@ console = Console()
|
|||||||
# --- Safe-global engedélyezés TorchVersion számára (checkpoint hack) ---
|
# --- Safe-global engedélyezés TorchVersion számára (checkpoint hack) ---
|
||||||
from torch.serialization import add_safe_globals
|
from torch.serialization import add_safe_globals
|
||||||
from torch.torch_version import TorchVersion
|
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)
|
# 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ő ---
|
# --- FFmpeg és Whisper a saját rendszered pipeline-jához, HF Token kötelező ---
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user