Skip to content

[Hackathon 7th] t2s inference compatible with PIR api #3923

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

Closed
wants to merge 1 commit into from

Conversation

GreatV
Copy link
Contributor

@GreatV GreatV commented Dec 3, 2024

PR types

Others

PR changes

Others

Describe

This pull request includes changes to the paddlespeech/t2s/exps/inference.py file to enhance the flexibility of model file handling. The most important changes involve importing the os module, adding a new function to determine the model file suffix, and updating the main function to use the new logic for model file suffixes.

Enhancements to model file handling:

Copy link

paddle-bot bot commented Dec 3, 2024

Thanks for your contribution!

@GreatV GreatV changed the title [Hackathon 7th] t2s infernece compatible with PIR api [Hackathon 7th] t2s inference compatible with PIR api Dec 3, 2024
@mergify mergify bot added the T2S label Dec 3, 2024
@@ -120,6 +121,15 @@ def parse_args():
return args


def get_model_suffix(inference_dir, model_name):
if os.path.exists(os.path.join(inference_dir, model_name + ".pdmodel")):
Copy link
Collaborator

Choose a reason for hiding this comment

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

inference support both format support, like:
paddle.inference.Config(model_name_or_path, model_prefix)
model_name_or_path: the root path of model
model_prefix: name of model, without suffix

In this time, interface should be fixed:
[def get_predictor(](

)

also for support it compatibility, you can switch it with paddle version.

Copy link
Collaborator

Choose a reason for hiding this comment

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

refer #3927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants