multimodalart HF staff commited on
Commit
cf23ea6
1 Parent(s): a1d62c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -216,7 +216,7 @@ def merge_incompatible_lora(full_path_lora, lora_scale):
216
  def run_lora(face_image, prompt, negative, lora_scale, selected_state, sdxl_loras, sdxl_loras_new, progress=gr.Progress(track_tqdm=True)):
217
  global last_lora, last_merged, last_fused, pipe
218
 
219
- face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
220
  face_info = sorted(face_info, key=lambda x:(x['bbox'][2]-x['bbox'][0])*x['bbox'][3]-x['bbox'][1])[-1] # only use the maximum face
221
  face_emb = face_info['embedding']
222
  face_kps = draw_kps(face_image, face_info['kps'])
 
216
  def run_lora(face_image, prompt, negative, lora_scale, selected_state, sdxl_loras, sdxl_loras_new, progress=gr.Progress(track_tqdm=True)):
217
  global last_lora, last_merged, last_fused, pipe
218
 
219
+ face_info = app.get(cv2.cvtColor(face_image, cv2.COLOR_RGB2BGR))
220
  face_info = sorted(face_info, key=lambda x:(x['bbox'][2]-x['bbox'][0])*x['bbox'][3]-x['bbox'][1])[-1] # only use the maximum face
221
  face_emb = face_info['embedding']
222
  face_kps = draw_kps(face_image, face_info['kps'])