Spaces:
Running
on
T4
Running
on
T4
liuyizhang
commited on
Commit
•
68b6cad
1
Parent(s):
634639d
update app.py
Browse files
app.py
CHANGED
@@ -759,6 +759,7 @@ def run_anything_task(input_image, text_prompt, task_type, inpaint_prompt, box_t
|
|
759 |
if task_type in ['outpainting']:
|
760 |
# reverse mask
|
761 |
img_arr = np.array(image_mask_for_inpaint)
|
|
|
762 |
img_arr = 1 - img_arr
|
763 |
image_mask_for_inpaint = Image.fromarray(255*img_arr.astype('uint8'))
|
764 |
output_images.append(image_mask_for_inpaint.convert("RGB"))
|
|
|
759 |
if task_type in ['outpainting']:
|
760 |
# reverse mask
|
761 |
img_arr = np.array(image_mask_for_inpaint)
|
762 |
+
img_arr = np.where(img_arr > 0, 1, img_arr)
|
763 |
img_arr = 1 - img_arr
|
764 |
image_mask_for_inpaint = Image.fromarray(255*img_arr.astype('uint8'))
|
765 |
output_images.append(image_mask_for_inpaint.convert("RGB"))
|