Fucius commited on
Commit
f389568
1 Parent(s): 267b2a7

Update src/pipelines/instantid_pipeline.py

Browse files
src/pipelines/instantid_pipeline.py CHANGED
@@ -763,6 +763,6 @@ def get_face_embedding(face_app, ref_images):
763
  face_info = face_app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
764
  face_info = sorted(face_info, key=lambda x: (x['bbox'][2] - x['bbox'][0]) * x['bbox'][3] - x['bbox'][1])[0] # only use the maximum face
765
  face_emb = face_info['embedding']
766
- emb_list.append(face_emb.cuda())
767
  # face_kps = draw_kps(face_image, face_info['kps'])
768
  return emb_list
 
763
  face_info = face_app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
764
  face_info = sorted(face_info, key=lambda x: (x['bbox'][2] - x['bbox'][0]) * x['bbox'][3] - x['bbox'][1])[0] # only use the maximum face
765
  face_emb = face_info['embedding']
766
+ emb_list.append(face_emb)
767
  # face_kps = draw_kps(face_image, face_info['kps'])
768
  return emb_list