diff --git a/audiocraft/utils/cache.py b/audiocraft/utils/cache.py index f7f82064..6ba017a7 100644 --- a/audiocraft/utils/cache.py +++ b/audiocraft/utils/cache.py @@ -287,6 +287,7 @@ def _load_one(self, index: int): if isinstance(part[0], torch.Tensor): out.append(torch.stack(part)) else: + assert isinstance(part, torch.Tensor) out.append(part) return out except Exception: diff --git a/requirements.txt b/requirements.txt index e44fe159..a6fa5809 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ num2words numpy sentencepiece spacy==3.5.2 -torch>=2.0.0 +torch==2.1.0 torchaudio>=2.0.0 huggingface_hub tqdm @@ -20,4 +20,4 @@ librosa gradio torchmetrics encodec -protobuf \ No newline at end of file +protobuf