mirror of https://github.com/coqui-ai/TTS.git
Fix import error with Bark
This commit is contained in:
parent
c87377b713
commit
9a8352b8da
|
@ -11,7 +11,6 @@ from zipfile import ZipFile
|
||||||
import numpy
|
import numpy
|
||||||
import torch
|
import torch
|
||||||
from torch import nn, optim
|
from torch import nn, optim
|
||||||
from torch.serialization import MAP_LOCATION
|
|
||||||
|
|
||||||
|
|
||||||
class HubertTokenizer(nn.Module):
|
class HubertTokenizer(nn.Module):
|
||||||
|
@ -103,7 +102,7 @@ class HubertTokenizer(nn.Module):
|
||||||
model_zip.close()
|
model_zip.close()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load_from_checkpoint(path, map_location: MAP_LOCATION = None):
|
def load_from_checkpoint(path, map_location = None):
|
||||||
old = True
|
old = True
|
||||||
with ZipFile(path) as model_zip:
|
with ZipFile(path) as model_zip:
|
||||||
filesMatch = [file for file in model_zip.namelist() if file.endswith("/.info")]
|
filesMatch = [file for file in model_zip.namelist() if file.endswith("/.info")]
|
||||||
|
|
Loading…
Reference in New Issue