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

Load weights only in torch.load #77

Merged
merged 4 commits into from
Sep 12, 2024
Merged

Load weights only in torch.load #77

merged 4 commits into from
Sep 12, 2024

Conversation

shavit
Copy link

@shavit shavit commented Aug 31, 2024

Closes #71

@eginhard
Copy link
Member

Thank you for the PRs! I'll just also test it locally before merging. Did you test these changes and did you notice any issues?

@shavit
Copy link
Author

shavit commented Sep 1, 2024

👋 I tested a few so far using make, and didn't notice anything.

@shavit shavit marked this pull request as ready for review September 2, 2024 20:09
@eginhard eginhard force-pushed the 71-torch-load branch 7 times, most recently from c8396d9 to b4cebd7 Compare September 12, 2024 20:07
shavit and others added 4 commits September 12, 2024 23:37
Required for loading some models using torch.load(..., weights_only=True). This
is only available from Pytorch 2.4
Bark was previously adapted to download Hubert from HuggingFace, so the manual
download is superfluous.
Due to breaking change in upload-artifact action:
actions/upload-artifact#602
Copy link
Member

@eginhard eginhard left a comment

Choose a reason for hiding this comment

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

I had to whitelist some things with torch.serialization.add_safe_globals(), but now CI is happy with all models in the zoo tests and Bark, Tortoise and XTTS work locally. Will merge this, so that it can be tested by a wider range of people. Thanks again!

@eginhard eginhard merged commit e5dd06b into idiap:dev Sep 12, 2024
48 checks passed
@eginhard eginhard mentioned this pull request Oct 4, 2024
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.

[Bug] Potential vulnerability in TTS model loading due to torch.load default behavior
2 participants