Fix incorrect param checking logic

pull/72/head
Justin Hirsch 2023-06-23 09:00:21 -07:00
parent 0a6a3225fb
commit fae808d5a8
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ def swap_face(
source_img = cv2.cvtColor(np.array(source_img), cv2.COLOR_RGB2BGR)
target_img = cv2.cvtColor(np.array(target_img), cv2.COLOR_RGB2BGR)
source_face = get_face_single(source_img, face_index=source_faces_index[0])
if len(source_faces_index) != 0 or len(source_faces_index) != 1 or len(source_faces_index) != len(faces_index):
if len(source_faces_index) != 0 and len(source_faces_index) != 1 and len(source_faces_index) != len(faces_index):
logger.info(f'Source Faces must have no entries (default=0), one entry, or same number of entries as target faces.')
elif source_face is not None:
result = target_img