Spaces:
Runtime error
Runtime error
Commit
•
9523e17
1
Parent(s):
74364bb
Update app.py
Browse files
app.py
CHANGED
@@ -215,7 +215,7 @@ def merge_incompatible_lora(full_path_lora, lora_scale):
|
|
215 |
|
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 |
-
face_info = app.get(cv2.cvtColor(np.array(face_image)
|
219 |
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
|
220 |
face_emb = face_info['embedding']
|
221 |
face_kps = draw_kps(face_image, face_info['kps'])
|
|
|
215 |
|
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 |
+
face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
|
219 |
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
|
220 |
face_emb = face_info['embedding']
|
221 |
face_kps = draw_kps(face_image, face_info['kps'])
|