Duplicated from PramaLLC/BEN2
How to use RedbeardNZ/BEN2 with BEN2:
import requests from PIL import Image from ben2 import AutoModel url = "https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg" image = Image.open(requests.get(url, stream=True).raw) model = AutoModel.from_pretrained("RedbeardNZ/BEN2") model.to("cuda").eval() foreground = model.inference(image)
The community tab is the place to discuss and collaborate with the HF community!