Skip to content

Commit

Permalink
Fixed Training information is obscured by the image AUTOMATIC1111#7
Browse files Browse the repository at this point in the history
added small green dot to the upper left when components are updated layout improvements on train settings
  • Loading branch information
anapnoe committed Mar 20, 2023
1 parent 4777297 commit 787bd39
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 18 deletions.
30 changes: 13 additions & 17 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,12 +1156,12 @@ def update_interp_description(value):

gr.Row(elem_id="ti_2img_prompt_image", visible=False)
with gr.Row():
with gr.Column(elem_id="ti_2img_results"):
with gr.Column(elem_id='ti_gallery_container'):
ti_output = gr.Text(elem_id="ti_output", value="", show_label=False)
ti_gallery = gr.Gallery(label='Output', show_label=False, elem_id='ti_gallery').style(grid=4)
with gr.Column(elem_id="ti_2img_results"):
with gr.Column(elem_id='ti_gallery_container'):
ti_gallery = gr.Gallery(label='Output', show_label=False, elem_id='ti_gallery').style(grid=4)
ti_progress = gr.HTML(elem_id="ti_progress", value="")
ti_outcome = gr.HTML(elem_id="ti_error", value="")
ti_outcome = gr.HTML(elem_id="ti_error", value="")
ti_output = gr.Text(elem_id="ti_output", value="", show_label=False)
gr.Row(elem_id="ti_2img_splitter")
with gr.Tabs(elem_id="train_tabs_2img_settings"):
with gr.Tab(label="Create embedding"):
Expand All @@ -1171,14 +1171,12 @@ def update_interp_description(value):
initialization_text = gr.Textbox(label="Initialization text", value="*", elem_id="train_initialization_text")
nvpt = gr.Slider(label="Number of vectors per token", minimum=1, maximum=75, step=1, value=1, elem_id="train_nvpt")
overwrite_old_embedding = gr.Checkbox(value=False, label="Overwrite Old Embedding", elem_id="train_overwrite_old_embedding")

with gr.Row():
with gr.Column(scale=3):
gr.HTML(value="")

with gr.Column():
create_embedding = gr.Button(value="Create embedding", variant='primary', elem_id="train_create_embedding")

with gr.Row():
gr.HTML(value="")

with gr.Tab(label="Create hypernetwork"):
#create_hypernetwork = gr.Button(value="Create hypernetwork", variant='primary', elem_id="train_create_hypernetwork")
Expand All @@ -1194,11 +1192,10 @@ def update_interp_description(value):
overwrite_old_hypernetwork = gr.Checkbox(value=False, label="Overwrite Old Hypernetwork", elem_id="train_overwrite_old_hypernetwork")

with gr.Row():
with gr.Column(scale=3):
gr.HTML(value="")

with gr.Column():
create_hypernetwork = gr.Button(value="Create hypernetwork", variant='primary', elem_id="train_create_hypernetwork")
with gr.Row():
gr.HTML(value="")

with gr.Tab(label="Preprocess images"):
# with gr.Column():
Expand Down Expand Up @@ -1241,15 +1238,14 @@ def update_interp_description(value):
with gr.Row():
process_multicrop_objective = gr.Radio(["Maximize area", "Minimize error"], value="Maximize area", label="Resizing objective", elem_id="train_process_multicrop_objective")
process_multicrop_threshold = gr.Slider(minimum=0, maximum=1, step=0.01, label="Error threshold", value=0.1, elem_id="train_process_multicrop_threshold")

with gr.Row():
with gr.Column(scale=3):
gr.HTML(value="")

with gr.Column():
with gr.Row():
interrupt_preprocessing = gr.Button("Interrupt", elem_id="train_interrupt_preprocessing")
run_preprocess = gr.Button(value="Preprocess", variant='primary', elem_id="train_run_preprocess")
with gr.Row():
gr.HTML(value="")

process_split.change(
fn=lambda show: gr_show(show),
Expand Down
107 changes: 106 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2576,6 +2576,97 @@ ul.list-none {
padding-right: 16px;
}

/* train */
#tab_ti .gr-box:not(input, select, label, [id*="collapse"] > *){
min-width:256px;
}
#ti_2img_splitter,
#ti_2img_results{
margin-top:42px;
}
#train_tabs_2img_settings > div:first-child{
width:calc(100vw - (var(--container-padding) * 2 ) - 4px);
}
#train_tabs_2img_settings .gr-button-primary{
min-height: var(--generate-button-height);
}
#ti_output{
padding:0;
border: 0;
background:0;
}
#ti_output label span{
display:none;
}
.cover-bg
{
background-color: transparent !important;
}
[id^="setting_"] > div.wrap.svelte-5usjvi.inset-0
{
height:5px;
}
.eta-bar.svelte-5usjvi{
background-color:var(--primary-color) !important;
width:5px;
height:5px;
position:absolute;
top:2px;
left:2px;
border-radius:50%;
}
[id*="sd_vae"] div.eta-bar.svelte-5usjvi,
[id*="sd_model_checkpoint"] div.eta-bar.svelte-5usjvi{
width:100%;
left:0;
top:0;
border-radius:0;
height:2px;
}

#tab_ti .meta-text{
background-color:var(--main-bg-color);

}
#tab_ti .livePreview,
#tab_ti .livePreview.init {
position: relative !important;
min-height: calc(var(--container-height-gap) - 260px ) !important;
width: auto !important;
left: 0;
top: 0;
max-height: unset !important;
}
#ti_gallery_container > div{
background-color:transparent !important;
position:initial !important;
}
#ti_gallery_container > div.gr-form{
border:0;
}
#ti_output div{
background-color:transparent !important;
position:initial !important;
margin:0;
}
#ti_gallery_container textarea{
height: auto !important;
display: inline-table;
background: 0;
border: 0;
padding: 0;
margin-top: 8px;
color:var(--primary-color);
}
#ti_gallery{
display:none;
}
#ti_gallery_container{
overflow-y: auto;
max-height: calc(var(--container-height-gap) - 60px);
}



/******************/
/* extra-network-cards */
Expand Down Expand Up @@ -3472,7 +3563,21 @@ ul.list-none {
margin-right: 8px;
}


#ti_2img_splitter,
#ti_2img_results{
margin-top:0;
}
#train_tabs_2img_settings > div:first-child{
width:100%;
}

#tab_ti .livePreview,
#tab_ti .livePreview.init {
min-height: unset !important;
}
#ti_gallery_container {
max-height: unset !important;
}


}
Expand Down

0 comments on commit 787bd39

Please sign in to comment.