ComfyUI Segment Anything
The ComfyUI Segment Anything project is a derivative of the sd-webui-segment-anything
project created by continue-revolution. This project focuses on implementing the most essential functionalities from its predecessor, offering users a streamlined version while maintaining consistency with the original in terms of output.
Key Features
ComfyUI Segment Anything delivers a set of core features derived from the sd-webui-segment-anything project. Users can be assured that the outputs produced by this version will match those of the original when given the same input, providing reliability and consistency for those familiar with the original project.
Getting Started
To begin using this project, ensure the required Python dependencies are installed. Run the following command in your development environment:
pip3 install -r requirements.txt
This step will ensure all necessary packages are available for the software to function correctly.
Model Management
The project features automatic downloading of necessary models, though users have the option to download them manually if desired. Here is how you can manage these models:
bert-base-uncased
Users may download this model from Hugging Face. The files should be placed into a models/bert-base-uncased
directory within the ComfyUI root directory. If skipped, this model will be automatically downloaded during inference using the transformers
library, often placed in the directory ~/.cache/huggingface/hub/models--bert-base-uncased
.
GroundingDino
Models should be directly downloaded into the models/grounding-dino
directory without altering file names. The project supports two model versions:
- GroundingDINO_SwinT_OGC: With a size of 694MB, downloaded here for the config file and here for the model.
- GroundingDINO_SwinB: At 938MB, downloadable here for the config file and here for the model.
SAM Models
Models must be downloaded to the models/sams
directory with file names left unchanged. Options include:
- sam_vit_h (2.56GB): Download link
- sam_vit_l (1.25GB): Download link
- sam_vit_b (375MB): Download link
- sam_hq_vit_h (2.57GB): Download link
- sam_hq_vit_l (1.25GB): Download link
- sam_hq_vit_b (379MB): Download link
- mobile_sam (39MB): Download link
Additionally, if automatic downloads are slow, configuring HTTP_PROXY
and HTTPS_PROXY
environment variables for a proxy can facilitate faster downloads.
Contribution Guidelines
The ComfyUI Segment Anything project invites contributions from anyone interested. Whether it's fixing minor issues or adding significant features, all contributions are appreciated. Contributors are encouraged to fork the repository, make changes, and submit pull requests for review. This collaborative spirit is crucial for the continued growth and refinement of the project.
This introduction provides a comprehensive overview of what users can expect from the ComfyUI Segment Anything project, ensuring they understand its capacities and how to get involved.