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

Fix loading with only state dict and low_cpu_mem_usage = True #35217

Merged
merged 7 commits into from
Dec 18, 2024

Conversation

SunMarc
Copy link
Member

@SunMarc SunMarc commented Dec 11, 2024

What does this PR do ?

This PR enables to load a model by passing a state_dict only with low_mem_cpu_usage=True.

Added a test that was not passing before this PR !

Required for DDUF (reference: huggingface/diffusers#10037)

@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.

@SunMarc SunMarc marked this pull request as ready for review December 12, 2024 15:40
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

No problem for me!

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

@SunMarc thanks for this 🤗 LGTM

@ArthurZucker ArthurZucker merged commit 1eee1ce into main Dec 18, 2024
28 checks passed
@ArthurZucker ArthurZucker deleted the load-model-state-dict branch December 18, 2024 08:54
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.

5 participants