-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] jsonschema.exceptions.ValidationError: '{}' is not of type 'array' #615
Comments
I have the same issue. switching to sam raises the bug |
Stumbled on this today. This seems to be a bug in sam.py, where
But the reason this bug went undiscovered is that you're supposed to tell sam what to segment, passing a prompt, for example:
|
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When switching from isnet-general-use to sam. Encountered the following bug
` File "/Users/XX/opt/anaconda3/envs/genai/lib/python3.11/site-packages/rembg/bg.py", line 257, in remove
masks = session.predict(img, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/XX/opt/anaconda3/envs/genai/lib/python3.11/site-packages/rembg/sessions/sam.py", line 169, in predict
validate(instance=prompt, schema=schema)
File "/Users/XX/opt/anaconda3/envs/genai/lib/python3.11/site-packages/jsonschema/validators.py", line 1312, in validate
raise error
jsonschema.exceptions.ValidationError: '{}' is not of type 'array'
Failed validating 'type' in schema:
{'items': {'properties': {'data': {'items': {'type': 'number'},
'type': 'array'},
'label': {'type': 'integer'},
'type': {'type': 'string'}},
'type': 'object'},
'type': 'array'}
On instance:
'{}'`
To Reproduce
I was using isnet-general-use for a long time and is looking for a better solution so I changed to sam.
Rembg version:
v 2.0.53
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: