update node exception

This commit is contained in:
toto
2024-03-07 14:45:08 +08:00
parent f233cae900
commit fde067c9f5
+1 -2
View File
@@ -78,9 +78,8 @@ class FaceFusionPM:
if len(faces) == 0:
raise RuntimeError("No face was recognized in the source image / source image 没有识别到人脸")
if len(swap_faces) == 0:
swap_faces = faces
print("No face was recognized in the swap faces / swap faces没有识别到人脸, 用原脸替换!!!!!!!!!")
#raise RuntimeError("No face was recognized in the swap faces / swap faces没有识别到人脸")
return (source_image,)
result_image = get_roop().get(source_np, faces[0], swap_faces[0], paste_back=True)
if need_resize:
image = Image.fromarray(result_image)