geekyutao / Inpaint-Anything

Inpaint anything using Segment Anything and inpainting models.
Apache License 2.0
6.4k stars 525 forks source link

Errors while uploading images to gradio demo #117

Open Nineves opened 11 months ago

Nineves commented 11 months ago
  File "/home/codes/Inpaint-Anything/app/app.py", line 151, in process_image_click
    input_image = np.array(original_image, dtype=np.uint8)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

It seems the original_image is None and not successfully uploaded. May I know the gradio version that can successfully run the demo? I'm using gradio 4.0.2

hoangpg1002 commented 11 months ago

I have same problem. Do you have any fix?

RupertLuo commented 10 months ago

I have same problem. Do you have any fix?

CREED404 commented 10 months ago

it's because you need to generate a mask image of the object that you want to inpaint or segment first with SAM and upload it in addition to the original image

Nineves commented 10 months ago

I have same problem. Do you have any fix?

in app.py changedsource_image_click.uploadto source_image_click.change