Loading audiolm_pytorch/t5.py +8 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,9 @@ import torch import transformers from transformers import T5Tokenizer, T5EncoderModel, T5Config from beartype import beartype from typing import Union, List # less warning messages since only using encoder transformers.logging.set_verbosity_error() Loading Loading @@ -61,11 +64,15 @@ def get_encoded_dim(name): # encoding text @beartype def t5_encode_text( texts, texts: Union[str, List[str]], name = DEFAULT_T5_NAME, output_device = None ): if isinstance(texts, str): texts = [texts] t5, tokenizer = get_model_and_tokenizer(name) if torch.cuda.is_available(): Loading setup.py +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup( name = 'audiolm-pytorch', packages = find_packages(exclude=[]), version = '0.4.0', version = '0.4.1', license='MIT', description = 'AudioLM - Language Modeling Approach to Audio Generation from Google Research - Pytorch', author = 'Phil Wang', Loading Loading
audiolm_pytorch/t5.py +8 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,9 @@ import torch import transformers from transformers import T5Tokenizer, T5EncoderModel, T5Config from beartype import beartype from typing import Union, List # less warning messages since only using encoder transformers.logging.set_verbosity_error() Loading Loading @@ -61,11 +64,15 @@ def get_encoded_dim(name): # encoding text @beartype def t5_encode_text( texts, texts: Union[str, List[str]], name = DEFAULT_T5_NAME, output_device = None ): if isinstance(texts, str): texts = [texts] t5, tokenizer = get_model_and_tokenizer(name) if torch.cuda.is_available(): Loading
setup.py +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup( name = 'audiolm-pytorch', packages = find_packages(exclude=[]), version = '0.4.0', version = '0.4.1', license='MIT', description = 'AudioLM - Language Modeling Approach to Audio Generation from Google Research - Pytorch', author = 'Phil Wang', Loading