Ashoka74 commited on
Commit
ef7b64c
1 Parent(s): e864d74

Update app_merged.py

Browse files
Files changed (1) hide show
  1. app_merged.py +74 -70
app_merged.py CHANGED
@@ -1592,78 +1592,82 @@ with gr.Blocks() as app:
1592
 
1593
 
1594
  with gr.Column():
1595
- result_gallery = gr.Gallery(height=832, object_fit='contain', label='Outputs')
1596
- with gr.Group():
1597
- gr.Markdown("Outpaint")
1598
- with gr.Row():
1599
- with gr.Column(scale=2):
1600
- prompt_fill = gr.Textbox(label="Prompt (Optional)")
1601
- with gr.Column(scale=1):
1602
- fill_button = gr.Button("Generate")
1603
- target_ratio = gr.Radio(
1604
- label="Image Ratio",
1605
- choices=["9:16", "16:9", "1:1", "Custom"],
1606
- value="9:16",
1607
- scale=3
1608
- )
1609
- alignment_dropdown = gr.Dropdown(
1610
- choices=["Middle", "Left", "Right", "Top", "Bottom"],
1611
- value="Middle",
1612
- label="Alignment",
1613
- )
1614
- resize_option = gr.Radio(
1615
- label="Resize input image",
1616
- choices=["Full", "75%", "50%", "33%", "25%", "Custom"],
1617
- value="75%"
1618
- )
1619
- custom_resize_percentage = gr.Slider(
1620
- label="Custom resize (%)",
1621
- minimum=1,
1622
- maximum=100,
1623
- step=1,
1624
- value=50,
1625
- visible=False
1626
- )
1627
-
1628
- fill_result = gr.Image(
1629
- interactive=False,
1630
- label="Generated Image",
1631
- )
1632
-
1633
- with gr.Accordion(label="Advanced settings", open=False) as settings_panel:
1634
- with gr.Column():
1635
  with gr.Row():
1636
- width_slider = gr.Slider(
1637
- label="Target Width",
1638
- minimum=720,
1639
- maximum=1536,
1640
- step=8,
1641
- value=720,
1642
- )
1643
- height_slider = gr.Slider(
1644
- label="Target Height",
1645
- minimum=720,
1646
- maximum=1536,
1647
- step=8,
1648
- value=1280,
1649
- )
1650
-
1651
- num_inference_steps = gr.Slider(label="Steps", minimum=2, maximum=50, step=1, value=28)
1652
- with gr.Group():
1653
- overlap_percentage = gr.Slider(
1654
- label="Mask overlap (%)",
1655
- minimum=1,
1656
- maximum=50,
1657
- value=10,
1658
- step=1
1659
- )
1660
- with gr.Row():
1661
- overlap_top = gr.Checkbox(label="Overlap Top", value=True)
1662
- overlap_right = gr.Checkbox(label="Overlap Right", value=True)
1663
- with gr.Row():
1664
- overlap_left = gr.Checkbox(label="Overlap Left", value=True)
1665
- overlap_bottom = gr.Checkbox(label="Overlap Bottom", value=True)
 
 
 
1666
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1667
 
1668
  with gr.Row():
1669
  with gr.Group():
 
1592
 
1593
 
1594
  with gr.Column():
1595
+
1596
+ with gr.Row():
1597
+ with gr.Column(scale=3)
1598
+ result_gallery = gr.Image(height=832, object_fit='contain', label='Outputs')
1599
+ with gr.Column(scale=1)
1600
+ with gr.Group():
1601
+ gr.Markdown("Outpaint")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1602
  with gr.Row():
1603
+ with gr.Column(scale=2):
1604
+ prompt_fill = gr.Textbox(label="Prompt (Optional)")
1605
+ with gr.Column(scale=1):
1606
+ fill_button = gr.Button("Generate")
1607
+ target_ratio = gr.Radio(
1608
+ label="Image Ratio",
1609
+ choices=["9:16", "16:9", "1:1", "Custom"],
1610
+ value="9:16",
1611
+ scale=3
1612
+ )
1613
+ alignment_dropdown = gr.Dropdown(
1614
+ choices=["Middle", "Left", "Right", "Top", "Bottom"],
1615
+ value="Middle",
1616
+ label="Alignment",
1617
+ )
1618
+ resize_option = gr.Radio(
1619
+ label="Resize input image",
1620
+ choices=["Full", "75%", "50%", "33%", "25%", "Custom"],
1621
+ value="75%"
1622
+ )
1623
+ custom_resize_percentage = gr.Slider(
1624
+ label="Custom resize (%)",
1625
+ minimum=1,
1626
+ maximum=100,
1627
+ step=1,
1628
+ value=50,
1629
+ visible=False
1630
+ )
1631
+
1632
+ fill_result = gr.Image(
1633
+ interactive=False,
1634
+ label="Generated Image",
1635
+ )
1636
 
1637
+ with gr.Accordion(label="Advanced settings", open=False) as settings_panel:
1638
+ with gr.Column():
1639
+ with gr.Row():
1640
+ width_slider = gr.Slider(
1641
+ label="Target Width",
1642
+ minimum=720,
1643
+ maximum=1536,
1644
+ step=8,
1645
+ value=720,
1646
+ )
1647
+ height_slider = gr.Slider(
1648
+ label="Target Height",
1649
+ minimum=720,
1650
+ maximum=1536,
1651
+ step=8,
1652
+ value=1280,
1653
+ )
1654
+
1655
+ num_inference_steps = gr.Slider(label="Steps", minimum=2, maximum=50, step=1, value=28)
1656
+ with gr.Group():
1657
+ overlap_percentage = gr.Slider(
1658
+ label="Mask overlap (%)",
1659
+ minimum=1,
1660
+ maximum=50,
1661
+ value=10,
1662
+ step=1
1663
+ )
1664
+ with gr.Row():
1665
+ overlap_top = gr.Checkbox(label="Overlap Top", value=True)
1666
+ overlap_right = gr.Checkbox(label="Overlap Right", value=True)
1667
+ with gr.Row():
1668
+ overlap_left = gr.Checkbox(label="Overlap Left", value=True)
1669
+ overlap_bottom = gr.Checkbox(label="Overlap Bottom", value=True)
1670
+
1671
 
1672
  with gr.Row():
1673
  with gr.Group():