Add local SAM model support for offline Smart Select
- Add torch, torchvision, segment-anything to requirements - Create download_sam_model.py script to fetch SAM checkpoint - Update tools.py to use local SAM with Replicate API fallback - Add SAM model check to entrypoint.sh with helpful instructions - Model persists in /app/data/models via Docker volume mount
This commit is contained in:
@@ -16,3 +16,7 @@ opencv-python-headless==4.9.0.80
|
||||
scikit-image==0.22.0
|
||||
rembg==2.0.50
|
||||
onnxruntime==1.16.3
|
||||
# SAM (Segment Anything) for smart object selection - runs locally, no API needed
|
||||
torch==2.1.2
|
||||
torchvision==0.16.2
|
||||
segment-anything @ git+https://github.com/facebookresearch/segment-anything.git
|
||||
|
||||
Reference in New Issue
Block a user