Skip to content
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

Error if no masks found #16

Open
nonnull-ca opened this issue Apr 23, 2023 · 1 comment
Open

Error if no masks found #16

nonnull-ca opened this issue Apr 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@nonnull-ca
Copy link

If there are no masks found, this errors out here, due to said reduce having no default value.

I can reproduce this fairly easily:

  1. Leave settings on defaults aside from the below.
  2. Input this image.
  3. Enable Segment Anything & CLIP.
  4. Set SAM model to sam_vit_h_4b8939.pth.
  5. Set predicted_iou_threshold / stability_score_threshold / clip_threshold to 1.
  6. Set a segmentation prompt of 'asdf'.
  7. Enable CascadePSP
  8. Set CascadePSP to fast.
  9. Generate.

(Most of these steps are probably unnecessary. Ditto, I realize that setting a threshold to 1 is somewhat silly.)

Said error is also fairly ungraceful in the UI: a red 'Error' and that's it.

Maybe either a) pass a default all-ones mask or b) if no masks pass the threshold then pick one mask with the highest confidence?

@mattyamonaca mattyamonaca added the bug Something isn't working label Apr 24, 2023
@mattyamonaca
Copy link
Owner

Thanks!
I'll try to modify it in the direction of option B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants