add powerpaint v2

This commit is contained in:
Qing
2024-04-24 20:22:29 +08:00
parent ccea072dc5
commit 911f7224b6
14 changed files with 8082 additions and 2318 deletions

View File

@@ -3,9 +3,8 @@ import cv2
import pytest
import torch
from iopaint.helper import encode_pil_to_base64
from iopaint.schema import LDMSampler, HDStrategy, InpaintRequest, SDSampler
from PIL import Image
import numpy as np
current_dir = Path(__file__).parent.absolute().resolve()
save_dir = current_dir / "result"
@@ -32,6 +31,7 @@ def assert_equal(
):
img, mask = get_data(fx=fx, fy=fy, img_p=img_p, mask_p=mask_p)
print(f"Input image shape: {img.shape}")
res = model(img, mask, config)
ok = cv2.imwrite(
str(save_dir / gt_name),