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

Make sure direct parameters are properly set on device #1043

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Feb 6, 2023

As pointed out in #1041, one dispatching a model that has direct parameters, there is a device mismatch. This PR should fix it by adding the main execution device to the hook attached to whole model.

Fixes #1041

Copy link
Collaborator

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Thanks!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 6, 2023

The documentation is not available anymore as the PR was closed or merged.

@sgugger sgugger merged commit 76c41f0 into main Feb 6, 2023
@sgugger sgugger deleted the direct_parameters branch February 6, 2023 18:36
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.

Issue with using dispatch_model with timm models
3 participants