GitXplorerGitXplorer
n

ComfyUI-SAM2

public
107 stars
17 forks
1 issues

Commits

List of commits on branch main.
Verified
2f355fb058ff73c869fbdd72c522044b9e54045a

Update requirements.txt

nneverbiasu committed 16 days ago
Verified
f4a2b84fa4696b9de5ffb944e2b48345e6e380cf

Update transforms.py (#32)

ppetercham committed 22 days ago
Unverified
81f14144403d0ab5032b01717c6efe1d15327df3

Merge branch 'main' of github.com:neverbiasu/ComfyUI-SAM2

nneverbiasu committed a month ago
Unverified
b6c0f350943f481108ea9eaaacfa9d445fb6da20

chore: Add close stale issue Action

nneverbiasu committed a month ago
Unverified
0877726f3f61909bd6d4a126b18606b35edbf606

fix: Repair requirement missing

nneverbiasu committed a month ago
Unverified
b2edb0d8fa9da8dbcb385eb991a9654655273f19

chore: Add Github Action and pyproject.toml for Comfy Registry

nneverbiasu committed a month ago

README

The README file for this repository.

ComfyUI SAM2(Segment Anything 2)

This project adapts the SAM2 to incorporate functionalities from comfyui_segment_anything. Many thanks to continue-revolution for their foundational work.

image You can refer to this example workflow for a quickly try.

Requirements

Install the necessary Python dependencies with:

pip install -r requirements.txt

Models

Models will be automatically downloaded when needed. Alternatively, you can download them manually as per the instructions below. If the download is slow, set the HTTP_PROXY and HTTPS_PROXY environment variables to use a proxy.

BERT Base Uncased

Download the model from Hugging Face and place the files in the models/bert-base-uncased directory under ComfyUI.

GroundingDino

Download the models and config files to models/grounding-dino under the ComfyUI root directory. Do not modify the file names.

Name Size Config File Model File
GroundingDINO_SwinT_OGC 694MB download link download link
GroundingDINO_SwinB 938MB download link download link

SAM 2

Download the model files to models/sams under the ComfyUI root directory. Do not modify the file names.

Model Size Model File
sam2_hiera_tiny 38.9MB download link
sam2_hiera_small 46MB download link
sam2_hiera_base_plus 80.8MB download link
sam2_hiera_large 224.4MB download link

Contribution

Thank you for considering contributions! Fork the repository, make changes, and send a pull request for review and merging.

Citing SAM 2

If you use SAM 2 or the SA-V dataset in your research, cite the following:

@article{ravi2024sam2,
  title={SAM 2: Segment Anything in Images and Videos},
  author={Ravi, Nikhila and Gabeur, Valentin and Hu, Yuan-Ting and Hu, Ronghang and Ryali, Chaitanya and Ma, Tengyu and Khedr, Haitham and R{\"a}dle, Roman and Rolland, Chloe and Gustafson, Laura and Mintun, Eric and Pan, Junting and Alwala, Kalyan Vasudev and Carion, Nicolas and Wu, Chao-Yuan and Girshick, Ross and Doll{\'a}r, Piotr and Feichtenhofer, Christoph},
  journal={arXiv preprint},
  year={2024}
}