assistanttttttt commited on
Commit
267790e
·
1 Parent(s): 20a39a8

Improve Txt2Img layout: use Row for model/run and align components like other tabs

Browse files
Files changed (1) hide show
  1. ui/shared/txt2img_ui.py +10 -9
ui/shared/txt2img_ui.py CHANGED
@@ -19,15 +19,16 @@ def create_ui():
19
  components.update(create_model_architecture_filter_ui(prefix))
20
 
21
  # Layout for model selection and run button
22
- components.update(create_category_filter_ui(prefix))
23
- components[f'base_model_{prefix}'] = gr.Dropdown(
24
- label="Base Model",
25
- choices=list(MODEL_MAP_CHECKPOINT.keys()),
26
- value=list(MODEL_MAP_CHECKPOINT.keys())[0],
27
- scale=3,
28
- allow_custom_value=True,
29
- )
30
- components[f'run_{prefix}'] = gr.Button("Run", variant="primary")
 
31
 
32
  components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3)
33
  components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)
 
19
  components.update(create_model_architecture_filter_ui(prefix))
20
 
21
  # Layout for model selection and run button
22
+ with gr.Row():
23
+ components.update(create_category_filter_ui(prefix))
24
+ components[f'base_model_{prefix}'] = gr.Dropdown(
25
+ label="Base Model",
26
+ choices=list(MODEL_MAP_CHECKPOINT.keys()),
27
+ value=list(MODEL_MAP_CHECKPOINT.keys())[0],
28
+ scale=3,
29
+ allow_custom_value=True,
30
+ )
31
+ components[f'run_{prefix}'] = gr.Button("Run", variant="primary")
32
 
33
  components[f'prompt_{prefix}'] = gr.Text(label="Prompt", lines=3)
34
  components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)