storyicon / comfyui_segment_anything

Based on GroundingDino and SAM, use semantic strings to segment any element in an image. The comfyui version of sd-webui-segment-anything.
Apache License 2.0
529 stars 67 forks source link

fixed empty masks and return empty images #59

Open hiowenluke opened 3 months ago

hiowenluke commented 3 months ago

So that the subsequent node(s) can handles empty masks and empty images which returned from segment anything

hiowenluke commented 3 months ago

This PR is for fixing the below bugs:

  1. Occurs errors when join empty image with alpha:

image

image
  1. Occurs errors when combine empty mask:
image image