Hermes Bot commited on
Commit
5c1ed6a
·
1 Parent(s): 507359e

Reposition metadata textbox next to gallery in all tabs

Browse files
ui/shared/hires_fix_ui.py CHANGED
@@ -85,9 +85,12 @@ def create_ui():
85
  components[f'height_{prefix}'] = gr.State(value=512)
86
 
87
  with gr.Column(scale=1):
88
- components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=610)
89
- # Textbox for generation info
90
- components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
 
 
 
91
 
92
 
93
  components.update(create_lora_settings_ui(prefix))
 
85
  components[f'height_{prefix}'] = gr.State(value=512)
86
 
87
  with gr.Column(scale=1):
88
+ # Right side: gallery and metadata side by side
89
+ with gr.Row():
90
+ components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=610)
91
+ with gr.Row():
92
+ components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
93
+
94
 
95
 
96
  components.update(create_lora_settings_ui(prefix))
ui/shared/img2img_ui.py CHANGED
@@ -66,9 +66,11 @@ def create_ui():
66
  components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=None, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU. Longer jobs may need more time.")
67
 
68
  with gr.Column(scale=1):
69
- components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=505)
70
- # Textbox for generation info
71
- components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
 
 
72
 
73
 
74
  components.update(create_lora_settings_ui(prefix))
 
66
  components[f'zero_gpu_{prefix}'] = gr.Number(label="ZeroGPU Duration (s)", value=None, placeholder="Default: 60s, Max: 120s", info="Optional: Set how long to reserve the GPU. Longer jobs may need more time.")
67
 
68
  with gr.Column(scale=1):
69
+ # Right side: gallery and metadata side by side
70
+ with gr.Row():
71
+ components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=505)
72
+ with gr.Row():
73
+ components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
74
 
75
 
76
  components.update(create_lora_settings_ui(prefix))
ui/shared/inpaint_ui.py CHANGED
@@ -95,9 +95,12 @@ def create_ui():
95
  components[f'height_{prefix}'] = gr.State(value=512)
96
 
97
  with gr.Column(scale=1):
98
- components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=510)
99
- # Textbox for generation info
100
- components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
 
 
 
101
 
102
  components[f'params_and_gallery_row_{prefix}'] = params_and_gallery_row
103
 
 
95
  components[f'height_{prefix}'] = gr.State(value=512)
96
 
97
  with gr.Column(scale=1):
98
+ # Right side: gallery and metadata side by side
99
+ with gr.Row():
100
+ components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=510)
101
+ with gr.Row():
102
+ components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
103
+
104
 
105
  components[f'params_and_gallery_row_{prefix}'] = params_and_gallery_row
106
 
ui/shared/outpaint_ui.py CHANGED
@@ -81,9 +81,12 @@ def create_ui():
81
  components[f'height_{prefix}'] = gr.State(value=512)
82
 
83
  with gr.Column(scale=1):
84
- components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=685)
85
- # Textbox for generation info
86
- components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
 
 
 
87
 
88
 
89
  components.update(create_lora_settings_ui(prefix))
 
81
  components[f'height_{prefix}'] = gr.State(value=512)
82
 
83
  with gr.Column(scale=1):
84
+ # Right side: gallery and metadata side by side
85
+ with gr.Row():
86
+ components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=1, object_fit="contain", height=685)
87
+ with gr.Row():
88
+ components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
89
+
90
 
91
 
92
  components.update(create_lora_settings_ui(prefix))
ui/shared/txt2img_ui.py CHANGED
@@ -34,14 +34,18 @@ def create_ui():
34
  components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)
35
 
36
  with gr.Row():
 
37
  with gr.Column(scale=1):
38
  param_defaults = {'w': 1024, 'h': 1024, 'cs_vis': False, 'cs_val': 1}
39
  components.update(create_base_parameter_ui(prefix, param_defaults))
40
- with gr.Column(scale=1):
41
- components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=2, object_fit="contain", height=627)
42
- # Textbox to show generation parameters (prompt, seed, steps, etc.)
43
- components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
44
-
 
 
 
45
 
46
  components.update(create_lora_settings_ui(prefix))
47
  components.update(create_controlnet_ui(prefix))
 
34
  components[f'neg_prompt_{prefix}'] = gr.Text(label="Negative prompt", lines=3)
35
 
36
  with gr.Row():
37
+ # Left: parameters (keep existing column)
38
  with gr.Column(scale=1):
39
  param_defaults = {'w': 1024, 'h': 1024, 'cs_vis': False, 'cs_val': 1}
40
  components.update(create_base_parameter_ui(prefix, param_defaults))
41
+ # Right: result gallery and metadata side by side
42
+ with gr.Column(scale=2):
43
+ with gr.Row():
44
+ components[f'result_{prefix}'] = gr.Gallery(label="Result", show_label=False, columns=2, object_fit="contain", height=627)
45
+ with gr.Row():
46
+ # Textbox for generation info (metadata)
47
+ components[f'metadata_{prefix}'] = gr.Textbox(label="Generation info", lines=4, interactive=False)
48
+
49
 
50
  components.update(create_lora_settings_ui(prefix))
51
  components.update(create_controlnet_ui(prefix))