This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import time | |
| import pickle | |
| from tqdm import tqdm | |
| import torch | |
| from transformers import WhisperForConditionalGeneration | |
| def benchmark_gen( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass, asdict, field | |
| import torch | |
| import soundfile as sf | |
| from parler_tts import ParlerTTSForConditionalGeneration | |
| from transformers import AutoTokenizer | |
| import torch._dynamo.config | |
| import torch._inductor.config | |
| import json | |
| import time | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dataclasses import dataclass, asdict | |
| import torch | |
| import soundfile as sf | |
| from parler_tts import ParlerTTSForConditionalGeneration | |
| from transformers import AutoTokenizer | |
| import torch._dynamo.config | |
| import torch._inductor.config | |
| import numpy as np | |
| import time | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import soundfile as sf | |
| from parler_tts import ParlerTTSForConditionalGeneration | |
| from transformers import AutoTokenizer | |
| import torch | |
| torch._logging.set_logs(graph_breaks=True, recompiles=True) | |
| torch.manual_seed(0) | |
| CUDA_DEVICE = 0 | |
| torch_device = f"cuda:{CUDA_DEVICE}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import soundfile as sf | |
| from parler_tts import ParlerTTSForConditionalGeneration | |
| from transformers import AutoTokenizer | |
| import torch | |
| torch.manual_seed(0) | |
| CUDA_DEVICE = 0 | |
| torch_device = f"cuda:{CUDA_DEVICE}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import torch | |
| import soundfile as sf | |
| from parler_tts import ParlerTTSForConditionalGeneration | |
| from transformers import AutoTokenizer | |
| # caching allows ~50% compilation time reduction | |
| # see https://docs.google.com/document/d/1y5CRfMLdwEoF1nTk9q8qEu1mgMUuUtvhklPKJ2emLU8/edit#heading=h.o2asbxsrp1ma | |
| CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) | |
| os.environ["TORCHINDUCTOR_CACHE_DIR"] = os.path.join(CURRENT_DIR, "tmp") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import soundfile as sf | |
| from parler_tts import ParlerTTSForConditionalGeneration | |
| from transformers import AutoTokenizer | |
| model_name = "ylacombe/parler-tts-mini-jenny-30H" | |
| torch_device = "cuda:0" | |
| torch_dtype = torch.bfloat16 | |
| attn_implementation = "eager" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import torch | |
| import soundfile as sf | |
| from parler_tts import ParlerTTSForConditionalGeneration | |
| from transformers import AutoTokenizer | |
| # caching allows ~50% compilation time reduction | |
| # see https://docs.google.com/document/d/1y5CRfMLdwEoF1nTk9q8qEu1mgMUuUtvhklPKJ2emLU8/edit#heading=h.o2asbxsrp1ma | |
| CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) | |
| os.environ["TORCHINDUCTOR_CACHE_DIR"] = os.path.join(CURRENT_DIR, "tmp") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import torch | |
| import time | |
| from parler_tts import ParlerTTSForConditionalGeneration, ParlerTTSStreamer | |
| from transformers import AutoTokenizer | |
| from threading import Thread | |
| # caching allows ~50% compilation time reduction | |
| # see https://docs.google.com/document/d/1y5CRfMLdwEoF1nTk9q8qEu1mgMUuUtvhklPKJ2emLU8/edit#heading=h.o2asbxsrp1ma | |
| CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import torch | |
| import time | |
| from parler_tts import ParlerTTSForConditionalGeneration, ParlerTTSStreamer | |
| from transformers import AutoTokenizer | |
| from threading import Thread | |
| # caching allows ~50% compilation time reduction | |
| # see https://docs.google.com/document/d/1y5CRfMLdwEoF1nTk9q8qEu1mgMUuUtvhklPKJ2emLU8/edit#heading=h.o2asbxsrp1ma |
OlderNewer