Spaces:
Paused
Paused
Commit
•
31116fd
1
Parent(s):
cf23ea6
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 |
-
|
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']
|
@@ -409,7 +409,7 @@ with gr.Blocks(css="custom.css") as demo:
|
|
409 |
show_progress=False
|
410 |
).success(
|
411 |
fn=run_lora,
|
412 |
-
inputs=[prompt, negative, weight, selected_state, gr_sdxl_loras, gr_sdxl_loras_new],
|
413 |
outputs=[result, share_group],
|
414 |
)
|
415 |
share_button.click(None, [], [], js=share_js)
|
|
|
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 |
+
print(face_image)
|
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']
|
|
|
409 |
show_progress=False
|
410 |
).success(
|
411 |
fn=run_lora,
|
412 |
+
inputs=[photo, prompt, negative, weight, selected_state, gr_sdxl_loras, gr_sdxl_loras_new],
|
413 |
outputs=[result, share_group],
|
414 |
)
|
415 |
share_button.click(None, [], [], js=share_js)
|