Spaces:
Runtime error
Runtime error
Update tasks/ref_in.py
Browse files- tasks/ref_in.py +1 -1
tasks/ref_in.py
CHANGED
@@ -58,7 +58,7 @@ def referring_inpainting(model, image, texts, inpainting_text, *args, **kwargs):
|
|
58 |
|
59 |
if inpainting_text not in ['no', '']:
|
60 |
# if we want to do inpainting
|
61 |
-
image_crop = crop_image(image_ori
|
62 |
struct2 = ndimage.generate_binary_structure(2, 2)
|
63 |
mask_dilated = ndimage.binary_dilation(grd_mask[0], structure=struct2, iterations=3).astype(grd_mask[0].dtype)
|
64 |
mask = crop_image(Image.fromarray(mask_dilated * 255).convert('RGB'))
|
|
|
58 |
|
59 |
if inpainting_text not in ['no', '']:
|
60 |
# if we want to do inpainting
|
61 |
+
image_crop = crop_image(image_ori)
|
62 |
struct2 = ndimage.generate_binary_structure(2, 2)
|
63 |
mask_dilated = ndimage.binary_dilation(grd_mask[0], structure=struct2, iterations=3).astype(grd_mask[0].dtype)
|
64 |
mask = crop_image(Image.fromarray(mask_dilated * 255).convert('RGB'))
|