How to use facebook/sam2-hiera-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("mask-generation", model="facebook/sam2-hiera-small")
# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("facebook/sam2-hiera-small") model = AutoModel.from_pretrained("facebook/sam2-hiera-small")
What is a pickle import?