fix resize mask bug

This commit is contained in:
Qing 2022-09-02 11:08:32 +08:00
parent 38c8837af7
commit 9ccc577be2
2 changed files with 2 additions and 3 deletions

View File

@ -93,7 +93,7 @@ class InpaintModel:
(origin_size[1], origin_size[0]),
interpolation=cv2.INTER_CUBIC)
original_pixel_indices = mask != 255
original_pixel_indices = mask < 127
inpaint_result[original_pixel_indices] = image[:, :, ::-1][original_pixel_indices]
if inpaint_result is None:

View File

@ -1126,8 +1126,7 @@ class Generator(torch.nn.Module):
FCF_MODEL_URL = os.environ.get(
"FCF_MODEL_URL",
# "https://github.com/Sanster/models/releases/download/add_mat/Places_512_FullData_G.pth",
"/Users/qing/code/github/FcF-Inpainting/places_512_G.pth"
"https://github.com/Sanster/models/releases/download/add_fcf/places_512_G.pth",
)