multimodalart HF staff commited on
Commit
6130cf9
1 Parent(s): 5435da9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -90,7 +90,7 @@ hf_hub_download(
90
  local_dir="/data/checkpoints",
91
  )
92
  # download antelopev2
93
- if not os.path.exists("/data/models/scrfd_10g_bnkps.onnx"):
94
  gdown.download(url="https://drive.google.com/file/d/18wEUfMNohBJ4K3Ly5wpTejPfDzp-8fI8/view?usp=sharing", output="/data/", quiet=False, fuzzy=True)
95
  os.system("unzip /data/antelopev2.zip -d /data/models/")
96
 
@@ -432,18 +432,17 @@ with gr.Blocks(css="custom.css") as demo:
432
  queue=False,
433
  show_progress=False
434
  )
435
- photo.change(
436
- fn=center_crop_image_as_square,
437
- inputs=[photo],
438
- outputs=[photo],
439
- queue=False,
440
- show_progress=False,
441
- )
442
  prompt.submit(
443
  fn=check_selected,
444
  inputs=[selected_state],
445
  queue=False,
446
  show_progress=False
 
 
 
 
 
 
447
  ).success(
448
  fn=run_lora,
449
  inputs=[photo, prompt, negative, weight, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, gr_sdxl_loras, gr_sdxl_loras_new],
@@ -454,6 +453,12 @@ with gr.Blocks(css="custom.css") as demo:
454
  inputs=[selected_state],
455
  queue=False,
456
  show_progress=False
 
 
 
 
 
 
457
  ).success(
458
  fn=run_lora,
459
  inputs=[photo, prompt, negative, weight, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, gr_sdxl_loras, gr_sdxl_loras_new],
 
90
  local_dir="/data/checkpoints",
91
  )
92
  # download antelopev2
93
+ if not os.path.exists("/data/antelopev2.zip"):
94
  gdown.download(url="https://drive.google.com/file/d/18wEUfMNohBJ4K3Ly5wpTejPfDzp-8fI8/view?usp=sharing", output="/data/", quiet=False, fuzzy=True)
95
  os.system("unzip /data/antelopev2.zip -d /data/models/")
96
 
 
432
  queue=False,
433
  show_progress=False
434
  )
 
 
 
 
 
 
 
435
  prompt.submit(
436
  fn=check_selected,
437
  inputs=[selected_state],
438
  queue=False,
439
  show_progress=False
440
+ ).success(
441
+ fn=center_crop_image_as_square,
442
+ inputs=[photo],
443
+ outputs=[photo],
444
+ queue=False,
445
+ show_progress=False,
446
  ).success(
447
  fn=run_lora,
448
  inputs=[photo, prompt, negative, weight, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, gr_sdxl_loras, gr_sdxl_loras_new],
 
453
  inputs=[selected_state],
454
  queue=False,
455
  show_progress=False
456
+ ).success(
457
+ fn=center_crop_image_as_square,
458
+ inputs=[photo],
459
+ outputs=[photo],
460
+ queue=False,
461
+ show_progress=False,
462
  ).success(
463
  fn=run_lora,
464
  inputs=[photo, prompt, negative, weight, selected_state, face_strength, image_strength, guidance_scale, depth_control_scale, gr_sdxl_loras, gr_sdxl_loras_new],