Skip to content

Conversation

@AmzGrainRain
Copy link

PR types

Function optimization

PR changes

Others

Describe

Currently, G2PWOnnxConverter uses download_and_decompress() unconditionally to obtain the model path. This function checks for the presence of the downloaded .zip archive to decide whether to skip downloading.

However, some users often delete the .zip file after extraction to save disk space (since the archive is no longer needed once the model is extracted). In such cases, even though the actual ONNX model file (g2pW.onnx) exists and is fully usable, the system will re-download the entire .zip archive on next run — although it won’t re-extract if the model directory is intact.

Changes

  • Introduce a helper function get_g2pw_model_path() that directly checks for the existence of the essential model file: g2pW.onnx.
  • Only call download_and_decompress() if this file is missing.
  • Preserve all existing behavior for first-time usage.

@paddle-bot
Copy link

paddle-bot bot commented Nov 26, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Nov 26, 2025

CLA assistant check
All committers have signed the CLA.

@mergify mergify bot added the T2S label Nov 26, 2025
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