bump gradio to 3.16.1

This commit is contained in:
AUTOMATIC 2023-01-14 13:38:10 +03:00
parent febd2b722e
commit 6eb72fd13f
5 changed files with 49 additions and 28 deletions

View File

@ -605,7 +605,7 @@ def create_ui():
setup_progressbar(progressbar, txt2img_preview, 'txt2img')
with gr.Row().style(equal_height=False):
with gr.Column(variant='panel', elem_id="txt2img_settings"):
with gr.Column(variant='compact', elem_id="txt2img_settings"):
for category in ordered_ui_categories():
if category == "sampler":
steps, sampler_index = create_sampler_and_steps_selection(samplers, "txt2img")
@ -794,7 +794,7 @@ def create_ui():
setup_progressbar(progressbar, img2img_preview, 'img2img')
with FormRow().style(equal_height=False):
with gr.Column(variant='panel', elem_id="img2img_settings"):
with gr.Column(variant='compact', elem_id="img2img_settings"):
with gr.Tabs(elem_id="mode_img2img"):
with gr.TabItem('img2img', id='img2img', elem_id="img2img_img2img_tab") as tab_img2img:
init_img = gr.Image(label="Image for img2img", elem_id="img2img_image", show_label=False, source="upload", interactive=True, type="pil", tool="editor", image_mode="RGBA").style(height=480)
@ -1026,7 +1026,7 @@ def create_ui():
with gr.Blocks(analytics_enabled=False) as extras_interface:
with gr.Row().style(equal_height=False):
with gr.Column(variant='panel'):
with gr.Column(variant='compact'):
with gr.Tabs(elem_id="mode_extras"):
with gr.TabItem('Single Image', elem_id="extras_single_tab"):
extras_image = gr.Image(label="Source", source="upload", interactive=True, type="pil", elem_id="extras_image")
@ -1127,8 +1127,8 @@ def create_ui():
with gr.Blocks(analytics_enabled=False) as modelmerger_interface:
with gr.Row().style(equal_height=False):
with gr.Column(variant='panel'):
gr.HTML(value="<p>A merger of the two checkpoints will be generated in your <b>checkpoint</b> directory.</p>")
with gr.Column(variant='compact'):
gr.HTML(value="<p style='margin-bottom: 2.5em'>A merger of the two checkpoints will be generated in your <b>checkpoint</b> directory.</p>")
with FormRow():
primary_model_name = gr.Dropdown(modules.sd_models.checkpoint_tiles(), elem_id="modelmerger_primary_model_name", label="Primary model (A)")
@ -1150,6 +1150,7 @@ def create_ui():
config_source = gr.Radio(choices=["A, B or C", "B", "C", "Don't"], value="A, B or C", label="Copy config from", type="index", elem_id="modelmerger_config_method")
with gr.Row():
modelmerger_merge = gr.Button(elem_id="modelmerger_merge", value="Merge", variant='primary')
with gr.Column(variant='panel'):

View File

@ -5,7 +5,7 @@ fairscale==0.4.4
fonts
font-roboto
gfpgan
gradio==3.15.0
gradio==3.16.1
invisible-watermark
numpy
omegaconf

View File

@ -3,7 +3,7 @@ transformers==4.19.2
accelerate==0.12.0
basicsr==1.4.2
gfpgan==1.3.8
gradio==3.15.0
gradio==3.16.1
numpy==1.23.3
Pillow==9.4.0
realesrgan==0.3.0

View File

@ -221,7 +221,10 @@ fieldset span.text-gray-500, .gr-block.gr-box span.text-gray-500, label.block s
.dark fieldset span.text-gray-500, .dark .gr-block.gr-box span.text-gray-500, .dark label.block span{
background-color: rgb(31, 41, 55);
box-shadow: 6px 0 6px 0px rgb(31, 41, 55), -6px 0 6px 0px rgb(31, 41, 55);
box-shadow: none;
border: 1px solid rgba(128, 128, 128, 0.1);
border-radius: 6px;
padding: 0.1em 0.5em;
}
#txt2img_column_batch, #img2img_column_batch{
@ -509,29 +512,20 @@ input[type="range"]{
}
#quicksettings > div{
border: none;
background: none;
flex: unset;
gap: 1em;
}
#quicksettings > div > div{
max-width: 32em;
max-width: 24em;
min-width: 24em;
padding: 0;
border: none;
box-shadow: none;
background: none;
}
#quicksettings > div > div > div > div > label > span {
#quicksettings > div > div > div > label > span {
position: relative;
margin-right: 9em;
margin-bottom: -1em;
}
#quicksettings > div > div > label > span {
position: relative;
margin-bottom: -1em;
}
canvas[key="mask"] {
z-index: 12 !important;
filter: invert();
@ -666,7 +660,10 @@ footer {
font-weight: bold;
}
#txt2img_checkboxes > div > div{
#txt2img_checkboxes, #img2img_checkboxes{
margin-bottom: 0.5em;
}
#txt2img_checkboxes > div > div, #img2img_checkboxes > div > div{
flex: 0;
white-space: nowrap;
min-width: auto;
@ -676,6 +673,30 @@ footer {
opacity: 0.5;
}
.gr-compact {
border: none;
padding-top: 1em;
}
.dark .gr-compact{
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
margin-left: 0.8em;
}
.gr-compact > *{
margin-top: 0.5em !important;
}
.gr-compact .gr-block, .gr-compact .gr-form{
border: none;
box-shadow: none;
}
.gr-compact .gr-box{
border-radius: .5rem !important;
border-width: 1px !important;
}
/* The following handles localization for right-to-left (RTL) languages like Arabic.
The rtl media type will only be activated by the logic in javascript/localization.js.
If you change anything above, you need to make sure it is RTL compliant by just running

View File

@ -157,7 +157,7 @@ def webui():
shared.demo = modules.ui.create_ui()
app, local_url, share_url = shared.demo.queue(default_enabled=False).launch(
app, local_url, share_url = shared.demo.launch(
share=cmd_opts.share,
server_name=server_name,
server_port=cmd_opts.port,
@ -185,7 +185,6 @@ def webui():
create_api(app)
modules.script_callbacks.app_started_callback(shared.demo, app)
modules.script_callbacks.app_started_callback(shared.demo, app)
wait_on_server(shared.demo)
print('Restarting UI...')