mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-18 04:10:11 +08:00
Correct arg type for restore_face
This commit is contained in:
parent
cd12c0e15c
commit
f476649c02
@ -36,7 +36,7 @@ def create_face_helper(device) -> FaceRestoreHelper:
|
|||||||
def restore_with_face_helper(
|
def restore_with_face_helper(
|
||||||
np_image: np.ndarray,
|
np_image: np.ndarray,
|
||||||
face_helper: FaceRestoreHelper,
|
face_helper: FaceRestoreHelper,
|
||||||
restore_face: Callable[[np.ndarray], np.ndarray],
|
restore_face: Callable[[torch.Tensor], torch.Tensor],
|
||||||
) -> np.ndarray:
|
) -> np.ndarray:
|
||||||
"""
|
"""
|
||||||
Find faces in the image using face_helper, restore them using restore_face, and paste them back into the image.
|
Find faces in the image using face_helper, restore them using restore_face, and paste them back into the image.
|
||||||
@ -126,7 +126,7 @@ class CommonFaceRestoration(face_restoration.FaceRestoration):
|
|||||||
def restore_with_helper(
|
def restore_with_helper(
|
||||||
self,
|
self,
|
||||||
np_image: np.ndarray,
|
np_image: np.ndarray,
|
||||||
restore_face: Callable[[np.ndarray], np.ndarray],
|
restore_face: Callable[[torch.Tensor], torch.Tensor],
|
||||||
) -> np.ndarray:
|
) -> np.ndarray:
|
||||||
try:
|
try:
|
||||||
if self.net is None:
|
if self.net is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user