multimodalart HF staff commited on
Commit
2bf7ead
·
verified ·
1 Parent(s): 42db667

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -31
app.py CHANGED
@@ -462,7 +462,6 @@ css = """
462
  with gr.Blocks(css=css) as demo:
463
  # description
464
  gr.Markdown(title)
465
- gr.Markdown(description)
466
 
467
  with gr.Row():
468
  with gr.Column():
@@ -471,11 +470,6 @@ with gr.Blocks(css=css) as demo:
471
  face_file = gr.Image(
472
  label="Upload a photo of your face", type="filepath"
473
  )
474
- # optional: upload a reference pose image
475
- pose_file = gr.Image(
476
- label="Upload a reference pose image (Optional)",
477
- type="filepath",
478
- )
479
 
480
  # prompt
481
  prompt = gr.Textbox(
@@ -486,32 +480,38 @@ with gr.Blocks(css=css) as demo:
486
  )
487
 
488
  submit = gr.Button("Submit", variant="primary")
489
- enable_LCM = gr.Checkbox(
490
- label="Enable Fast Inference with LCM", value=enable_lcm_arg,
491
- info="LCM speeds up the inference step, the trade-off is the quality of the generated image. It performs better with portrait face images rather than distant faces",
492
- )
493
- style = gr.Dropdown(
494
- label="Style template",
495
- choices=STYLE_NAMES,
496
- value=DEFAULT_STYLE_NAME,
497
- )
 
498
 
499
- # strength
500
- identitynet_strength_ratio = gr.Slider(
501
- label="IdentityNet strength (for fidelity)",
502
- minimum=0,
503
- maximum=1.5,
504
- step=0.05,
505
- value=0.80,
506
- )
507
- adapter_strength_ratio = gr.Slider(
508
- label="Image adapter strength (for detail)",
509
- minimum=0,
510
- maximum=1.5,
511
- step=0.05,
512
- value=0.80,
513
- )
514
- with gr.Accordion("Controlnet"):
 
 
 
 
 
515
  controlnet_selection = gr.CheckboxGroup(
516
  ["canny", "depth"], label="Controlnet", value=[],
517
  info="Use pose for skeleton inference, canny for edge detection, and depth for depth map estimation. You can try all three to control the generation process"
 
462
  with gr.Blocks(css=css) as demo:
463
  # description
464
  gr.Markdown(title)
 
465
 
466
  with gr.Row():
467
  with gr.Column():
 
470
  face_file = gr.Image(
471
  label="Upload a photo of your face", type="filepath"
472
  )
 
 
 
 
 
473
 
474
  # prompt
475
  prompt = gr.Textbox(
 
480
  )
481
 
482
  submit = gr.Button("Submit", variant="primary")
483
+ with gr.Accordion("Advanced options", open=False):
484
+ enable_LCM = gr.Checkbox(
485
+ label="Enable Fast Inference with LCM", value=enable_lcm_arg,
486
+ info="LCM speeds up the inference step, the trade-off is the quality of the generated image. It performs better with portrait face images rather than distant faces",
487
+ )
488
+ style = gr.Dropdown(
489
+ label="Style template",
490
+ choices=STYLE_NAMES,
491
+ value=DEFAULT_STYLE_NAME,
492
+ )
493
 
494
+ # strength
495
+ identitynet_strength_ratio = gr.Slider(
496
+ label="IdentityNet strength (for fidelity)",
497
+ minimum=0,
498
+ maximum=1.5,
499
+ step=0.05,
500
+ value=0.80,
501
+ )
502
+ adapter_strength_ratio = gr.Slider(
503
+ label="Image adapter strength (for detail)",
504
+ minimum=0,
505
+ maximum=1.5,
506
+ step=0.05,
507
+ value=0.80,
508
+ )
509
+ with gr.Accordion("Controlnet", open=False):
510
+ # optional: upload a reference pose image
511
+ pose_file = gr.Image(
512
+ label="Upload a reference pose image (Optional)",
513
+ type="filepath",
514
+ )
515
  controlnet_selection = gr.CheckboxGroup(
516
  ["canny", "depth"], label="Controlnet", value=[],
517
  info="Use pose for skeleton inference, canny for edge detection, and depth for depth map estimation. You can try all three to control the generation process"