Spaces:
Running
Running
Update modules/speaker.py
Browse files9 unmodified lines1011121314151617186 unmodified lines252627282930319 unmodified linesfrom modules.utils.SeedContext import SeedContextfrom torch.serialization import add_safe_globalswith safe_globals({'modules.speaker.Speaker': Speaker}):speaker = torch.load(file_like, map_location="cpu", weights_only=False)def create_speaker_from_seed(seed):chat_tts = models.load_chat_tts()6 unmodified lines@staticmethoddef from_file(file_like):with safe_globals({'modules.speaker.Speaker': Speaker}):speaker = torch.load(file_like, map_location=torch.device("cpu"))speaker.fix()return speaker9 unmodified lines1011121314156 unmodified lines222324252627289 unmodified linesfrom modules.utils.SeedContext import SeedContextfrom torch.serialization import add_safe_globalsdef create_speaker_from_seed(seed):chat_tts = models.load_chat_tts()6 unmodified lines@staticmethoddef from_file(file_like):with safe_globals({'modules.speaker.Speaker': Speaker}):speaker = torch.load(file_like, map_location=torch.device("cpu"), weights_only=False)speaker.fix()return speaker
modules/speaker.py+1-4