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

[Core] fix: shard loading and saving when variant is provided. #8869

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

sayakpaul
Copy link
Member

@sayakpaul sayakpaul commented Jul 15, 2024

This is relevant for models when sharded checkpoints become an absolute necessity for loading in machines with limited RAM. With this change, we can serialize the shards in FP16 properly.

Note that this was supported before but the filename of the shard index file was incorrectly formatted. This PR fixes that and also adds a test for it.

@sayakpaul sayakpaul requested review from yiyixuxu and SunMarc July 15, 2024 10:31
@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.

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

Make sense ! Thanks for fixing !

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!

@sayakpaul sayakpaul merged commit 0f09b01 into main Jul 17, 2024
15 of 18 checks passed
Disty0 pushed a commit to Disty0/diffusers that referenced this pull request Jul 18, 2024
@sayakpaul sayakpaul deleted the fix-variant-shard-loading branch July 30, 2024 04:41
sayakpaul added a commit that referenced this pull request Dec 23, 2024
fix: shard loading and saving when variant is provided.
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.

4 participants