-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
better support for non-CUDA devices (CPU, MPS) #192
Merged
ronghanghu
merged 4 commits into
facebookresearch:main
from
ronghanghu:ronghanghu/non_cuda
Aug 12, 2024
Merged
better support for non-CUDA devices (CPU, MPS) #192
ronghanghu
merged 4 commits into
facebookresearch:main
from
ronghanghu:ronghanghu/non_cuda
Aug 12, 2024
+212
−376
Conversation
This file contains 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
ronghanghu
force-pushed
the
ronghanghu/non_cuda
branch
3 times, most recently
from
August 10, 2024 03:57
0f67b96
to
7213380
Compare
ronghanghu
force-pushed
the
ronghanghu/non_cuda
branch
from
August 10, 2024 06:43
7213380
to
3d18489
Compare
haithamkhedr
approved these changes
Aug 12, 2024
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.
Looks good! thanks for adding support to non CUDA devices
…alization and smaller figure size (to make sure it renders on GitHub)
This was referenced Aug 12, 2024
fbcotter
added a commit
to wayveai/segment-anything-2
that referenced
this pull request
Sep 6, 2024
… into facebookresearch-main * 'main' of github.com:facebookresearch/segment-anything-2: (40 commits) open `README.md` with unicode (to support Hugging Face emoji); fix various typos (facebookresearch#218) accept kwargs in auto_mask_generator Fix HF image predictor improving warning message and adding further tips for installation (facebookresearch#204) better support for non-CUDA devices (CPU, MPS) (facebookresearch#192) Update hieradet.py add Colab support to the notebooks; pack config files in `sam2_configs` package during installation (facebookresearch#176) also catch errors during installation in case `CUDAExtension` cannot be loaded (facebookresearch#175) Add interface for box prompt in SAM 2 video predictor (facebookresearch#174) Address comment Update hieradet.py Update docstrings Revert code snippet Updated INSTALL.md with CUDA_HOME-related troubleshooting (facebookresearch#140) Format using ufmt Update INSTALL.md (facebookresearch#156) Update README Make it optional to build CUDA extension for SAM 2; also fallback to all available kernels if Flash Attention fails (facebookresearch#155) Clean up Address comment ...
xydy666
pushed a commit
to xydy666/segment-anything-2
that referenced
this pull request
Sep 17, 2024
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.
In this PR, we provide better support for non-CUDA devices (CPU, MPS) in the SAM 2 image/video predictors and the notebook examples:
compute_device
parameter to image loading, and cast to the model's device (based on its parameters) instead of hard-coding to CUDAimage_predictor_example.ipynb
andautomatic_mask_generator_example.ipynb
to get deterministic mask coloring (so that we only have small text changes on notebook files that could be easier to review in the future)