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

Support musicgen conversion. #296

Merged
merged 1 commit into from
Jul 11, 2023
Merged

Support musicgen conversion. #296

merged 1 commit into from
Jul 11, 2023

Conversation

Narsil
Copy link
Collaborator

@Narsil Narsil commented Jul 11, 2023

What does this PR do?

Fixes # (issue) or description of the problem this PR solves.

@Narsil Narsil requested review from sanchit-gandhi and sgugger July 11, 2023 08:13

class_ = getattr(transformers, config.architectures[0])
(pt_model, pt_infos) = class_.from_pretrained(folder, output_loading_info=True)
(sf_model, sf_infos) = class_.from_pretrained(folder, output_loading_info=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The old version doesn't work anymore.

This might fail on very old models (where config.architectures is not written), but I think it's ok now, they should be converted by now.

Copy link
Contributor

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Works for me, thanks!

@Narsil Narsil merged commit 6d93a71 into main Jul 11, 2023
@Narsil Narsil deleted the support_musicgen_convert branch July 11, 2023 12:52
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