-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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 _load_state_dict_into_meta_model with device_map=None #36488
Fix _load_state_dict_into_meta_model with device_map=None #36488
Conversation
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. When it is ready for review, please click the |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that. Just a nit
src/transformers/modeling_utils.py
Outdated
device_map_regex = "|".join(sorted(device_map.keys(), reverse=True)) | ||
device_map_regex = "|".join(sorted(device_map.keys(), reverse=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sorry, i missed that. Make sure to put it under the condition if device_map is not None. Right now it requires that it also have "" in its keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
…e#36488) * Fix _load_state_dict_into_meta_model with device_map=None * Update src/transformers/modeling_utils.py
…e#36488) * Fix _load_state_dict_into_meta_model with device_map=None * Update src/transformers/modeling_utils.py
What does this PR do?
https://github.com/huggingface/diffusers/actions/runs/13604967458/job/38035399161?pr=10898
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.