multimodalart HF staff commited on
Commit
79c44a3
1 Parent(s): 6ba990e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -207,8 +207,11 @@ def merge_incompatible_lora(full_path_lora, lora_scale):
207
 
208
  def run_lora(images, prompt, negative, lora_scale, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, sdxl_loras, progress=gr.Progress(track_tqdm=True)):
209
  global last_lora, last_merged, last_fused, pipe
 
 
210
  face_image = images[0]
211
  face_image = center_crop_image_as_square(face_image)
 
212
  face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
213
  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
214
  face_emb = face_info['embedding']
 
207
 
208
  def run_lora(images, prompt, negative, lora_scale, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, sdxl_loras, progress=gr.Progress(track_tqdm=True)):
209
  global last_lora, last_merged, last_fused, pipe
210
+ print("Images:", images)
211
+ print("Face image", images[0])
212
  face_image = images[0]
213
  face_image = center_crop_image_as_square(face_image)
214
+ print("Cropped image:", face_image)
215
  face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
216
  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
217
  face_emb = face_info['embedding']