jbilcke-hf HF Staff commited on
Commit
13fc876
·
verified ·
1 Parent(s): 0c47721

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -310,7 +310,7 @@ def generate_image(prompt, negative, face_emb, face_image, face_kps, image_stren
310
  return image
311
 
312
  def run_lora(face_image, prompt, negative, lora_scale, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, lora_repo_name):
313
- # get the lora and its defaulrt values
314
  lora = getLoraByRepoName(lora_repo_name)
315
  default_values = getLoraDefaultsByRepoName(lora_repo_name)
316
 
@@ -319,6 +319,11 @@ def run_lora(face_image, prompt, negative, lora_scale, selected_state, face_stre
319
  face_image = readb64(face_image)
320
 
321
  face_image = center_crop_image_as_square(face_image)
 
 
 
 
 
322
  try:
323
  face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
324
  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
 
310
  return image
311
 
312
  def run_lora(face_image, prompt, negative, lora_scale, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, lora_repo_name):
313
+ # get the lora and its default values
314
  lora = getLoraByRepoName(lora_repo_name)
315
  default_values = getLoraDefaultsByRepoName(lora_repo_name)
316
 
 
319
  face_image = readb64(face_image)
320
 
321
  face_image = center_crop_image_as_square(face_image)
322
+
323
+ # this is temporary, just to debug
324
+ return writeb64(face_image)
325
+
326
+
327
  try:
328
  face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
329
  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