From 9a8352b8da440d36a0961dfe850fca5717d40061 Mon Sep 17 00:00:00 2001 From: Eren G??lge Date: Fri, 11 Aug 2023 03:33:59 +0200 Subject: [PATCH] Fix import error with Bark --- TTS/tts/layers/bark/hubert/tokenizer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TTS/tts/layers/bark/hubert/tokenizer.py b/TTS/tts/layers/bark/hubert/tokenizer.py index eb6dd0a8..d8628ef2 100644 --- a/TTS/tts/layers/bark/hubert/tokenizer.py +++ b/TTS/tts/layers/bark/hubert/tokenizer.py @@ -11,7 +11,6 @@ from zipfile import ZipFile import numpy import torch from torch import nn, optim -from torch.serialization import MAP_LOCATION class HubertTokenizer(nn.Module): @@ -103,7 +102,7 @@ class HubertTokenizer(nn.Module): model_zip.close() @staticmethod - def load_from_checkpoint(path, map_location: MAP_LOCATION = None): + def load_from_checkpoint(path, map_location = None): old = True with ZipFile(path) as model_zip: filesMatch = [file for file in model_zip.namelist() if file.endswith("/.info")]