Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextToSpeech to utilize passed device arg #249

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

laszukdawid
Copy link

Started playing with the code and noticed that device isn't used in tortois.api.TextToSpeech.

Please let me know if that was intentional and there are some things to look for.

tortoise/api.py Outdated
@@ -213,7 +213,9 @@ def __init__(self, autoregressive_batch_size=None, models_dir=MODELS_DIR, enable
self.models_dir = models_dir
self.autoregressive_batch_size = pick_best_batch_size_for_gpu() if autoregressive_batch_size is None else autoregressive_batch_size
self.enable_redaction = enable_redaction
self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
if device is None:
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the PR and sorry for the late review. Given how poorly this program performs on CPU, can you please print out a warning here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, late review? Guess you didn't expect an update from me.

What do you think about the change?

p0p4k added a commit to p0p4k/tortoise-tts that referenced this pull request Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants