You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from PIL import Image
import requests
from transformers import CLIPSegProcessor, CLIPSegForImageSegmentation
url = "https://github.com/timojl/clipseg/blob/master/example_image.jpg?raw=true"
image = Image.open(requests.get(url, stream=True).raw)
processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined")
prompts = ["a glass", "something to fill", "wood", "a jar"]
inputs = processor(text=prompts, images=[image] * len(prompts), padding="max_length", return_tensors="pt")
The sample image and model loads fine, but then I get the following error when calling processor():
Unused or unrecognized kwargs: padding.
The text was updated successfully, but these errors were encountered:
jferments
changed the title
Unused or unrecognized kwargs: padding when running notebook example
"Unused or unrecognized kwargs: padding" error when running notebook example
May 2, 2024
When I run the code from the example notebook Zero_shot_image_segmentation_with_CLIPSeg.ipynb:
The sample image and model loads fine, but then I get the following error when calling processor():
Unused or unrecognized kwargs: padding.
The text was updated successfully, but these errors were encountered: