load model onto cpu if cuda isn't available#25
Merged
lkeab merged 1 commit intoSysCV:mainfrom Aug 13, 2023
Merged
Conversation
Contributor
Author
kumarselvakumaran-sentient
approved these changes
Jul 17, 2023
Contributor
|
I was looking for cpu support as well. Please consider merging this one so that hq-sam behaves the same as SAM. This will make life easier for downstream packages. |
Collaborator
|
Thanks for the suggestion. We follow the code design of SAM in this part. We merged the request. |
|
Many thanks @lkeab & @eddogola for this. The most recent pip release of Note that thanks to pip's ability to install from VCS, as a workaround you can specify the package in a ...however, this will currently fail, until the issue mentioned in #83 is fixed... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Load the model onto cpu if cuda device isn't available
As it stands, the user has to go down to the code to change where the weights/ckpt is loaded into. This fix loads the ckpt into a device dynamically, based on which device is present.