Skip to content

refactor: load all pretrained models from HuggingFace#6

Open
roedoejet wants to merge 3 commits into
dev.ap/inferencefrom
dev.ap/stts2-hf-checkpoints
Open

refactor: load all pretrained models from HuggingFace#6
roedoejet wants to merge 3 commits into
dev.ap/inferencefrom
dev.ap/stts2-hf-checkpoints

Conversation

@roedoejet
Copy link
Copy Markdown
Member

Instead of loading locally defined pretrained models, we load them from huggingface. If accepted, we should also scrub the *.t7 and *.pth files from this repo too, to save bloat in the git history.

Copy link
Copy Markdown
Member

@joanise joanise left a comment

Choose a reason for hiding this comment

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

OK, posting my observations during my early review, and moving to something else for now.

I had a pretty big issue trying to run everyvoice train text-to-wav config/everyvoice-text-to-wav.yaml --mode first in a GPSC-C job: the download stalled a number of times, I had to kill it a few times and relaunch before it actually worked. Can we provide a pre-download mechanism that maybe could be run on a machine without GPU?

Comment thread styletts2/ev_config/__init__.py Outdated
description="HuggingFace repo ID for the PLBERT text encoder.",
)
checkpoint_filename: str = Field(
default="step_1000000.t7",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The file in the repo is actually called 1100000, not 1000000.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nice catch!

return str(local_path)
from huggingface_hub import hf_hub_download

return hf_hub_download(repo_id, filename=filename)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

With the typo in the file name, this gave me a 404 with a long stack trace. Can we do something friendlier? Not immediately required, but would be nice.

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