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

optimize seamless-m4t/vits model for text-to-speech generation #825

Merged
merged 12 commits into from
Jun 6, 2024

Conversation

sywangyi
Copy link
Collaborator

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@sywangyi sywangyi marked this pull request as draft March 21, 2024 08:49
@sywangyi sywangyi marked this pull request as ready for review March 21, 2024 11:09
@sywangyi
Copy link
Collaborator Author

pipeline running issue addressed by huggingface/transformers#29722

@sywangyi
Copy link
Collaborator Author

sywangyi commented Mar 21, 2024

perf A100 Gaudi2
BF16 528ms 250ms
FP32 410ms 275ms

in my env

python3 run_pipeline.py
--model_name_or_path facebook/hf-seamless-m4t-medium
--text "Hello, my dog is cooler than you!"
--use_hpu_graphs
--n_iterations 10

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
@sywangyi
Copy link
Collaborator Author

@libinta please help review.

@libinta libinta requested a review from jiminha March 21, 2024 18:20
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
@sywangyi sywangyi changed the title optimize seamless-m4t model for text-to-speech generation optimize seamless-m4t/vits model for text-to-speech generation Mar 25, 2024
@sywangyi
Copy link
Collaborator Author

perf A100 Gaudi2
BF16 87ms 11ms
FP32 102ms 13ms

in my env

python3 run_pipeline.py
--model_name_or_path facebook/mms-tts-eng
--text "Hello, my dog is cooler than you!"
--use_hpu_graphs
--n_iterations 10

@skaulintel
Copy link
Collaborator

skaulintel commented Apr 18, 2024

@sywangyi Can you please add CI tests

@sywangyi
Copy link
Collaborator Author

sywangyi commented Apr 23, 2024

CI tests will be added after #834 is merged since it will be added in the same file following similar style.

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
@libinta libinta added the run-test Run CI for PRs from external contributors label May 7, 2024
tests/test_pipeline.py Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
examples/text-to-speech/run_pipeline.py Outdated Show resolved Hide resolved
tests/test_pipeline.py Show resolved Hide resolved
tests/test_pipeline.py Outdated Show resolved Hide resolved
sywangyi and others added 3 commits May 11, 2024 00:26
@ssarkar2
Copy link
Collaborator

ssarkar2 commented May 31, 2024

Merged to master (with transformer 4.40), ran python3 run_pipeline.py --model_name_or_path facebook/hf-seamless-m4t-medium --text "Hello, my dog is cooler than you!" --use_hpu_graphs --n_iterations 10

finished:

05/31/2024 21:29:17 - INFO - __main__ - speech = [{'audio': array([[-0.00172372, -0.00146204, -0.00160711, ...,  0.01203394,
         0.01085523,  0.00866978]], dtype=float32), 'sampling_rate': 16000}] time = 2362.2106075286865ms

However generated wav file doesn't sound right

@sywangyi
Copy link
Collaborator Author

sywangyi commented Jun 1, 2024

generated wav file doesn't sound right. this issue is fixed by #1034

Copy link
Collaborator

@ssarkar2 ssarkar2 left a comment

Choose a reason for hiding this comment

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

lgtm

@regisss regisss merged commit 4dd1507 into main Jun 6, 2024
9 checks passed
@regisss regisss deleted the seamless_m4t branch June 6, 2024 17:16
imangohari1 pushed a commit to imangohari1/optimum-habana that referenced this pull request Jun 13, 2024
…ngface#825)

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Co-authored-by: Sayantan Sarkar <sasarkar@habana.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-test Run CI for PRs from external contributors synapse1.16
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants