-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Use fsspec and torch for embedding file IO #1581
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that will be necessary to update the docs and run examples on the compute embeddings script (now it is not .json anymore)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to do changes in the bin/compute_embedding.py file, like here for exemple.
TTS/TTS/bin/compute_embeddings.py
Line 82 in a790df4
if ".json" not in args.output_path: |
|
TTS/tts/utils/managers.py
Outdated
|
||
|
||
def save_file(obj: Any, path:str): | ||
with fsspec.open(path, "rb") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you meant "wb" here right @erogol ?
4c9b101
to
41d86e0
Compare
@@ -22,11 +23,13 @@ | |||
parser.add_argument("config_dataset_path", type=str, help="Path to dataset config file.") | |||
parser.add_argument("--output_path", type=str, help="Path for output `pth` or `json` file.", default="speakers.pth") | |||
parser.add_argument("--old_file", type=str, help="Previous embedding file to only compute new audios.", default=None) | |||
parser.add_argument("--use_cuda", type=bool, help="flag to set cuda. Default False", default=False) | |||
parser.add_argument("--disable_cuda", type=bool, help="Flag to disable cuda.", default=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me, this is counter-intuitive but can live with it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just spent 3h computing phonemes before realizing that it wasn't using the GPU ^^' That's why I changed it to that. Having use_cuda to true by default and then throwing errors if you had no GPU seemed bad...
No description provided.